start method
override
Start this Track if not started. Returns true if started, false if already started
Implementation
@override
Future<bool> start() async {
final didStart = await super.start();
if (didStart) {
try {
// web support
await audio.startAudio(getCid(), mediaStreamTrack);
if (_deviceId != null) {
audio.setSinkId(getCid(), _deviceId!);
}
} catch (e) {
if (e.toString().startsWith('NotAllowedError')) {
events.emit(AudioPlaybackFailed(track: this));
}
}
}
return didStart;
}