Open prudhvi-k23 opened 10 months ago
Hey @prudhvi-k23, cloud you test it on latest beta ? It probably wont work 😅, so after confirm I will add this to Road Map
Hi @KrzysztofMoch , tested in latest beta. Not working. Here, the video component that I've shared above is getting destroyed after end of every video, and new component is getting created for the next video. So, next video is not displaying in the PIP mode (as PIP mode only starts after we press the Home button).
Is is possible to play a series of videos in PIP mode one after another? Suppose if the first is in PIP mode, and after end of the first video , the next video should start in PIP mode. How to achieve this in React Native?
Hmm I don't think it will be possible to achieve what you want with react-native-video
. We probably would need to reimplement iOS to use AVQueuePlayer
😕
Hi, did you find a workaround to this problem?
In theory you can start pip from component ref when changing source
Reproducible sample code My code block is as follows:
<Video key="video_player" style={styles.videoStyle} testID={'video_player'} ref={setActivePlayer} allowsExternalPlayback progressUpdateInterval={progressUpdateInterval} source={{ uri: playerSource.url }} poster={video.poster} resizeMode={'contain'} repeat={false} paused={isPaused} rate={playbackSpeed} onBuffer={onBuffer} onLoad={onLoad} onAudioBecomingNoisy={onAudioBecomingNoisy} onReadyForDisplay={onReadyForDisplay} onLoadStart={onLoadStart} onProgress={onProgress} onEnd={onVideoEnd} onError={onError} selectedTextTrack={selectedTextTrack} textTracks={playerSource.textTracks} pictureInPicture={pictureInPicture} playInBackground={!pictureInPicture} playWhenInactive={true} />
Environment info
Library version: react-native-video : 5.2.1 Device: iOS
Steps To Reproduce
1.Start video playing 2.Press the home button
Expected behaviour
1.Start video playing 2.Press the home button
Anyone please help me out of this. After video ending, PIP mode goes off and background mode is activating (only audio playing). Is this the expected behaviour in react-native-video or should I change the code in any event method?
Thanks in advance.