How to play an audio track without using "controls" |
How to play an audio track without using "controls" |
giomach |
Jun 19 2021, 12:07 PM
Post
#1
|
Group: Members Posts: 2 Joined: 19-June 21 Member No.: 27,985 |
I have an audio file (mp3), and I want to allow the web user to choose to play a section (track) of it.
I could split the audio file into many separate files, but I have begun to look at the <track> sub-element of the <audio> element of HTML5. Many webpages tell us how to formulate this element, eg. to give the start time of each track in a .vtt file, and that is fine. But I don't want "controls", I want to display a list of tracks, and let the user decide which track to play, and click an icon to play it. It must be blindingly obvious how to do this, but I can't find the HTML statement to start up a numbered track. Thanks for any hints. |
Christian J |
Jan 26 2022, 08:15 PM
Post
#2
|
. Group: WDG Moderators Posts: 9,661 Joined: 10-August 06 Member No.: 7 |
Now you confused me, did you mean "toggle"?
I can make the script change the link text when it's clicked if I have to. |
pandy |
Jan 26 2022, 11:03 PM
Post
#3
|
🌟Computer says no🌟 Group: WDG Moderators Posts: 20,733 Joined: 9-August 06 Member No.: 6 |
Sorry, I just skimmed and didn't see state was a variable you created. I mistook it for an audio property. I see now when you did.
|
Lo-Fi Version | Time is now: 28th April 2024 - 08:01 AM |