Open cduff opened 5 months ago
I found a workaround as demonstrated in the following sandbox:
https://codesandbox.io/p/sandbox/react-player-iphone-seek-issue-forked-r2mkkx
It uses playsinline
and sets muted
for iOS only, as determined using the is-ios
npm package.
Auto-play/resume now works on all devices but is initially muted on iOS. I'm not aware of a way to remove this requirement for muting on iOS.
I'll leave this issue open as the behaviour described in my initial post and sandbox is clearly buggy - it seeks to 50% but then plays from the beginning.
Does the resume (using vimeo play button from a seeked-to progress) work if you don't initially hide the player and don't care about autoplay?
Does the resume (using vimeo play button from a seeked-to progress) work if you don't initially hide the player and don't care about autoplay?
@Firsh Yes, it does.
Steps to reproduce
react-player
renders the Vimeo player and seeks to 50%.More details
I have a React app that uses
react-player
to play Vimeo videos. It records progress and allows resuming. Where supported by the user device/browser, it auto-plays/resumes the video after the user clicks a button on the page.I have created the following simple code sandbox to demonstrate. When the user clicks the "show" button, it attempts to resume playing the video from 50% progress.
https://codesandbox.io/p/sandbox/react-player-iphone-seek-issue-ktwh9m
This works well on most devices/browsers but there are issues on iPhones:
It's this 2nd problem that I'm raising as an issue here. I'm pretty sure this previously worked, so I'm thinking something may have changed in
react-player
, Vimeo or iPhones to break it.