enterPipMode method

  1. @override
Future<bool> enterPipMode(
  1. int playerId, {
  2. int? width,
  3. int? height,
})
override

Enters PiP mode for the specified player ID.

Implementation

@override
Future<bool> enterPipMode(int playerId, {int? width, int? height}) async {
  try {
    final result = await methodChannel.invokeMethod<bool>('enterPipMode', {
      'playerId': playerId,
      if (width != null) 'width': width,
      if (height != null) 'height': height,
    });
    return result ?? false;
  } on PlatformException catch (e) {
    debugPrint('Error entering PiP mode: ${e.message}');
    return false;
  }
}