Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Video showing black screen on Ios while playing #1785

hhovakimyan started this conversation in General
Discussion options

Current Behavior

Sometimes when playing videos in Ios a black screen is being shown while the video is playing. So we can hear the audio but
see black screen instead of the video(See the bug reproduction video attached). The video is being loaded from AWS. The integration code is

import ReactPlayer from 'react-player';
<ReactPlayer
 config={{
 file: {
 forceVideo: true,
 attributes: {
 poster: 'Some external image URL',
 preload: 'metadata',
 },
 },
 }}
 playsinline
 playing={true}
 width='100vw'
 url={`Some external video URL`}
 />

Environment

RPReplay_Final1705303082.mp4
You must be logged in to vote

Replies: 9 comments

Comment options

I see same behavior. If you exit the video and play again it works fine. I've verified this is issue with IOS 17. Works fine with 16.5

You must be logged in to vote
0 replies
Comment options

I've just stumbled across this issue whilst researching a very similar issue I'm having in my own react application (which uses the native video controls when running in Safari on iOS). So even though I'm not using react-player I thought this information might be helpful...

For me it seems to occur only when:

  • the video has a poster image set
  • the user taps the webkit 'play' control (i.e. it doesn't occur if they tap anywhere else on the <video> element)
  • the playsinline attribute is NOT set

Frustratingly I can't replicate the issue outside of my application - either in a pure HTML5 video or in a React app that renders a <video> element.

But I am wondering if it's something that's been caused by a recent iOS update as it seems unlikely that it hasn't been noticed & reported before (this application has hundreds of thousands of users).

Oh, in my app it also works fine if you exit the video then play again. I also noticed that if I switch to picture-in-picture it plays back fine.

I'm running iOS v17.3.1

You must be logged in to vote
0 replies
Comment options

Sounds like Apple broke video api. I was reading few threads in apple forum which sounded similar issue.

You must be logged in to vote
0 replies
Comment options

@amitava82 a colleague with an iPhone still running iOS 16.4.1 just tested and couldn't replicate the issue so yeah I think something is broken in mobile safari.

Also note that in @hhovakimyan 's config playsinline is set but in the screen recording it looks to be opening in the full screen player

You must be logged in to vote
0 replies
Comment options

Hello!

I had a similar issue with Safari and Chrome in my app on iOS 17. However, I noticed the video works as expected when the poster attribute is removed. That could be a temporary workaround.
I hope this helps someone.

You must be logged in to vote
0 replies
Comment options

Did anyone found a solution for the above ?

You must be logged in to vote
0 replies
Comment options

I have the same issue with Vimeo embeds on iOS 17.5.1. I
Have checked my embeds on older version of iOS (16.2) and they go to full screen no problem.
It's inconsistent, sometimes ok, other times a blank screen with audio.

You must be logged in to vote
0 replies
Comment options

Had a similar issue on Android. Embedded video could not be started at all. Setting playsinline attribute to true fixed the problem.

You must be logged in to vote
0 replies
Comment options

I am not user of it but I've had the issue on video using videoJS. Try playsinline attribute.
In some rare cases, check whether the phone is in low battery (Adam Comment).

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Converted from issue

This discussion was converted from issue #1732 on April 19, 2024 19:51.

AltStyle によって変換されたページ (->オリジナル) /