Use of reference to calling object (this) using HTML5 audio and jQuery
问题 I'm creating my own HTML5 audio player capable of handling playlists. I have created a custom myPlaylist object with includes all play() , pause() , stop() and other needed functionality. This is all working correctly, but moreover, I need to be aware about when an audio file has ended in order to automatically start playing the next one. Here's the relevant parts of the code I'm using: function myPlaylist(){ var player = document.createElement('audio'); var audio = $(player).get(0); this