enterPictureInPictureMode method
Future<int>
enterPictureInPictureMode({
- String? backIconForAndroid,
- String? playIconForAndroid,
- String? pauseIconForAndroid,
- String? forwardIconForAndroid,
override
To enter Picture-in-Picture mode, you need to adapt the interface for Picture-in-Picture mode. On Android, this feature is only supported on devices running Android 7.0 or higher.
Due to Android system limitations, the size of the icon passed cannot exceed 1MB, otherwise it will not be displayed.
@param backIcon playIcon pauseIcon forwardIcon the icons for rewind, play, pause and fast-forward. If not passed the system default icons will be used. Only Flutter local resource images are supported, e.g. images/back_icon.png.Implementation
@override
Future<int> enterPictureInPictureMode(
{String? backIconForAndroid, String? playIconForAndroid, String? pauseIconForAndroid, String? forwardIconForAndroid}) async {
if (_isNeedDisposed) return -1;
await _initPlayer.future;
final result = await _mc!.invoke<int>('enterPictureInPictureMode', {
'backIconForAndroid': backIconForAndroid,
'playIconForAndroid': playIconForAndroid,
'pauseIconForAndroid': pauseIconForAndroid,
'forwardIconForAndroid': forwardIconForAndroid,
});
return result ?? -1;
}