Issue with Automatically Returning to another Scene at the End of a Videopano

  • Hello everyone,

    I'm working on a krpano project where I have a main scene acting as a menu with various buttons leading to different videopanos. My goal is to make the system automatically return to the main menu when reaching the end of a videopano.

    Currently, I've implemented a solution by adding a hotspot at the end of the videopano with the following parameters:

    <hotspot name="volver_menu_final_escena" distorted="true" visible="false" url="recursos/mapa.png" alpha="0" scale="1" scale.mobile="1" hlookat="0" vlookat="0" fov="120"  onover.addevent="volverMenuLoaded();" onhover.addevent="volverMenuLoaded();" onclick="volverMenuLoaded();" />


    <action name="volverMenuLoaded">

    vr_menu_loadhome();

    ocultar_titulo();

    </action>

    This solution works fine on computers and VR headsets, but I'm facing difficulties making it effective on mobile devices.

    Does anyone have any ideas or suggestions on how to make this functionality work seamlessly on mobile devices as well?

    I appreciate any help or guidance you can provide. Thank you!

  • Marmirgra January 16, 2024 at 10:10 PM

    Changed the title of the thread from “Issue with Automatically Returning to Main Menu at the End of a Videopano” to “Issue with Automatically Returning to another Scene at the End of a Videopano”.
  • Hello,

    Not sure this would be the smarter way but perhaps you could save time and coding by using the "onvideocomplete", https://krpano.com/plugins/videoplayer/

    Hope this helps :)

    "Thank you very much! I just solved it in a different way, as I was trying to add onvideocomplete="" within the video plugin, calling the action to return to the starting scene, but it wasn't working. In the end, it was resolved with the following action that runs at the beginning of the panoramic video scene:

    <action name="mariecurie">

    callwhen(plugin[video].time GT 045, vr_menu_loadhome(););

                </action>

    Where vr_menu_loadhome(); is the action to return to the main scene.

    I'm sharing the solution here in case it can be helpful to someone else."

Participate now!

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