You are not logged in.

1

Saturday, February 2nd 2013, 2:08pm

background sound on tablet and desktop problem

Hi, I'm trying to add background music to my vtour, I found the solution to make it play on the desktop and on the tablet, but with some problem..

This is the code that work fine only on tablet:
<!-- load the soundinterface plugin -->
<plugin name="soundinterface"
url="plugins/soundinterface.swf"
alturl="plugins/soundinterface.js"
rootpath=""
preload="true"
keep="true"
/>

<!-- button to pause the sound: -->
<plugin name="snd" url="skin/JP_soundonoff.png" align="lefttop" x="10" y="10" alpha="0.25" scale="0.5" onover="tween(alpha,1);" onout="tween(alpha,0.25);"
crop="0|0|50|50"
onloaded="if(ismobile,set(scale,1));"
onclick="pausesoundtoggle(bgsnd); switch(crop, 0|0|50|50, 0|50|50|50);"
keep="true"
/>

<!-- start playing the sound -->
<events name="currentpano"
onnewpano="playsound(bgsnd,'sound/loop-india.ogg|sound/loop-india.mp3', 0);"
onremovepano="stopsound(bgsnd);"
/>

<scene name="scene_libraccio" title="libraccio" onstart="" thumburl="panos/libraccio.tiles/thumb.jpg" lat="" lng="" heading="">

This is the code that work on desktop and tablet (but the music on tablet start only when i touch the tablet screen):
<!-- load the soundinterface plugin -->
<plugin name="soundinterface"
url="plugins/soundinterface.swf"
alturl="plugins/soundinterface.js"
rootpath=""
preload="true"
keep="true"
/>

<!-- button to pause the sound: -->
<plugin name="snd" url="skin/JP_soundonoff.png" align="lefttop" x="10" y="10" alpha="0.25" scale="0.5" onover="tween(alpha,1);" onout="tween(alpha,0.25);"
crop="0|0|50|50"
onloaded="if(ismobile,set(scale,1));"
onclick="pausesoundtoggle(bgsnd); switch(crop, 0|0|50|50, 0|50|50|50);"
keep="true"
/>

<scene name="scene_libraccio" title="libraccio" onstart="playsound(bgsnd,'sound/loop-india.ogg|sound/loop-india.mp3', 0);" thumburl="panos/libraccio.tiles/thumb.jpg" lat="" lng="" heading="">


What can I do to fix the problem on tablet or desktop?
Thanks.

mstoss

Intermediate

Posts: 287

Location: Berlin

  • Send private message

2

Tuesday, February 5th 2013, 11:59am

This is the code that work on desktop and tablet (but the music on tablet start only when i touch the tablet screen):
That is not a bug, its a feature... No autostart on iPad, read more about it in the plugin documentation

http://krpano.com/plugins/soundinterface/#html5

3

Saturday, November 25th 2017, 3:10pm

That is not a bug, its a feature... No autostart on iPad, read more about it in the plugin documentation
but if you run on mobile, then the values of buttons One and Off change. How to solve this problem?