stop method

Future<int?> stop()

@detail api @brief After calling open{@link #IMediaPlayer#open}, start{@link #IMediaPlayer#start}, or openWithCustomSource{@link #IMediaPlayer#openWithCustomSource} to start audio mixing, call this method to stop audio mixing. @return - 0: Success. - < 0 : Fail. See ReturnStatus{@link #ReturnStatus} for more details.

Implementation

Future<int?> stop() async {
  $a() => ($instance as $p_a.IMediaPlayer).stop();
  $i() => ($instance as $p_i.ByteRTCMediaPlayer).stop();

  if (Platform.isAndroid) {
    return $a();
  } else if (Platform.isIOS) {
    return $i();
  } else {
    throw UnsupportedError(
        'Not Support Platform ${Platform.operatingSystem}');
  }
}