startPlayerFromTrack method

  1. @override
Future<int> startPlayerFromTrack(
  1. TauPlayerCallback callback, {
  2. Duration? progress,
  3. Duration? duration,
  4. Map<String, dynamic>? track,
  5. bool? canPause,
  6. bool? canSkipForward,
  7. bool? canSkipBackward,
  8. bool? defaultPauseResume,
  9. 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']);
  }