Start scene as autoplay video, then switch to still image in same lookat

  • Hi Guys

    I have a video as my 1st scene and the plugin tag looks like so:


    So a few things.

    1) I can't get it to autoplay, no matter what I do. (This should also autoplay on mobile by the way)
    The onvideoready doesnt do anything and doesnt play it when its ready for example. But I shouldnt need it, it should just play.
    This example does autoplay, but I cant get mine to autoplay:
    https://krpano.com/plugins/videoplayer/source/example.html


    2) Then next, if I click on the video, then it plays. I had to in the vtourskin.xml comment out the "onvideocomplete" event, otherwise mine above did not work.

    3) When it loads my new scene after the video ends, I want the lookat to be the same as whatever the angle was the video was turned to, and not reset to the default hlookat="0.0" vlookat="0.0"

    Any comments would be greatly appreciated

  • Hi,

    1 - if autoplay is allowed depends on the browser. Typically at last a user-interaction like a click or touch is required to start playing the video. krpano will automatically wait for the first touch/click when necessary.

    2 - the vtourskin.xml has a build-in video support (see the 'skin_video_addcontrols' action there) and assigns the video event to own ones for the video-UI control.

    You could try adding your event using .addevent - e.g.:
    onvideocomplete.addevent="..."

    3 - use the KEEPVIEW or KEEPMOVING flags at the loadscene call.

    Best regards,
    Klaus

  • 3) so then for my loadscene, instead of this:

    Code
    onvideocomplete="loadscene(scene_2K_0050,null,KEEPBASE|NOPREVIEW,BLEND(2))

    I can just add keepview and add it like so:

    Code
    onvideocomplete="loadscene(scene_2K_0050,null,,KEEPVIEW,KEEPBASE|NOPREVIEW,BLEND(2))

    Then in my "scene_2K_0050" scen, do I remove the h and v lookat's that are currently set to 0, or the keepview from the previous one will overwrite this?


    What if I do things the other way around and have the still image pano as the start scene, then via hotspot click to play the 360 pano scene. In that case can I autoplay the video scene, or again I will need to click twice? One time to click the hotspot, then when the scene loaded, I need to click again to play the video?

Jetzt mitmachen!

Sie haben noch kein Benutzerkonto auf unserer Seite? Registrieren Sie sich kostenlos und nehmen Sie an unserer Community teil!