JQuery-based music stream playback list and jquery music stream playback

Source: Internet
Author: User

JQuery-based music stream playback list and jquery music stream playback

This article shares with you the list of music playback auditions implemented by jQuery, which can be used to play, pause, and automatically obtain the audio path. The details are as follows:

1.html File

<! DOCTYPE html> 

2. run. js

//// @ Author FUCMLIF // @ date 2016/4/6 // jQuery (". user_doplay "). click (function () {var x = document. getElementById ("myAudio"); if (x. paused) {jQuery (". user_doplay "). find ('img '). attr ('src', 'HTTP: // www.bkjia.com/uploads/allianz 160379/00445935d-2.png'); jQuery (this ). find ('img '). attr ('src', 'HTTP: // sandbox.runjs.cn/uploads/rs/#/shsay?v/stop.png'); jQuery (this ). attr ("name", "playing"); x. play (); // play} else if (x. play & jQuery (this ). attr ("name") = "stoped") {jQuery ('# myAudio '). attr ('src', jQuery (this ). attr ('id') + 'audience'); // modify the audio path jQuery (". user_doplay "). find ('img '). attr ('src', 'HTTP: // www.bkjia.com/uploads/allianz 160379/00445935d-2.png'); jQuery (this ). find ('img '). attr ('src', 'HTTP: // sandbox.runjs.cn/uploads/rs/#/shsay?v/stop.png'); jQuery ("# play_list_ol "). find ('A '). attr ('name', 'stoped'); jQuery (this ). attr ("name", "playing"); x. play (); // play} else if (x. play & jQuery (this ). attr ("name") = "playing") {jQuery (this ). find ('img '). attr ('src', 'HTTP: // www.bkjia.com/uploads/allianz 160379/00445935d-2.png'); jQuery ("# play_list_ol "). find ('A '). attr ('name', 'stoped'); x. pause (); // pause} else {alert ("this prompt should not appear ");}});

The above is all the content of this article, hoping to help you learn.

Articles you may be interested in:
  • JQuery + JSON + jPlayer example of QQ space music query function
  • How jquery controls the background music switch and automatic playing of the prompt sound
  • Code for implementing the music player (html5 + css3 + jquery)
  • JQuery implements QQ-like music code sharing for big turntable lottery activity
  • Use jQuery to design a simple web music player instance for sharing

Related Article

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.