You are not logged in.

Dear visitor, welcome to krpano.com Forum. If this is your first visit here, please read the Help. It explains in detail how this page works. To use all features of this page, you should consider registering. Please use the registration form, to register here or read more information about the registration process. If you are already registered, please login here.

1

Wednesday, December 4th 2019, 7:50pm

onvideocomplete after 360 Video does nothing

I'm trying to add a 360 video as an option in a virtual tour, where the user selects it from a menu to take a guided linear tour. When they finish watching it, I want to take them back to the main menu scene. It works fine, but onvideocomplete doesn't seem to be working. The screen goes black when the video finishes, and nothing else happens. For some reason it doesn't seem like onvideocomplete is firing. My code for this scene is below. Is there a better way for me to go about doing this? I just want it to load scene scene_SFS_00 when the 360 video is finished playing.

Source code

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
<scene name="videopano" title="Store Tour" isvideopano="true">

<view hlookat="0" vlookat="0" fovtype="DFOV" fov="130" fovmin="75" fovmax="150" distortion="0.0" />

<image><sphere url="plugin:video" /></image>

<plugin name="video" 
url.html5="plugins/videoplayer.js"
url.flash="plugins/videoplayer.swf"
videourl="video/intro_1920.mp4"
posterurl="video/intro_1920_poster.jpg"
align="center" x="0" y="0"
pausedonstart="false"
loop="false"
volume="1.0"
onvideoready="skin_showloading(false);"
onvideocomplete="loadscene(scene_SFS_00, null, BLEND(0.2));"
/>			
</scene>

This post has been edited 1 times, last edit by "360labs" (Dec 4th 2019, 9:09pm) with the following reason: code formatting


2

Wednesday, December 4th 2019, 11:07pm

I found the solution to this, I figure I might leave this here for anyone else having this problem. There's an "onvideocomplete" event baked in to the vtourskin.xml. If you are basing your own skin on the standard XML, you can go in and comment out that line. Look for onvideocomplete in vtourskin.xml. I didn't need it for anything else, so commenting out this line didn't hurt anything. Once I did that, my onvideocomplete event in tour.xml was behaving as expected.