stopPlayer method

  1. @override
void stopPlayer()
override

Implementation

@override
void stopPlayer() async {
  try {
    await _methodChannel.invokeMethod("stopPlayer");
    playerStateSubscription?.cancel();
    playerStateSubscription = null;
  } catch (e) {
    throw Exception("Unable to Stop [Stop Player]");
  }
}