I'm trying to accomplish the following:
Onclick play video.
When the video is 2 seconds from ending, load a new panorama.
The parts I'm having issue with is first; "getting" the totaltime of the video, and second; getting the time ( current play position ) of the video into variables that I can access at a global level.
If I get the first half resolved I'm sure the second will snap into place in my head.
When I set the video plugin ( named "trans" ) onvideoready event to: onvideoready="gettranstime();" ………
….. referencing the action ……
<action name="gettranstime">
showlog(true);
set(mytime,get(plugin[trans].totaltime));
trace('video time=',get(mytime));
</action>
…. total time is "got" and the value traces as expected.
What I'd like to be able to do here is set the video plugin ( named "trans" ) onvideoready event to: onvideoready="set(mytime,get(plugin[trans].totaltime));"
and be able to access the variable "mytime" like….
<action name="gettranstime">
showlog(true);
trace('video time=',get(mytime));
</action>
….but the "mytime" variable does not seem to resolve this way ( meaning the code "set(mytime,get(plugin[trans].totaltime));" is not within the <action> ) and the value NULL is traced.
So basically what I need to have happen is when a video is "ready" the total time is "got" and is stored in a globally accessible variable.
Do I not understand some core concepts here?
Is "my time" truly being set as a "Global" variable?
TIA for any input.