Announcement

Collapse
No announcement yet.

Html5 Audio Player

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Html5 Audio Player

    When adding an html5 audio player to SellerDeck, SD does not add the usual 'acatalog' to the source files on the home page.

    You need to put a blockif and have different source locations for home page and not home page: thus:

    Code:
    <button class="playpause" type="button" onclick="aud_play_pause()"><img src="playpause15.png" style="vertical-align:middle;" />&nbsp;audio</button>
    
    <script>
    function aud_play_pause() {
      var myAudio = document.getElementById("myTune");
      if (myAudio.paused) {
        myAudio.play();
      } else {
        myAudio.pause();
      }
    }
    </script>
    
    <audio autoplay loop id="myTune">
    <actinic:block if="%3cactinic%3avariable%20name%3d%22IsBrochureHomePage%22%20%2f%3e%20%3d%3d%20false">
    <source src="audiofile.ogg" type="audio/ogg">
    <source src="audiofile.mp3" type="audio/mpeg">
    </actinic:block>  
    <actinic:block if="%3cactinic%3avariable%20name%3d%22IsBrochureHomePage%22%20%2f%3e%20%3d%3d%20true">
    <source src="acatalog/audiofile.ogg" type="audio/ogg">
    <source src="acatalog/audiofile.mp3" type="audio/mpeg">
    </actinic:block>
      Your browser does not support the audio element.
    </audio>
    Here is the image:
    Jonathan Chappell
    Website Designer
    SellerDeck Website Designer
    Actinic to SellerDeck upgrades
    Graphicz Limited - www.graphicz.co.uk
Working...
X