Hallo,
ich habe ein Problem mit dem "plugin[video].stop();"
Der Gedanke ist es, ein Video bis zum ende durchlaufen zu lassen und wenn es dann Fertig ist, wollte ich es mit .stop() wieder zum ersten Frame bringen damit man es sich von vorne anschauen kann ohne den VR Modus zu verlassen. Nur funktioniert das Leider nicht auf dem Mobilen gerät am PC klappt es super.
Hier die video.xml die ich benutze:
<krpano>
<action name="startup" autorun="onstart"> if(device.panovideosupport == false, error('Sorry, but panoramic videos are not supported by your current browser!'); , loadscene(videopano); ); </action>
<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="false" 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('3500x1500', '%CURRENTXML%/video-3500x1500.mp4', '%CURRENTXML%/video-3500x1500-poster.jpg'); videointerface_play('3500x1500'); set(plugin[video].onvideocomplete, reset_scene();); </action> <action name="reset_scene"> plugin[video].stop(); set(hotspot[play_button].visible, true); set(plugin[WebVR].vr_cursor_enabled, true); set(plugin[WebVR].vr_cursor, "hotspot[vr_cursor]"); </action> <action name="exit_vr">
plugin[video].stop(); set(plugin[info_image].visible, true); set(hotspot[play_button].visible, true); set(plugin[WebVR].vr_cursor_enabled, true); set(plugin[WebVR].vr_cursor, "hotspot[vr_cursor]"); </action> <action name="first_setup"> plugin[video].play(); plugin[video].pause(); plugin[WebVR].enterVR(); set(plugin[info_image].visible, false); set(hotspot[play_button].visible, true); set(plugin[WebVR].vr_cursor_enabled, true); set(plugin[WebVR].vr_cursor, "hotspot[vr_cursor]"); </action> <action name="start_video"> plugin[video].play(); set(hotspot[play_button].visible, false); set(plugin[WebVR].vr_cursor_enabled, false); set(plugin[WebVR].vr_cursor, "hotspot[]");
</action>
<plugin name="info_image" align="center" distorted="false" edge="center" width="100%" height="100%" zorder="3" onclick="first_setup();" url="./info.jpg"/> <hotspot name="play_button" depth="550" alpha="0.0" visible="true" distorted="true" width="128px" height="128px" zorder="3" ath="-80" atv="10" type="image" url="./play.png" onclick="start_video();"/> </scene>
</krpano>
Display More
Die Action "reset_scene" führt leider nicht zum gewünschten Ergebnis, das Video bleibt in dem letzten Frame egal ob ich stop oder pause befehl nutze. Ich habe auch zwischen durch versucht das Video mit seek wieder an den Anfang zu positionieren mit
plugin[video].seek(0%); oder plugin[video].seek(0);
nur leider ohne Erfolg
Deswegen die Frage, mache ich etwas falsch oder habe ich vielleicht etwas übersehen
Mit freundlichen Grüßen
foobar