Clean Audio Player jQuery - Download Clean Touch-friendly Audio Player With jQuery - AudioPlayer.js

Download Clean Touch-friendly Audio Player With jQuery – AudioPlayer.js

Posted on

This time I will share jQuery Plugin and tutorial about Clean Touch-friendly Audio Player With jQuery – AudioPlayer.js, hope it will help you in programming stack.

Clean Audio Player jQuery - Download Clean Touch-friendly Audio Player With jQuery - AudioPlayer.js
File Size: 6.22 KB
Views Total: 16304
Last Update:
Publish Date:
Official Website: Go to website
License: MIT
   

A lightweight and dead simple jQuery library to create minimal, clean, responsive, touch-friendly audio players from HTML5 <audio> tag.

This is a redesign version of the Responsive & Touch-Friendly jQuery Audio Player Plugin.

How to use it:

1. Embed an HTML5 auido file into the webpage.

1 <audio preload="auto" controls>
2   <source src="sample.mp3">
3 </audio>
4  
5 <audio src="audio.wav" preload="auto" controls autoplay loop></audio>
6  
7 ...<br type="_moz">

2. Import jQuery library and the jQuery AudioPlayer.js plugin’s files into the page.

1 <link rel="stylesheet" href="css/audioplayer.css">
3         integrity="sha384-q8i/X+965DzO0rT7abK41JStQIAqVgRVzpbzo5smXKp4YfRvH+8abtTE1Pi6jizo"
4         crossorigin="anonymous">
5 </script>
6 <script src="js/audioplayer.js"></script>

3. Call the plugin on the audio tag.

1 $(function() {
2   $('audio').audioPlayer();
3 });

4. That’s it. The result html:

01 <div class="audioplayer">
02   <audio preload="auto" controls style="width: 0px; height: 0px; visibility: hidden;">
03     <source src="example.mp3">
04   </audio>
05   <div class="audioplayer-playpause" title=""><a href="#"></a></div>
06   <div class="audioplayer-time audioplayer-time-current">00:00</div>
07   <div class="audioplayer-bar">
08     <div class="audioplayer-bar-loaded" style="width: 100%;"></div>
09     <div class="audioplayer-bar-played"></div>
10   </div>
11   <div class="audioplayer-time audioplayer-time-duration">00:56</div>
12   <div class="audioplayer-volume">
13     <div class="audioplayer-volume-button" title=""><a href="#"></a></div>
14     <div class="audioplayer-volume-adjust">
15       <div>
16         <div style="width: 100%;"></div>
17       </div>
18     </div>
19   </div>
20 </div>

5. Possible plugin options.

1 $('audio').audioPlayer({
2   classPrefix: 'audioplayer',
3   strPlay: '',
4   strPause: '',
5   strVolume: ''
6 });

This awesome jQuery plugin is developed by xiaochunjimmy. For more Advanced Usages, please check the demo page or visit the official website.

source : jquery.net