onvideo functions

  • Hi, I'm new to KRPano and XML.

    I have a videoplayer plugin, and I want to have hotspots appear a few seconds into the video. To do that, I want to set onvideoplay to an action I have written called "vidplay." I have used set(plugin[video].onvideoplay, vidplay(); ); to set onvideoplay successfully to vidplay, but it requires the user to select a custom play button that I've made in VR mode. In 2D mode, the user presses the normal play button, and the hotspots don't appear. I don't want to set it after pressing a button, I want it to be set right after the video loads.

    I've tried onvideoplay="vidplay();" and onloaded="set(plugin[video].onvideoplay, vidplay(); );" within the plugin section. I also tried moving vidplay from outside to inside the scene and calling set(plugin[video].onvideoplay, vidplay(); ); in various places onstart. I still can't get onloaded, onvideoplay, or onvideocomplete to respond. Should I do something differently? Or is there a different place to call set(plugin[video].onvideoplay, vidplay(); ); so that it is set before any user interaction?

    Thank you,

    Ethan

    edit: I fixed it by creating an event right under the plugin:


    <events name="setvid"
    onloadcomplete="set(plugin[video].onvideoplay, vidplay(); );
    set(plugin[video].onvideocomplete, complete(); );"
    />

    Einmal editiert, zuletzt von youshow (13. Juni 2023 um 18:16)

Jetzt mitmachen!

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