yanwsh / videojs-panorama

a plugin for videojs run a full 360 degree panorama video.
http://yanwsh.github.io/videojs-panorama/
Other
488 stars 160 forks source link

Poster / auto play not working on iframe #24

Closed tibewww closed 7 years ago

tibewww commented 7 years ago

Hi All,

Amazing player, congrats !

Just one thing, when I'm using the iframe mode, everything is working perfectly, except that it autoplay the video.

I would like to have the poster enable, and on click start the video.

How is that possible ?

Aswelll, when i use a cardboard view, it looks like it's looking down all the time . . . .

Thank you !

yanwsh commented 7 years ago

hey, it's possible, please remove player.play();

      player.panorama({
            clickToToggle: (!isMobile()),
            autoMobileOrientation: false,
            initFov: 100,
            NoticeMessage: (isMobile())? "please drag and drop the video" : "please use your mouse drag and drop the video",
            callback: function () {
                //if(!isMobile()) player.play(); //remove this line will force player not autoplay the video
            }
        });
tibewww commented 7 years ago

Working Perfectly :) THhnk you :)