Skip to content

Iphone Saving Battery Mode not autoplaying video in DOM #1766

@davidpino-gj

Description

@davidpino-gj

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)

image

Expected Behavior

The video should autoplay just fine in Saving Battery Mode

image

Environment

  • URL attempting to play: MediaStream
  • Browser: Safari/Chrome
  • Operating system: iOS 17

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%', }, }, }, }} />

   If anyone could help me with this, I'd be very grateful. Thanks.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions