cueVideoByUrl method

  1. @override
Future<void> cueVideoByUrl({
  1. required String mediaContentUrl,
  2. double? startSeconds,
  3. double? endSeconds,
})

This function loads the specified video's thumbnail and prepares the player to play the video. The player does not request the FLV until playVideo or seekTo is called.

mediaContentUrl specifies a fully qualified YouTube player URL in the format http://www.youtube.com/v/VIDEO_ID?version=3.

startSeconds specifies the time from which the video should start playing when playVideo() is called. If you specify startSeconds and then call seekTo(), then the player plays from the time specified in the seekTo() call. When the video is cued and ready to play, the player will broadcast a video cued event (5).

endSeconds specifies the time when the video should stop playing when playVideo() is called. If you specify an endSeconds value and then call seekTo(), the endSeconds value will no longer be in effect.

Implementation

@override
Future<void> cueVideoByUrl({
  required String mediaContentUrl,
  double? startSeconds,
  double? endSeconds,
}) {
  return _run(
    'cueVideoByUrl',
    data: {
      'mediaContentUrl': mediaContentUrl,
      'startSeconds': startSeconds,
      'endSeconds': endSeconds,
    },
  );
}