facebookarchive / react-360

Create amazing 360 and VR content using React
https://facebook.github.io/react-360
Other
8.73k stars 1.22k forks source link

How to play background environment or videopano video with audio on mobile devices? #573

Open ibenarobeno opened 6 years ago

ibenarobeno commented 6 years ago

From issue #50 it is pointed out that user interaction is needed and that elements within react360 do not count as user interaction. One suggestion was to use "View in VR" button. Are there any other ways to achieve video playing with audio on mobile devices? If not then can anyone share experiences with using "View in VR" button to be the interaction by user?

andrewimm commented 6 years ago

As mentioned in previous issues, this is a limitation with mobile browsers, and we just have to do our best as developers to get around it. My recommendation for users is to add a one-time "click" handler to the entire window that starts your playback, then pauses it. Then, you should be able to play it from the React side at any point in time later.

videolevels commented 6 years ago

Thank you for reply. Could you please provide a simple example how to pass interaction from window element down to react 360 video elements? Or few guidelines?