setSpeed method

Future<void> setSpeed (
  1. double speed
)

Set playback speed

speed must not null and greater than 0. Default speed is 1

Implementation

Future<void> setSpeed(double speed) async {
  await _nativeSetup.future;
  if (speed == null || speed <= 0) {
    FijkLog.e("$this invoke setSpeed invalid speed:$speed");
    return Future.error(ArgumentError.value(
        speed, "speed must be not null and greater than 0"));
  } else {
    FijkLog.i("$this invoke setSpeed $speed");
    _channel.invokeMethod("setSpeed", <String, dynamic>{"speed": speed});
  }
}