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
updated to latest version 1.6.1, player autoplays hls, even when using playing={false}
attribute
#405
Comments
playing={false}
attributeplaying={false}
attribute
version 1.5.0 seems to be the last version that respects the playing attribute |
It's Chrome 66 which is blocking autoplay. Autoplay works for v1.6.1 in Firefox, etc. https://developers.google.com/web/updates/2017/09/autoplay-policy-changes Open this fiddle (uses v1.6.1) in different browsers: https://codesandbox.io/s/1qjmkkxrv7?view=preview |
@kumarharsh I think the problem is that it is autoplaying, not that it is not autoplaying. |
oh, I see. Sorry for the misunderstanding. |
@iambumblehead do you have a jsFiddle or example URL where this is happening? What browser are you using? This doesn't happen on the demo app on Chrome. Click |
@cookpete unfortunately I don't have a jsFiddle and I don't believe the demo app can be used to test this scenario. The right test scenario would load using the react-player component with an hls video source and playing={false} |
@iambumblehead How about https://jsfiddle.net/xymyj0e1/ – this doesn't play for me on any browser. |
@cookpete the jsfiddle link doesn't play for me either. I'll paste this in to my own application and see if I can get to the bottom of things now. |
I'm using firefox and if I paste that into my application using 1.6.1 react-player, the video autoplays <ReactPlayer
url='https://bitdash-a.akamaihd.net/content/MI201109210084_1/m3u8s/f08e80da-bf1d-4e3d-8899-f0f6155f6efa.m3u8'
className='react-player'
playing={false}
width='100%'
height='100%' /> |
The jsfiddle page uses react-player sources here and notice the version number in the url: https://unpkg.com/react-player@1.0.0-beta.5/dist/ReactPlayer.js Specifcally, a react-player version greater than 1.5.0 should be used in order to reproduce the issue |
Good spot. It still doesn't autoplay for me when using |
strange. The demo page does not autoplay when I load it. Locally, when I use 1.6.1 and paste the react-player component jsx from the demo page into my own app it does autoplay. I'm not seeing any scripted play calls in my own sources and will try to narrow things down further by remove everything else from my app. edit: I've made this the only component rendered by my app and disabled everything else and it still auto plays |
It autoplays in both firefox and chrome. I notice that when the
The |
I've tested this locally (not defining autoplay if autoplay is not truthy) and that did resolve the issue here I edited lib/players/FilePlayer.js to use this autoPlay attribute
|
updated to latest version 1.6.1, player autoplays hls, even when using
playing={false}
attributeThe text was updated successfully, but these errors were encountered: