availablePlaybackRates property

  1. @override
Future<List<double>> availablePlaybackRates

This function returns the set of playback rates in which the current video is available. The default value is 1, which indicates that the video is playing in normal speed.

The function returns an array of numbers ordered from slowest to fastest playback speed. Even if the player does not support variable playback speeds, the array should always contain at least one value (1).

Implementation

@override
Future<List<double>> get availablePlaybackRates async {
  final rates = await _evalWithResult('getAvailablePlaybackRates()');

  return List<num>.from(jsonDecode(rates))
      .map((r) => r.toDouble())
      .toList(growable: false);
}