Play video on page load
kamalrajs65 opened this issue · 4 comments
how to play video on On page load..?
Ya im having the same issue
const videoOptions = { src: "http://content.jwplatform.com/videos/L7fsp5ay-5tEZ0A1w.mp4", autoPlay: true, loop: true };
and it autoplays once it awhile but mostly stays frozen
I just noticed if you go to example 2 on the examples page, http://tkloht.github.io/react-video-cover/#/background, it will also not autoplay on reload.
thanks for letting me know.
You are right, it doesn't seem to work on the second example.
I will try to take a look at it, although my time is pretty limited right now. If any of you has an idea how to fix this, i would be more than happy to accept a pull request.
While doing some work on the examples pages i had a quick look at this.
The problem is that most browsers don't allow autoplay unless the video is muted.
see the second example for working autoplay:
https://github.com/tkloht/react-video-cover/blob/master/examples/src/pages/background.js#L24
http://tkloht.github.io/react-video-cover/background
hope this helps!