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, July 10th 2019, 8:56am

hotspot video

this is my video hotspot, and I want to control the pause or play by javascript


<hotspot name="video4"
style="video_hotspot_style"
pausedonstart="false"
videourl.desktop="%SWFPATH%/video/video4-no.mp4"
videourl.mobile="%SWFPATH%/video/video4-no.mp4"
visible="false"
onvideoready="set(hotspot[video4].visible, true)"
onloaded="calc_pos_from_hfov_yaw_pitch_roll(61, -37.8673, 0.9631, -0.5571);"
/>


it doesn't work as below:

krpano.set('hotspot[video4].pause', true) ; //

so, How can I set the config ?

2

Wednesday, July 10th 2019, 10:40am

set play/pause
hotspot[video4].pause();
hotspot[video4].play();
hotspot[video4].togglepause();

https://krpano.com/plugins/videoplayer/#pause

status (read only)
hotspot[video4].ispaused;

https://krpano.com/plugins/videoplayer/#ispaused

3

Thursday, July 11th 2019, 5:05am

hotspot[video4].ispaused
set play/pause
hotspot[video4].pause();
hotspot[video4].play();
hotspot[video4].togglepause();

https://krpano.com/plugins/videoplayer/#pause

status (read only)
hotspot[video4].ispaused;

https://krpano.com/plugins/videoplayer/#ispaused
Hello:


I use the code :



krpano.call(
'hotspot[video4].togglepause()'
)
console.log(krpano.get('hotspot[video4].ispaused'))

the hotspot video still can not pause , but I use console.log to print the status ,it show the right status : toggle between true and false

4

Thursday, July 11th 2019, 8:50am

krpano.call('hotspot[video4].togglepause();'); // should work!

krpano.trace(1,krpano.get('hotspot[video4].ispaused')); // krpano console

did you add the player ???

<hotspot name="video4"
url="plugins/videoplayer.js"
... />

5

Thursday, July 11th 2019, 9:12am

url="plugins/videoplayer.js"
yeah ,you are right ,I did not add the player.js, thank you for your help , and Do you know how to set the video the mute , I use the code: set(hotspot[video4].volumn, 0) , but it doesn't work

6

Thursday, July 11th 2019, 9:31am

yeah ,you are right ,I did not add the player.js, thank you for your help , and Do you know how to set the video the mute , I use the code: set(hotspot[video4].volumn, 0) , but it doesn't work
it works . *squint* *squint* *squint* *squint*

7

Thursday, July 11th 2019, 1:24pm

read the documentation, its all there ;)
klaus' docs are great!

https://krpano.com/plugins/videoplayer/#volume