Note: After your toggle, it will restart from the beginning because the is already deleted and the element will play as normal now. index.jsīrowser = () īackgroundAudio = setInterval(function(), 120000) // 120000 is the duration of your audio which in this case 2 mins.Īlso if you have a toggle event for your audio make sure to remove the created element for audio. autoplay: This feature is used for audio to start audio clip when page load. After using this feature, we can pause or play music, high or low music. There are some attribute of this audio tag: controls: This feature is used for audio be visible the controls on the web pages. It seems that audio auto-play is working so we don't need the element because it will create double audio running. To load the audio in the web page, we use the
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |