Hi,
I have a small video tour that shows hotspots and layers when the video has been completed.
I have a 'back' button, that currently restarts the current scene, but I'd like it to actually go to the end of the previous scene, and to show the hotspot and layers.
Could anyone give me some ideas on how to do this? I know there is the seek() option, but i'm not sure how to impliment it into my 'onclick=' function.
Code
<scene name="videoScene2" blend="BLEND(0.5)" onstart="set(view.hlookat, -30);">
<!-- GYRO BUTTON -->
<layer name="gyrobutton" style="gyro_fixed" />
<view fovtype="DFOV" fov="100" fovmin="100" fovmax="100" distortion="0.0" />
<!-- include the videoplayer plugin -->
<plugin name="video"
url="%VIEWER%/plugins/videoplayer.js"
videourl="01-02.mp4"
panovideo="true"
pausedonstart="false"
loop="false"
volume="0"
muted="true"
playsinline="true"
onvideocomplete="delayedcall(1,
set(hotspot[hotspot1].visible, true);
set(layer[back].visible, true);
)"
preload="true"
debugmode="false"
/>
<!-- use the videoplayer plugin as panoramic image source -->
<image>
<sphere url="plugin:video" keep="true" />
</image>
<hotspot name="hotspot1" style="hotspot_white" ath="-30" atv="0" onclick="looktohotspot(get(name), 100, tween(easeOutQuad, 1.0)); loadscene(videoScene3,NULL,KEEPLOOKAT,BLEND(0.5));" visible="false"/>
<layer name="back" url="skin/img/back-button.png" align="rightbottom" x="10" y="10" zorder="2" scale.normal="0.4" scale.mobile="0.3" onclick="loadscene(get(scene[get(xml.scene)].name)));" visible="false" />
</scene>
<scene name="videoScene3" blend="BLEND(0.5)" onstart="set(view.hlookat, -30);">
<!-- GYRO BUTTON -->
<layer name="gyrobutton" style="gyro_fixed" />
<view fovtype="DFOV" fov="100" fovmin="100" fovmax="100" distortion="0.0" />
<!-- include the videoplayer plugin -->
<plugin name="video"
url="%VIEWER%/plugins/videoplayer.js"
videourl="02-03.mp4"
panovideo="true"
pausedonstart="false"
loop="false"
volume="0"
muted="true"
playsinline="true"
onvideocomplete="delayedcall(1,
set(layer[back].visible, true);
)"
preload="true"
debugmode="false"
/>
<!-- use the videoplayer plugin as panoramic image source -->
<image>
<sphere url="plugin:video" keep="true" />
</image>
<layer name="back" url="skin/img/back-button.png" align="rightbottom" x="10" y="10" zorder="2" scale.normal="0.4" scale.mobile="0.3" onclick="loadscene(get(scene[get(xml.scene)].name)));" visible="false" />
</scene>
Alles anzeigen