iOS double-tap needed to start playing the video
Current Behavior
On iOS 13 and 14 (Safari and Chrome), when clicking on a video the "poster" image disappears, but it's still necessary to tap again on the video to start playing. Basically, a double-tap is needed.
This issue seems related to these two:
- https://github.com/CookPete/react-player/issues/706
- https://github.com/CookPete/react-player/issues/543
Expected Behavior
On tap start the video immediately.
Steps to Reproduce
Looking at the others issues it seems that this issue is related to the use of the light prop.
Current implementation:
<ReactPlayer
ref={ref}
url={src}
light={thumbnail}
config={{ youtube: { playerVars: youtubePlayerParams }, vimeo: { playerOptions: vimeoPlayerParams } }}
playing={true}
playIcon={
<PlayButton>...</PlayButton>
}
/>
Environment
Other Information
Has anyone faced this issue recently? Any possible solution?
I set light to false and add absolute positioned element with thumbnail over video.
{isMobile && thumbnail && !isStarted && (
<div className="mobile-thumbnail" onClick={this.handlePlayPause}>
<img src={thumbnail}
alt="video-thumbnail"
className="thumbnail"
/>
<PlayButton/>
</div>
)}
Hey @denny7 thanks for your suggestion, unfortunately, the issue maintains even without passing the light prop.
I'd be surprised if there is ever a solution for this.
Mobile browsers are getting more and more strict about when to allow something to be played. Light mode is bound to never work correctly on mobile, because browsers require direct user interaction to "activate" the media element. Using light mode means the media element doesn't exist at the point of user interaction.
I'm more than happy if people find hacks/workarounds for this but I don’t think it will ever be properly solved.
Thanks @cookpete, if I find any solution I will put it here!
Thanks @cookpete, if I find any solution I will put it here!
Hi @claudiopedrom, I don't suppose you ever found a solution to this?
Thanks @cookpete, if I find any solution I will put it here!
Hi @claudiopedrom, I don't suppose you ever found a solution to this?
Hey! Unfortunately, it's been a long time and I don't remember and I also no longer have access to the project. 😞