Skip to content

Commit

Permalink
feat(shouldEnterOnBackground): fix tvOS and iOS version build
Browse files Browse the repository at this point in the history
  • Loading branch information
123mpozzi committed Oct 13, 2023
1 parent 636a5de commit 0da1e6d
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
9 changes: 5 additions & 4 deletions ios/RCTConvert+BitmovinPlayer.swift
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
}
2 changes: 1 addition & 1 deletion src/components/PlayerView/pictureInPictureConfig.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ export interface PictureInPictureConfig {
*
* Default is `false`.
*
* @platform iOS
* @platform iOS 14.2 and above
*/
shouldEnterOnBackground?: boolean;
}

0 comments on commit 0da1e6d

Please sign in to comment.