hawksley / eleVR-Web-Player

A Web Player for 360 Video on the Oculus
Mozilla Public License 2.0
682 stars 195 forks source link

Autoplay show black screen and only start sound #34

Closed inquietto closed 8 years ago

inquietto commented 8 years ago

Hello! Very good your work... I've been testing and when the autoplay is in active mode, only the sound start and video no appears. You know how I can solve it? Thanks a lot!

hawksley commented 8 years ago

Can you give a full flow that causes this problem? And also a flow where you can see the video?

inquietto commented 8 years ago

Basically the code I use is this

<Video src = "River.mp4" type = "video / mp4" class = "hidden" preload = "no" id = "video" loop = "true" crossOrigin = "anonymous" autoplay controls webkit-playsinline>
     </ Video>
inquietto commented 8 years ago

If can help to you ... when I click on the play button twice, the video appears correctly

hawksley commented 8 years ago

You are starting the video using autoplay of the video tag, but the part of the player that shows the video and does the video transform is not triggered by that. You need to trigger that as well.

If you always want to autoplay, you can add controls.play(); to the bottom of the loaded function in controls.js

inquietto commented 8 years ago

Works perfect!! thanks so much!!