Iphone Saving Battery Mode not autoplaying video in DOM #1779
davidpino-gj
started this conversation in
General
Replies: 2 comments
-
If I add the autoplay attribute (true or false) in my config prop, the play button dissapears but the issue remains.
|
Beta Was this translation helpful? Give feedback.
0 replies
-
This is by Apple's design in iOS' Safari; I don't think there is a way around it. A user interaction is required to start the video. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Be sure to search for your issue before opening a new one.
Current Behavior
When my APP renders, the video from the MediaStream is being auto played and works just fine in all SO's and Devices, however, when my iPhone is on Saving Battery Mode, the video does not play and just shows a full blank container with a play button in the center (that doesn't work either)
Expected Behavior
The video should autoplay just fine in Saving Battery Mode
Environment
Other Information
Code Snippet:
<ReactPlayer url={mediaStream} height={'100%'} width={'100%'} controls={false} playing={true} muted={true} pip={isEnabled} playsinline={true} onEnablePIP={() => setEnabled(true)} onDisablePIP={() => { setEnabled(false) if (isIOS) { const videoTrack = CallService.getCurrentVideoTrack() const mediaStream = new MediaStream([videoTrack.getMediaStreamTrack()]) agoraDispatch({ type: 'setMediaStream', payload: { mediaStream: null, }, }) agoraDispatch({ type: 'setMediaStream', payload: { mediaStream, }, }) } }} config={{ file: { attributes: { style: { position: 'static', objectFit: 'cover', height: '100%', width: '100%', }, }, }, }} />
Beta Was this translation helpful? Give feedback.
All reactions