mpetroff / pannellum

Pannellum is a lightweight, free, and open source panorama viewer for the web.
https://pannellum.org/
MIT License
4.23k stars 722 forks source link

Video panorama auto load #1147

Open aproni34f opened 1 year ago

aproni34f commented 1 year ago

Is there a way to autoload first frame of the video? I cant even load video panorama automatically, but I dont want video to play, only load first frame. This is my code:

   <video id="panorama" class="video-js vjs-default-skin vjs-big-play-centered"  controls preload="none"  crossorigin="anonymous">   
    <source src="https://pannellum.org/images/video/jfk.webm" type="video/mp4"/>
</video>

videojs('panorama', {
preload:"auto",
controls: true,
    plugins: {
        pannellum: {autoLoad:true}
   }
});

https://jsfiddle.net/t8fbyw01/2/

mpetroff commented 1 year ago

I assume you want it to be interactive, since the video example already includes a static preview. It can probably be done by using a tour configuration. You'd autoload to a scene configuration with a normal panorama and then have the "play" button use loadScene() to switch to a scene that includes the video configuration; this would require making changes to the Video.js plugin.