PictureInPicture not work after source uri change #2916
Labels
Platform: iOS
stale
Closed due to inactivity or lack or resources
triage needed
Help needed to confirm the issue
Bug
-Video not playing in background after chang props.
Platform
Environment info
"react-native": "0.67.2"
"react-native-video": "^5.2.1"
Library version: 5.2.1
Steps To Reproduce
1.Play video with uri1, goto background, pipvideo is visible.
2.Open app again. on next change uri2
3.uri2 video is playing, Goto background, pipvideo not display.
Expected behaviour
1.On video uri change
2.Goto background pipvideo should be display.
Reproducible sample code
<Video
ref={videoRef}
paused={false}
source={{
uri: props.videoUrl,
}}
controls
pictureInPicture
resizeMode="contain"
onLoad={meta => console.log(meta)}
style={{
position: 'absolute',
top: 0,
left: 0,
right: 0,
bottom: 0,
}}
/>
Seems like issue in RCTVideo.m
When this setSrc call second time:
(void)setSrc:(NSDictionary *)source -> removePlayerLayer but not remove refrence _pipController.
In this function delegate not set with updated _playerLayer
The text was updated successfully, but these errors were encountered: