![]() var position = 0 // Store position of audio currently playing var audioList // Store array list of audios to be played var audio // Store reference to the element window. Tip: Related events that occurs when there is some kind. This can happen when the download has completed, or because it has been paused for some reason. This event occurs when the loading of the media is suspended (prevented from continuing). This continues for other audio files until we complete all the audio files and then again start from beginning if required. The suspend event occurs when the browser is intentionally not getting media data. We play our first audio file, and then wait or listen for the " ended" event and as soon as it is fired, we change the " src" attribute of element to our next audio file and call the " load" method to load the file and then call " play" event to play the next audio. You need to set src attribute to identify the media source and include a controls attribute so the user can play and pause the media. ![]()
0 Comments
Leave a Reply. |