togglePause method

  1. @override
Future<void> togglePause(
  1. int videoId,
  2. bool isPause
)
override

Implementation

@override
Future<void> togglePause(int videoId, bool isPause) async {
  if (isPause) {
    JsFunction func = player['pause'];
    func.apply([], thisArg: player);
  } else {
    JsFunction func = player['play'];
    func.apply([], thisArg: player);
  }
}