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.

Jetzt mitmachen!

Sie haben noch kein Benutzerkonto auf unserer Seite? Registrieren Sie sich kostenlos und nehmen Sie an unserer Community teil!