![]() |
![]() |
giomach |
![]()
Post
#1
|
Group: Members Posts: 4 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. |
![]() ![]() |
fspade |
![]()
Post
#2
|
Group: Members Posts: 8 Joined: 22-January 22 Member No.: 28,234 ![]() |
Pandy,
you are my hero! That is exactly what I dreamt of. I owe you at least a coffee. Contact me when you come near. Keep up the good work and stay healthy and happy! Frank |
pandy |
![]()
Post
#3
|
🌟Computer says no🌟 ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Group: WDG Moderators Posts: 20,744 Joined: 9-August 06 Member No.: 6 ![]() |
And you thought it wouldn't help.
![]() ![]() I want to explain the link. That you also have the URL to the sound file in the href combined with the return false after that function call, makes it work either JS is available or not. If it is available the return false kills the link event. Without it the link would be followed and you would get what you originally had. But if JS is not available the link will be followed and the user will at least hear the sound, even if it will load a s a new page. |
pandy |
![]()
Post
#4
|
🌟Computer says no🌟 ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Group: WDG Moderators Posts: 20,744 Joined: 9-August 06 Member No.: 6 ![]() |
There is a JS property called audioTracks. Don't know if it used as the name suggests, but worth looking into, I guess. There also is a HTML element called TRACK. I don't really know much about audio. Maybe Christian knows more.
But I didn't think mp3 supported tracks? |
Christian J |
![]()
Post
#5
|
. ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Group: WDG Moderators Posts: 9,690 Joined: 10-August 06 Member No.: 7 ![]() |
|
![]() ![]() |
![]() |
Lo-Fi Version | Time is now: 25th June 2024 - 09:20 PM |