«

Krpano制作全景视频

emer 发布于 2017-10-19 23:49   2636 次阅读     


  <scene name="videopano" title="krpano Panoramic Video Example">

        <!-- include the videoplayer interface / skin (with VR support) -->
        <include url="skin/videointerface.xml" />

        <!-- include the videoplayer plugin -->
        <plugin name="video"
                url.html5="%SWFPATH%/plugins/videoplayer.js"
                url.flash="%SWFPATH%/plugins/videoplayer.swf"
                pausedonstart="true"
                loop="true"
                volume="1.0"
                onloaded="add_video_sources();"
                />

        <!-- use the videoplayer plugin as panoramic image source -->
        <image>
            <sphere url="plugin:video" />
        </image>

        <!-- set the default view -->
        <view hlookat="0" vlookat="0" fovtype="DFOV" fov="130" fovmin="75" fovmax="150" distortion="0.0" />

        <!-- add the video sources and play the video -->
        <action name="add_video_sources">
            videointerface_addsource('1024x512', '%CURRENTXML%/video-1024x512.mp4|%CURRENTXML%/video-1024x512.webm|%CURRENTXML%/iphone-audio.m4a', '%CURRENTXML%/video-1024x512-poster.jpg');
            videointerface_addsource('1920x960', '%CURRENTXML%/video-1920x960.mp4|%CURRENTXML%/video-1920x960.webm|%CURRENTXML%/iphone-audio.m4a', '%CURRENTXML%/video-1920x960-poster.jpg');

            if(device.ios,
                <!-- iOS Safari has a very slow 'video-to-webgl-texture' transfer, therefore use a low-res video by default -->
                videointerface_play('1024x512');
              ,
                videointerface_play('1920x960');
              );
        </action>

</scene>


在tour.xml内添加如下代码