chintan9 / plyr-react

A simple, accessible and customisable react media player for Video, Audio, YouTube and Vimeo

Home Page:https://github.com/chintan9/plyr-react

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

PC vs Mac Autoplay

c-mella opened this issue · comments

When testing the player on different browsers I've noticed that videos that are set to autoplay will work fine on Mac but PC browsers (namely Chrome and FF so far) will just have the poster image and wont play until clicked on. Is this a known bug (I'm on v4.0 alpha)?

Hey @c-mella , I'm thinking of a browser implementation limitation (design decision), but if it is not relevant you can do following:

Based on this plyr issue, you can call play() on your own, for event implementation showcases you can take look at our example directory

useEffect(()=> {
    raptorRef.current.plyr.on('play', ()=>{
      raptorRef.current.plyr.play()
    })
})