enterPictureInPictureMode method
Future<int>
enterPictureInPictureMode({
- String? backIconForAndroid,
- String? playIconForAndroid,
- String? pauseIconForAndroid,
- String? forwardIconForAndroid,
override
Enter picture-in-picture mode. To enter picture-in-picture mode, you need to adapt the interface for picture-in-picture mode. Android only supports models above 7.0.
Due to Android system restrictions, the size of the passed icon cannot exceed 1M, otherwise it will not be displayed.
@param backIcon playIcon pauseIcon forwardIcon are icons for playback rewind, playback, pause, and fast-forward, only applicable to Android. If assigned, the passed icons will be used; otherwise,the system default icons will be used. Only supports Flutter local resource images. When passing, use the same image resource as Flutter, for example: images/back_icon.png.进入画中画模式,进入画中画模式,需要适配画中画模式的界面,安卓只支持7.0以上机型
由于android系统限制,传递的图标大小不得超过1M,否则无法显示
@param backIcon playIcon pauseIcon forwardIcon 为播放后退、播放、暂停、前进的图标,仅适用于android,如果赋值的话,将会使用传递的图标,否则 使用系统默认图标,只支持flutter本地资源图片,传递的时候,与flutter使用图片资源一致,例如: images/back_icon.pngImplementation
@override
Future<int> enterPictureInPictureMode(
{String? backIconForAndroid, String? playIconForAndroid, String? pauseIconForAndroid, String? forwardIconForAndroid}) async {
if (_isNeedDisposed) return -1;
await _initPlayer.future;
IntMsg intMsg = await _livePlayerApi.enterPictureInPictureMode(PipParamsPlayerMsg()
..backIconForAndroid = backIconForAndroid
..playIconForAndroid = playIconForAndroid
..pauseIconForAndroid = pauseIconForAndroid
..forwardIconForAndroid = forwardIconForAndroid
..playerId = _playerId);
return intMsg.value ?? -1;
}