|
|
Source code |
1 2 3 4 5 6 7 8 9 10 11 |
<plugin name="video" url.flash="%SWFPATH%/plugins/videoplayer.swf" url.html5="%SWFPATH%/plugins/videoplayer.js"
posterurl=""
videourl.desktop=""
videourl.tablet=""
videourl.mobile=""
pausedonstart="true"
onloaded="videointerface_setup_interface(get(name)); setup_video_controls();"
onvideoready="videointerface_videoready(); videointerface_togglepause();"
/>
|
Location: Netherlands
Occupation: Krpano custom coding / Virtual Tours / Photography / Musician / Recording engineer
: https://pame.virtualtuur.comHi,
this will be possible with the next krpano release.
Best regards,
Klaus
Location: Netherlands
Occupation: Krpano custom coding / Virtual Tours / Photography / Musician / Recording engineer
: https://pame.virtualtuur.comThis post has been edited 1 times, last edit by "Tuur" (Feb 26th 2016, 3:05pm)
Location: Netherlands
Occupation: Krpano custom coding / Virtual Tours / Photography / Musician / Recording engineer
: https://pame.virtualtuur.comLocation: Netherlands
Occupation: Krpano custom coding / Virtual Tours / Photography / Musician / Recording engineer
: https://pame.virtualtuur.com
|
|
Source code |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 |
<krpano>
<action name="startup" autorun="onstart">
loadscene(videopano);
</action>
<plugin name="video" keep="true"
url.flash="videoplayer.swf"
url.html5="videoplayer.js"
volume="1.0"
videourl.ios="videoname-540p.mp4"
videourl.no-ios="videoname-720p.mp4"
posterurl="videoname.jpg"
pausedonstart="true"
loop="false"
panovideo="true"
/>
<plugin name="gyro" keep="true"
url="gyro2.js"
devices="html5.and.touch"
enabled="true"
/>
<!-- ensure stagescale 2x for mobile devices (regardless if mobilescale is 0.5 or 1.0) -->
<krpano stagescale="calc:stagescale*(1.0 + 1.0*(stagescale LT 1.0))" devices="mobile" />
<!-- include VR support -->
<include url="webvr.xml" />
<!-- overwrite some settings from the webvr.xml -->
<plugin name="WebVR" keep="true"
mobilevr_fake_support="true"
mobilevr_support="true"
onavailable="removelayer(webvr_enterbutton); webvr_onavailable();"
onentervr="webvr_onentervr(); webvr_setup();"
onexitvr="webvr_onexitvr(); webvr_setup();"
/>
<action name="webvr_setup">
if(webvr.isenabled,
set(display.hotspotrenderer, webgl);
set(skin_settings.loadscene_flags, MERGE|KEEPVIEW|KEEPMOVING);
webvr_act_as_gyro_in_portrait_mode();
set(hotspot[exit].visible, true);
,
set(display.hotspotrenderer, auto);
set(skin_settings.loadscene_flags, MERGE);
tween(layer[webvr_rotate_to_landscape_request].alpha, 0.0, 0.0);
set(hotspot[exit].visible, false);
);
</action>
<!-- show a 'rotate the device' info when the mobile device is in portrait mode in VR mode -->
<layer name="webvr_rotate_to_landscape_request" keep="true" vr="true" devices="mobile"
url="rotate_device.png" scale="0.5"
align="top" edge="center" y="28%" autoalpha="true" alpha="0.0"
enabled="false"
/>
<action name="webvr_act_as_gyro_in_portrait_mode">
if(device.mobile AND webvr.isenabled,
div(aspect, stagewidth, stageheight);
if(aspect != lastaspect OR '%1' == 'true', copy(lastaspect, aspect);
if(stagewidth GT stageheight,
<!-- landscape mode - use stereo rendering and a direct/fast gyro sensor mode -->
set(display.stereo, true);
set(webvr.mobilevr_sensor_mode, 3);
tween(layer[webvr_rotate_to_landscape_request].alpha, 0.0, 0.0);
,
<!-- portrait mode - use normal rendering and a smoother/slower gyro sensor mode -->
set(display.stereo, false);
set(webvr.mobilevr_sensor_mode, 1);
tween(layer[webvr_rotate_to_landscape_request].alpha, 1.0);
delayedcall(3.0, tween(layer[webvr_rotate_to_landscape_request].alpha, 0.0, 1.0); );
);
);
,
set(lastaspect, 0);
);
</action>
<events name="webvr_events" keep="true" onresize.mobile="webvr_act_as_gyro_in_portrait_mode();" onviewchange="" />
<!-- show an 'exit' hotspot near the nadir in VR mode -->
<style name="webvr_style" depth="800" scale="0.7" distorted="true" ath="180" atv="80" alpha="1.0" zorder="99" />
<hotspot name="exit" keep="true" style="webvr_style" url="exit_button.png" onover="tween(scale,0.6);" onout="tween(scale,0.5);" vr_timeout="2000"
onclick="plugin[video].pause();webvr.exitVR();" visible="false"/>
<scene name="videopano">
<layer name="black_bg" type="container" bgcolor="0x000000" bgalpha="1" width="100%" height="100%" align="center">
<layer name="start_button" url="start_button.png" align="center" onclick="webvr.enterVR();removelayer(start_button);plugin[video].play();"/>
</layer>
<image><sphere url="plugin:video"/></image>
<view hlookat="-130" vlookat="10" fovtype="DFOV" fov="110" fovmin="70" fovmax="150" distortion="0.0"/>
</scene>
</krpano>
|

This post has been edited 2 times, last edit by "Goofyfooter" (May 15th 2016, 10:42am)
|
|
Source code |
1 2 3 4 |
<layer name="webvr_enterbutton" align="bottom" y="10%" ondown="video_auto_start(); video2_auto_start();" /> |