Enable PiP on Native Player (#786)
This commit is contained in:
parent
2e2fc32e84
commit
d624c1e869
|
@ -63,6 +63,10 @@ network.</string>
|
|||
</dict>
|
||||
<key>UIApplicationSupportsIndirectInputEvents</key>
|
||||
<true/>
|
||||
<key>UIBackgroundModes</key>
|
||||
<array>
|
||||
<string>audio</string>
|
||||
</array>
|
||||
<key>UIFileSharingEnabled</key>
|
||||
<true/>
|
||||
<key>UILaunchScreen</key>
|
||||
|
|
|
@ -73,6 +73,9 @@ class UINativeVideoPlayerViewController: AVPlayerViewController {
|
|||
newPlayer.appliesMediaSelectionCriteriaAutomatically = false
|
||||
newPlayer.currentItem?.externalMetadata = createMetadata()
|
||||
|
||||
// enable pip
|
||||
allowsPictureInPicturePlayback = true
|
||||
|
||||
rateObserver = newPlayer.observe(\.rate, options: .new) { _, change in
|
||||
guard let newValue = change.newValue else { return }
|
||||
|
||||
|
|
Loading…
Reference in New Issue