I'm playing a video using the video plugin without sound to be able to directly play the video in iOS. For the sound I'm using the soundinterface plugin.
The problem is the sound does not stop when I'm calling removepano('pano') and using in the XML file:
Code
<events name="currentpano" onnewpano="playsound(bgsnd, 'assets/sound.mp3', 0);" onremovepano="stopsound(bgsnd);"/>
The full xml file content:
Code
<krpano>
<plugin name="gyro" devices="html5"
url="plugins/gyro2.js"
enabled="true"
camroll="true"
friction="0.0"
touch_mode="full"
sensor_mode="1"
softstart="0.5"
autocalibration="false"
onavailable=""
onunavailable=""
onenable=""
ondisable=""
mute="true"
/>
<plugin name="soundinterface"
url.flash="plugins/soundinterface.swf"
url.html5="plugins/soundinterface.js"
preload="true"
rootpath=""
volume="1.0"
/>
<!-- start playing the sound -->
<events name="currentpano"
onnewpano="playsound(bgsnd, 'assets/sound.mp3', 0);"
onremovepano="stopsound(bgsnd);"
/>
<!-- a button to pause/play the sound -->
<plugin name="snd" url="soundonoff.png" align="leftbottom" x="10" y="10" alpha="0.5" scale="0.5" onover="tween(alpha,1);" onout="tween(alpha,0.5);"
crop="0|0|50|50"
onclick="pausesoundtoggle(bgsnd); switch(crop, 0|0|50|50, 0|50|50|50);"
/>
<!-- pano -->
<!-- include the videoplayer plugin -->
<plugin name="video"
url.flash="plugins/videoplayer.swf"
url.html5="plugins/videoplayer.js"
videourl="assets/video.m4v|assets/video.webm"
panovideo="true"
loop="true"
/>
<!-- define the pano image and refer to the videoplayer plugin -->
<image>
<sphere url="plugin:video" />
</image>
<!-- view/fov settings -->
<view hlookat="0" vlookat="0" fovtype="VFOV" fov="90" fovmin="30" fovmax="150" />
</krpano>
Display More
I've updated to krpano 1.19-pr14 (build 2017-12-01), krpano 1.19-pr14 Sound Interface Plugin (build 2017-12-01) and krpano 1.19-pr14 Videoplayer Plugin (build 2017-12-01).