diff --git a/ios/RCTConvert+BitmovinPlayer.swift b/ios/RCTConvert+BitmovinPlayer.swift index 70810154..5e763c79 100644 --- a/ios/RCTConvert+BitmovinPlayer.swift +++ b/ios/RCTConvert+BitmovinPlayer.swift @@ -1048,11 +1048,12 @@ extension RCTConvert { if let isEnabled = json["isEnabled"] as? Bool { pictureInPictureConfig.isEnabled = isEnabled } - if let shouldEnterOnBackground = json["shouldEnterOnBackground"] as? Bool { - if #available(iOS 14.2, *) { - pictureInPictureConfig.shouldEnterOnBackground = shouldEnterOnBackground - } +#if os(iOS) + if #available(iOS 14.2, *), + let shouldEnterOnBackground = json["shouldEnterOnBackground"] as? Bool { + pictureInPictureConfig.shouldEnterOnBackground = shouldEnterOnBackground } +#endif return pictureInPictureConfig } } diff --git a/src/components/PlayerView/pictureInPictureConfig.ts b/src/components/PlayerView/pictureInPictureConfig.ts index 7a486a6a..2b7fdd6c 100644 --- a/src/components/PlayerView/pictureInPictureConfig.ts +++ b/src/components/PlayerView/pictureInPictureConfig.ts @@ -16,7 +16,7 @@ export interface PictureInPictureConfig { * * Default is `false`. * - * @platform iOS + * @platform iOS 14.2 and above */ shouldEnterOnBackground?: boolean; }