enterPictureInPictureMode method

Future<IntMsg> enterPictureInPictureMode(
  1. PipParamsPlayerMsg pipParamsMsg
)

进入画中画模式,进入画中画模式,需要适配画中画模式的界面,安卓只支持7.0以上机型

由于android系统限制,传递的图标大小不得超过1M,否则无法显示

@param backIcon playIcon pauseIcon forwardIcon 为播放后退、播放、暂停、前进的图标,仅适用于android,如果赋值的话,将会使用传递的图标,否则 使用系统默认图标,只支持flutter本地资源图片,传递的时候,与flutter使用图片资源一致,例如: images/back_icon.png

Implementation

Future<IntMsg> enterPictureInPictureMode(PipParamsPlayerMsg pipParamsMsg) async {
  final String pigeonVar_channelName = 'dev.flutter.pigeon.super_player.TXFlutterLivePlayerApi.enterPictureInPictureMode$pigeonVar_messageChannelSuffix';
  final BasicMessageChannel<Object?> pigeonVar_channel = BasicMessageChannel<Object?>(
    pigeonVar_channelName,
    pigeonChannelCodec,
    binaryMessenger: pigeonVar_binaryMessenger,
  );
  final List<Object?>? pigeonVar_replyList =
      await pigeonVar_channel.send(<Object?>[pipParamsMsg]) as List<Object?>?;
  if (pigeonVar_replyList == null) {
    throw _createConnectionError(pigeonVar_channelName);
  } else if (pigeonVar_replyList.length > 1) {
    throw PlatformException(
      code: pigeonVar_replyList[0]! as String,
      message: pigeonVar_replyList[1] as String?,
      details: pigeonVar_replyList[2],
    );
  } else if (pigeonVar_replyList[0] == null) {
    throw PlatformException(
      code: 'null-error',
      message: 'Host platform returned null value for non-null return value.',
    );
  } else {
    return (pigeonVar_replyList[0] as IntMsg?)!;
  }
}