cuePlaylist method

void cuePlaylist(
  1. String list, {
  2. String listType = PlaylistType.playlist,
  3. int startAt = 0,
  4. int index = 0,
})

Queues the specified list of videos. The list can be a playlist, a search results feed, or a user's uploaded videos feed. When the list is cued and ready to play, the player will broadcast a video cued event PlayerState.cued.

list contains a key that identifies the particular list of videos that YouTube should return. listType specifies the type of results feed that you are retrieving. startAt accepts a Duration and specifies the time from which the first video in the list should start playing. index specifies the index of the first video in the list that will play. The parameter uses a zero-based index, and the default parameter value is 0, so the default behavior is to load and play the first video in the list.

Implementation

void cuePlaylist(
  String list, {
  String listType = PlaylistType.playlist,
  int startAt = 0,
  int index = 0,
}) {
  var cueParams =
      'list:"$list",listType:"$listType",index:$index,startSeconds:$startAt';
  invokeJavascript('cuePlaylist({$cueParams})');
}