-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Autoplay Policy Changes on Chrome #395
Comments
@edencorbin It also happened to me, but I figured it out a way to make the autoplay work (at least by now). It's kind of hacky but it is working for me for all platforms (Vimeo, YouTube, mp4) and popular browsers (Chrome, FireFox, Safari).
Hope it works for you! |
Unfortunately @alexgarces your solution did not work for me. I did come across this, I didn't notice recently a change in the behavior of video autoplay, but now I understand clearly what's causing it. Interacting with the page (simple click will do) prior to video load will fix the autoplay, unfortunately this is something we can't program (fake clicks don't work). In the article they suggest other options, but I would hope to have one included in this library. |
@ethanshar I found that article too, and we ended up going to a plain video tag as our application cannot require user interaction prior to playing the video. It's working for use, we start the video muted. I like allot about react-player, but until this is resolved/supported we are using vanilla video tag. |
@edencorbin ReactPlayer uses a <ReactPlayer
url='file.mp4'
playing
muted
config={{ file: { attributes: {
autoPlay: true,
muted: true
}}}}
/> Ideally we should apply As for YouTube and other players, this will be an ongoing battle with each API to retain the previous behaviour. I can't see a player param or other way to initialise a muted YouTube player to enable autoplay on the latest Chrome. |
So it turns out you can pass in |
@cookpete Changing |
@pugson This is something that will be fixed soon for the YT player. All muting/autoplay behaviour needs to be sorted for every player. I'm also battling with karma tests no longer working on Travis (presumably because of a similar issue). |
This should be fixed in |
Why i can play youtube videos normally but vimeo videos don't start? (Autoplay works fine in youtube but don't in vimeo). Chrome disabled autoplay except for muted video but the video works normally in youtube |
You're not alone, we have the same issue @hmontes, sometimes it looks like vimeo will auto play but nothing actually is loading and then you have to press pause & play to actually play the media. |
@hmontes @jacobduursma I am assuming you are setting Also worth checking out |
You're right @cookpete, it does work when muted={true}, however in our case we want the media to play with sound (it's primarily for music), however the player loads after an interaction with the app, i.e. the clicking of an item from a list. Youtube and other providers work fine, just not vimeo. It was my understanding that if interaction had taken place on the domain such as a click that it would be fine? For example even if I change chrome://flags/#autoplay-policy to document user activation required it still works fine for youtube, but not vimeo. |
Fixes cookpete/react-player#395 Should also fix cookpete/react-player#389
Fixes cookpete/react-player#395 Should also fix cookpete/react-player#389
Fixes cookpete/react-player#395 Should also fix cookpete/react-player#389
Fixes cookpete/react-player#395 Should also fix cookpete/react-player#389
@cookpete Thanks for this solution |
config={{ file: { attributes: { |
Fixes cookpete/react-player#395 Should also fix cookpete/react-player#389
config={{ file: { attributes: { |
Yes you can |
Hey! I have the same issue. |
Fixes cookpete/react-player#395 Should also fix cookpete/react-player#389
https://developers.google.com/web/updates/2017/09/autoplay-policy-changes
I ran into an issue (with latest 1.5+ version of react-player) where videos stopped playing on start, reading this article a video must be muted to autoplay. With the following settings the video would still not auto play in react-player (I got it working fine in vanilla video tag):
<ReactPlayer
ref={el => this._videoRef = el}
volume={0}
muted={true}
url={this.props.url}
width={this.props.width}
height={this.props.height}
loop={false} />
Is this a known issue, or do I have a setting wrong?
The text was updated successfully, but these errors were encountered: