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

Sunday, November 24th 2019, 5:40pm

Set videourl at runtime - play() not working

Hello,I have a panorama video and I need to set the videourl at runtime because of different videos for each language.

I do it like this:

Source code

1
2
3
4
<action name="set_panovideo_url" scope="local"> 
txtadd(panovideourl, %VIEWER%/videos/, get(language), /, get(hotspot[get(%1)].id), .mp4);		
set(hotspot[get(%1)].videourl, get(panovideourl));
</action>

So far it works but now the video is supposed to toggle play and pause
everytime the user clicks on it but I can't call play(). The video
doesn't start. I have to call playvideo(videourl). But this means I
can't pause it and play it from where it was before. It always starts
from the beginning:

Source code

1
2
copy(videospot_id, caller.id);
hotspot[get(videospot_id)].playvideo(get(hotspot[get(videospot_id)].videourl)));



I know I can also pass a time in playvideo(). I tried it by getting the
current time of the video before I call playvideo() but then it always
takes a few seconds before it starts again.

Why can't I just call play() when I set the "videourl" at runtime?

Thanks