tour_video.xml 2.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869
  1. <krpano version="1.19" title="{$project.vname}">
  2. <security cors="anonymous">
  3. <crossdomainxml url="{$cdn_host}crossdomain.xml" />
  4. <allowdomain domain="{$cdn_host}" />
  5. </security>
  6. <action name="startup" autorun="onstart">
  7. if(device.panovideosupport == false,
  8. error('Sorry, but panoramic videos are not supported by your current browser!');
  9. ,
  10. loadscene(videopano);
  11. );
  12. jscall(calc('update_title("{$project.vname}")'));
  13. </action>
  14. <scene name="videopano" title="VR视频">
  15. <!-- include the videoplayer interface / skin (with VR support) -->
  16. <!--固定路径-->
  17. <include url="{$cdn_host}video/skin/videointerface.xml" />
  18. <!-- include the videoplayer plugin -->
  19. <plugin name="video"
  20. url.html5="%SWFPATH%/plugins/videoplayer.js"
  21. url.flash="%SWFPATH%/plugins/videoplayer.swf"
  22. pausedonstart="true"
  23. loop="false"
  24. volume="1.0"
  25. onloaded="add_video_sources();"
  26. />
  27. <!-- use the videoplayer plugin as panoramic image source -->
  28. <image>
  29. <sphere url="plugin:video" />
  30. </image>
  31. <!-- set the default view -->
  32. <view hlookat="0" vlookat="0" fovtype="DFOV" fov="130" fovmin="75" fovmax="150" distortion="0.0" />
  33. <!--include url="/test.php" /-->
  34. <!-- add the video sources and play the video -->
  35. <action name="add_video_sources">
  36. if(device.desktop || device.chrome,
  37. start_play(),
  38. calc(layer[skin_error_msg].html, '提示: '+'为了更好的观看体验,建议您使用谷歌浏览器打开,点此继续播放');
  39. set(layer[skin_error].ondown, start_play());
  40. set(layer[skin_error].visible, true);
  41. );
  42. </action>
  43. <action name="start_play">
  44. set(layer[skin_error].ondown, '');
  45. {if !empty($project) }
  46. {foreach $project.videos as $v}
  47. videointerface_addsource('{if empty($v.progressive)}标清{else}{$v.progressive}{/if}', "{$_lang['cdn_host']}{$v.location}");
  48. {/foreach}
  49. videointerface_play('{if empty($project.videos[0].progressive)}标清{else}{$project.videos[0].progressive}{/if}');
  50. {/if}
  51. </action>
  52. </scene>
  53. <contextmenu fullscreen="false" versioninfo="false">
  54. <item name="logo" caption="{$_lang.title}" separator="true" onclick="openurl('{$_lang.host}')" devices="html5"/>
  55. </contextmenu>
  56. </krpano>