Supports responsive HTML5 audio player-audioplayer. js for touch devices

Source: Internet
Author: User

Date: 2013-5-22 Source: gbin1.com

Online Demo

If you want to develop a responsive HTML5 player,Audioplayer. jsIs a good choice. It uses the HTML5 audio tag to help you generate a responsive audio player without using any embed code, images, or flash. It uses CSS to define the interface completely. The size after compression is only 4 kb.

Main features
  • Responsive
  • Touch
  • Adaptive
  • HTML5 audio local support
  • Ease of use.
  • No Image
  • No flash
  • Lightweight, 4 kb after compression
How to Use

Html

    <audio preload="auto" controls>    <source src="audio.wav" />    <source src="audio.mp3" />    <source src="audio.ogg" />    </audio>

Javascript

    <script src="jquery.js"></script>    <script src="audioplayer.js"></script>    <script>    $( function()    {    $( 'audio' ).audioPlayer();    });    </script>

Is it very simple? After the plug-in is called, the audio tag will be parsed into the following HTML elements:

    <div class="audioplayer audioplayer-stopped">    <audio src="audio.wav" preload="auto" controls></audio>    <div class="audioplayer-playpause" title="Play"><a href="#">Play</a></div>    <div class="audioplayer-time audioplayer-time-current">00:00</div>    <div class="audioplayer-bar">    <div class="audioplayer-bar-loaded"></div>    <div class="audioplayer-bar-played"></div>    </div>    <div class="audioplayer-time audioplayer-time-duration">&hellip;</div>    <div class="audioplayer-volume">    <div class="audioplayer-volume-button" title="Volume"><a href="#">Volume</a></div>    <div class="audioplayer-volume-adjust"><div><div></div></div></div>    </div>    </div>

I hope you will like this audio plug-in.

Friendly reminder: Because this online demonstration does not contain music in the wave format, ie is not supported. Please use Firefox and chrome to play music.

Source: supports responsive HTML5 audio player-audioplayer. js for touch devices

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.