We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 32347
    • 143 Posts
    Hello,

    Need some help on building a way that the user can add an audio file and player to a page for themselves. If someone can help get started in the right direction on the best way to handle this issue.

    Thanks
      • 36561
      • 38 Posts
      Assuming, you would want to add one audio file per page:

      Download Audio JS from here:
      http://kolber.github.com/audiojs/


      Put the files in /assets/js/audiojs/

      Create a media source that points to the directory where the audio files are stored
      Create a TV audio-file with input option: file and output option: default and choose the created media source

      For the player you could create a chunk with the following code:
      <div class="style-and-fill-as-you-see-fit">
      <audio src="[[*audio-file]]" preload="auto" />
      </div>
      



      Add this to your page header:
      <script src="/assets/js/audiojs/audio.min.js"></script>
      <script>
        audiojs.events.ready(function() {
          var as = audiojs.createAll();
        });
      </script>