Track constructor
- TrackType kind,
- TrackSource source,
- MediaStream _mediaStream,
- MediaStreamTrack _mediaStreamTrack,
- {RTCRtpReceiver? receiver}
Implementation
Track(this.kind, this.source, this._mediaStream, this._mediaStreamTrack,
{this.receiver}) {
// Any event emitted will trigger ChangeNotifier
events.listen((event) {
logger.fine('[TrackEvent] $event, will notifyListeners()');
notifyListeners();
});
onDispose(() async {
logger.fine('${objectId} onDispose()');
await stop();
// dispose events
await events.dispose();
});
}