Home JS special effects jQuery effects jQuery MPlayer website music player plug-in

jQuery MPlayer website music player plug-in

jQuery MPlayer website music player plug-in

jQuery MPlayer website music player plug-in

This is a red festive music player code for the 2017 Chinese New Year version. Download the jQuery MPlayer website music player plug-in. Note: The demonstration effect is hidden in the lower left corner, don’t think there is no demonstration!

js code
<script src="js/jquery-2.1.1.js"></script>
<script src="js/mplayer.js"></script>
<script src="js/mplayer-list.js"></script>
<script src="js/mplayer-functions.js"></script>
<script src="js/jquery.nstSlider.min.js"></script>
<script>
var modeText = ['Sequential play', 'Single loop', 'Shuffle play', 'List loop'];
var player = new MPlayer({
//Container selector name
containerSelector: '.mp',
// playlist
songList: mplayer_song,
//The picture displayed when the album picture is wrong
defaultImg: 'img/mplayer_error.png',
//Auto play
autoPlay: true,
// Play mode (0->sequential playback, 1->single loop, 2->random play, 3->list loop (default))
playMode:0,
playList:0,
playSong:0,
//The distance between the current lyrics and the top
lrcTopPos: 34,
// List template, use ${variable name}$ to insert template variables
listFormat: '<tr><td>${name}$</td><td>${singer}$</td><td>${time}$</td>< ;/tr>',
//Volume slider change event name
volSlideEventName:'change',
//Initial volume
defaultVolume:80
}, function () {
//Bind event
this.on('afterInit', function () {
console.log('Player initialization completed and preparing to play');
}).on('beforePlay', function () {
var $this = this;
var song = $this.getCurrentSong(true);
var songName = song.name + ' - ' + song.singer;
console.log('About to play'+songName+', return false; Cancel playback');
}).on('timeUpdate', function () {
var $this = this;
console.log('Current lyrics: ' + $this.getLrc());
}).on('end', function () {
var $this = this;
var song = $this.getCurrentSong(true);
var songName = song.name + ' - ' + song.singer;
console.log(songName+'Playing is completed, return false; you can cancel playing the next song');
}).on('mute', function () {
var status = this.getIsMuted() ? 'Mute' : 'Not muted';
console.log('Current mute status: ' + status);
}).on('changeMode', function () {
var $this = this;
var mode = modeText[$this.getPlayMode()];
$this.dom.container.find('.mp-mode').attr('title',mode);
console.log('Playback mode has been switched to: ' + mode);
});
});

$(document.body).append(player.audio); // For testing

setEffects(player);

</script>
Disclaimer

All resources on this site are contributed by netizens or reprinted by major download sites. Please check the integrity of the software yourself! All resources on this site are for learning reference only. Please do not use them for commercial purposes. Otherwise, you will be responsible for all consequences! If there is any infringement, please contact us to delete it. Contact information: admin@php.cn

Related Article

CSS3 JQUERY page scrolling effect code_html/css_WEB-ITnose CSS3 JQUERY page scrolling effect code_html/css_WEB-ITnose

24 Jun 2016

CSS3 JQUERY page scrolling effects code

58 jQuery simulated CSS3 transition page switching effects_html/css_WEB-ITnose 58 jQuery simulated CSS3 transition page switching effects_html/css_WEB-ITnose

24 Jun 2016

58 jQuery simulated CSS3 transition page switching effects

jquery waterfall flow LightBox picture box special effects jquery waterfall flow LightBox picture box special effects

06 Jul 2016

jquery waterfall flow LightBox picture box special effects

How to Maintain jQuery Mouseover Effects in ASP.NET UpdatePanels? How to Maintain jQuery Mouseover Effects in ASP.NET UpdatePanels?

03 Dec 2024

jQuery $(document).ready and UpdatePanels: A Refined LookWhen utilizing jQuery to apply mouseover effects to elements within an UpdatePanel, the...

How Can I Dynamically Modify Text on Mouseover using jQuery? How Can I Dynamically Modify Text on Mouseover using jQuery?

13 Nov 2024

jQuery: Dynamically Modifying Text with Mouseover EventsWhen interacting with elements on a web page, adding subtle effects can enhance user...

How to Simulate Hover Effects on Touchscreens Using Long Press? How to Simulate Hover Effects on Touchscreens Using Long Press?

22 Oct 2024

To replicate hover effects on touch-enabled devices, this article proposes a technique using a combination of CSS and JavaScript. It demonstrates how to add hover effects to elements on touchstart and touchend events using jQuery, and how to style th

CSS3 input box shadow effect and other shadow effects_html/css_WEB-ITnose CSS3 input box shadow effect and other shadow effects_html/css_WEB-ITnose

24 Jun 2016

CSS3 input box shadow effects and other shadow effects

Can\'t Fade Background Image in jQuery? Unlock the Solution Can\'t Fade Background Image in jQuery? Unlock the Solution

23 Oct 2024

jQuery doesn't natively fade background images. This article presents a workaround using hidden tags with absolute positioning and negative z-index to mimic background behavior, allowing for fading effects on background images.

61 web page special effects, very fashionable and with good visual effects_html/css_WEB-ITnose 61 web page special effects, very fashionable and with good visual effects_html/css_WEB-ITnose

24 Jun 2016

61 web page special effects that are very fashionable and have great visual effects

See all articles See all articles

Hot Tools

jQuery2019 Valentine's Day Confession Fireworks Animation Special Effects

jQuery2019 Valentine's Day Confession Fireworks Animation Special Effects

A very popular jQuery Valentine's Day confession fireworks animation special effect on Douyin, suitable for programmers and technical geeks to express their love to the girl they love. No matter you choose to be willing or not, you have to agree in the end.

layui responsive animated login interface template

layui responsive animated login interface template

layui responsive animated login interface template

520 Valentine's Day confession web animation special effects

520 Valentine's Day confession web animation special effects

jQuery Valentine's Day Confession Animation, 520 Confession Background Animation

Cool system login page

Cool system login page

Cool system login page

HTML5 tape music player-CASSETTE PLAYER

HTML5 tape music player-CASSETTE PLAYER

HTML5 tape music player-CASSETTE PLAYER