Sie sind nicht angemeldet.

Lieber Besucher, herzlich willkommen bei: krpano.com Forum. Falls dies Ihr erster Besuch auf dieser Seite ist, lesen Sie sich bitte die Hilfe durch. Dort wird Ihnen die Bedienung dieser Seite näher erläutert. Darüber hinaus sollten Sie sich registrieren, um alle Funktionen dieser Seite nutzen zu können. Benutzen Sie das Registrierungsformular, um sich zu registrieren oder informieren Sie sich ausführlich über den Registrierungsvorgang. Falls Sie sich bereits zu einem früheren Zeitpunkt registriert haben, können Sie sich hier anmelden.

1

Montag, 12. Juni 2023, 16:33

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(); );"
/>

Dieser Beitrag wurde bereits 1 mal editiert, zuletzt von »youshow« (13. Juni 2023, 18:16)