startPlayerFromTrack method
Future<int>
startPlayerFromTrack(
- TauPlayerCallback callback, {
- Duration? progress,
- Duration? duration,
- Map<
String, dynamic> ? track, - bool? canPause,
- bool? canSkipForward,
- bool? canSkipBackward,
- bool? defaultPauseResume,
- bool? removeUIWhenStopped,
override
Implementation
@override
Future<int> startPlayerFromTrack(TauPlayerCallback callback, { Duration? progress, Duration? duration, Map<String, dynamic>? track, bool? canPause, bool? canSkipForward, bool? canSkipBackward, bool? defaultPauseResume, bool? removeUIWhenStopped }) async
{
// startPlayerCompleter = new Completer<Map>();
// await invokeMethod( callback, 'startPlayerFromTrack', {'progress': progress, 'duration': duration, 'track': track, 'canPause': canPause, 'canSkipForward': canSkipForward, 'canSkipBackward': canSkipBackward,
// 'defaultPauseResume': defaultPauseResume, 'removeUIWhenStopped': removeUIWhenStopped,},);
// return startPlayerCompleter.future ;
//
//return getWebSession(callback).startPlayerFromTrack( progress.inMilliseconds, duration.inMilliseconds, track, canPause, canSkipForward, canSkipBackward, defaultPauseResume, removeUIWhenStopped);
return getWebSession(callback)!.startPlayer(track!['codec'], track['dataBuffer'], track['path'], track['numChannels'], track['sampleRate']);
}