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

Thursday, July 4th 2019, 9:36am

base the view point to set the video play or pause

When I rotate the scene , the videos on current view will play, and other videos will pause, How can I write the code ? *squint* *squint*



<events name="hotspots_visibility" keep="true" onviewchanged="adapt_hortspots_visiblity();"/>

<action name="adapt_hortspots_visiblity">
for(set(i,0), i LT hotspot.count, inc(i),getlooktodistance(d, hotspot[get(i)].ath, hotspot[get(i)].atv);
if(d LT 30,showhotspot(get(i) );,fadehotspot(get(i), 0.5, 0.5););
);
</action>

<action name="showhotspot">
if(hotspot[%1].ishighlighted != true,set(hotspot[%1].isvisible, true);tween(hotspot[%1].alpha, 1, 1););
</action>

<action name="fadehotspot">
set(hotspot[%1].isvisible, false);tween(hotspot[%1].alpha, 0.1, 0.5);
</action>






<hotspot name="video1"
style="video_hotspot_style"
pausedonstart="false"
videourl.desktop="%SWFPATH%/video/video1.mp4"
videourl.mobile="%SWFPATH%/video/video1.mp4"
visible="false"
onvideoready="set(hotspot[video1].visible, true)"
onloaded="calc_pos_from_hfov_yaw_pitch_roll(20, -118.39, -7.0409, -11.8046);"
/>




<hotspot name="video3"
style="video_hotspot_style"
pausedonstart="false"
videourl.desktop="%SWFPATH%/video/video3.mp4"
videourl.mobile="%SWFPATH%/video/video3.mp4"
visible="false"
onvideoready="set(hotspot[video3].visible, true)"
onloaded="calc_pos_from_hfov_yaw_pitch_roll(23, 128.052, -5.9328, 9.9464);"
/>