360 Video Scene menu

  • Hi,

    I'm relatively new to krpano, so please excuse me if my question seems a little basic.

    I'm trying to create a tour with multiple 360 video scenes. I'd like to create a scene menu similar to this example from the examples page

    https://krpano.com/examples/119/k…-corfu/tour.xml.

    My default video is housed in an external xml file. Do I need to create a separate xml for each 360 video and call it with an action from my interface.xml page?

    Thanks in advance (I hope I made sense)

    Ronandl

  • Hi,

    the answer is no *wink*
    You can just use scenes.

    example:

    Code
    <scene name="scene_1" title="heli"  onstart="ChangeVideoScene(heli);" >
    	<view hlookat="0" vlookat="0" fov="90" fovmin="60" fovmax="110" limitview="on" />
    		<image>
    		  <sphere url="plugin:video" />
        </image>
    </scene>

    and also for example

    Code
    <action name="ChangeVideoScene" devices="desktop"> 
    		
    		set(plugin[video].posterurl, calc:'video/%1-2k-poster.jpg');
    		plugin[video].playvideo(video/%1-2k.mp4|video/%1-2k.webm);
    		
    </action>

    i use a strict protocol in naming the videos like:
    heli-1k.mp4
    heli-1k-poster.jpg
    heli-2k.mp4 etc etc

    So the ChangeVideoScene action can work.

    Now, just call a scene. no need to stop or pause the video player.

    Hope it helps!
    Tuur *thumbsup*

  • Hi Tuur,

    Thanks so much for your help. I really appreciate it!

    One thing, though. when I implement the second example code, I receive an error when I click the many option for the second scene;


    INFO: krpano 1.18.5 (build 2015-08-04)
    INFO: HTML5/Desktop - Safari 9.1 - WebGL
    ERROR: loading of calc:'video/null-2k-poster.jpg' failed!
    ERROR: video/null-2k.mp4 - loading video failed!

    I receive the same error when I use the full file name and root, too.


    Code
    <action name="videointerface_avenue_view">	 set(plugin[video].posterurl, calc:'video/union-2k-poster.jpg');	 plugin[video].playvideo(video/union-2k.mp4|video/union-2k.webm);	
    	 </action>


    I'm using a tour skin video interface template. I'm trying to link between scenes from the select view menu from the interface bar. Am I totally in the wrong direction?

    Many thanks, again,

    Ronandl

  • Hi,

    please put the %1 's back in the ChangeVideoScene action.
    Those will be replaced by the first 'argument' between the brackets from the ChangeVideoScene(); call
    In this case that should be 'union'.

    Call ChangeVideoScene(union); in the onstart of the scene.
    In the ChangeVideoScene action the %1 will be automatically replaced with union.
    With another scene you can call another video like: ChangeVideoScene(anothervideoname);

    ( http://www.krpano.com/forum/wbb/inde…d&threadID=2677 )

    and then just use loadscene.
    I find it very convenient.

    **
    In your example you made a mistake.. because there is nothing to calc.
    So your line should be:

    set(plugin[video].posterurl, video/union-2k-poster.jpg);
    But then you need to call just videointerface_avenue_view(); in the onstart of the scene.
    Then it should work, when the video is in the video folder / the path is ok.


    Hope it helps!

    Tuur *thumbsup*

  • I'm trying to create a tour with multiple 360 video scenes. I'd like to create a scene menu similar to this example from the examples page

    https://krpano.com/examples/119/k…-corfu/tour.xml.

    PanoVideo Creator allows to create this menu in video tours. Simply select option"include preview navigation"
    As well as it allows to create html-style menu navigation. And many other functions.
    You can see how it works in this video
    https://www.youtube.com/watch?v=u3myANAcKkg

  • Hi Tuur;

    I'm having a similar problem loading multiple video scenes into a WebVR example.

    A version of my code is here:
    http://www.moreyummy.com/wp-content/test/examples/webvr/


    Works fine on desktops, but the video won't load new "Panoramic Video" scenes on iOS. I suspect this is because I can't seem to set the variables 'videourl.ios' and 'videourl.no-ios' in the "video" plugin. But honestly, I'm not sure.

    The XML file is here:
    http://www.moreyummy.com/wp-content/tes…r/krpano_vr.xml

    Here's a code sample for the two thumbnails calling the videos ...

    Code
    <scene name="video_scene" title=""  onstart="ChangeVideoScene(video);" >		<view hlookat="0" vlookat="0" fov="90" fovmin="60" fovmax="110" limitview="on" />		<image>		  <sphere url="plugin:video" />    	</image>	</scene>			<scene name="video_scene2" title=""  onstart="ChangeVideoScene(video-orig);" >		<view hlookat="0" vlookat="0" fov="90" fovmin="60" fovmax="110" limitview="on" />		<image>		  <sphere url="plugin:video" />    	</image>	</scene>		<action name="ChangeVideoScene" devices="desktop"> 				set(plugin[video].videourl.no-ios, calc:examples/webvr/%1/video-1920x960.mp4|%1/video-1920x960.webm);		set(plugin[video].videourl.ios, calc:examples/webvr/%1/video-1024x512.mp4);		plugin[video].playvideo(examples/webvr/%1/video-1920x960.mp4|examples/webvr/%1/video-1920x960.webm, examples/webvr/%1/video-1024x512.mp4);			</action>


    I'd appreciate it if someone might know what's going wrong on iOS.

    Thank you.

Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!