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