setShuffle method

void setShuffle(
  1. bool shuffle
)

This function indicates whether a playlist's videos should be shuffled so that they play back in an order different from the one that the playlist creator designated.

If you shuffle a playlist after it has already started playing, the list will be reordered while the video that is playing continues to play. The next video that plays will then be selected based on the reordered list.

Implementation

// ignore: avoid_positional_boolean_parameters
void setShuffle(bool shuffle) => invokeJavascript('setShuffle($shuffle)');