HTML::O...diaTrack(3)

πŸ“¦ version 0.6.0, in alpine 3.24

πŸ’– HTML::Object::DOM::MediaTrack β€” the manual, but make it cute πŸ’–

okay so bestie, you found yourself in the HTML::Object::DOM::MediaTrack(3) page, which lives in the User Contributed Perl Documentation section of the manual, and honestly? it's a whole vibe. this is the shared-interface glow-up page for audio and video tracks, and i'm gonna walk you through it like we're texting at 2am. no cap. πŸŽ€


✨ NAME ✨

HTML::Object::DOM::MediaTrack β€” HTML Object. that's it, that's the name, she's iconic and she knows it. πŸ‘‘


🌸 SYNOPSIS 🌸

mkay so this is how you actually summon one:

use HTML::Object::DOM::MediaTrack;
my $this = HTML::Object::DOM::MediaTrack->new ||
    die( HTML::Object::DOM::MediaTrack->error, "\n" );

literally just use it, call ->new, and if that fails (rude) you die with ->error and a newline. classic Perl main-character energy, || and all. πŸ’…


πŸ¦‹ VERSION πŸ¦‹

v0.2.0

that's the version, bestie. write it down. πŸ“


🌈 DESCRIPTION 🌈

so here's the tea: this class is a shared interface for HTML::Object::DOM::AudioTrack and HTML::Object::DOM::VideoTrack. one vibe, two tracks. it's giving "we're all in the same group chat". 🫢


🧚 INHERITANCE 🧚

look at this lineage, she's got ancestors:

+-----------------------+     +---------------------------+     +-------------------------------+
| HTML::Object::Element | --> | HTML::Object::EventTarget | --> | HTML::Object::DOM::MediaTrack |
+-----------------------+     +---------------------------+     +-------------------------------+

so it goes HTML::Object::Element ➑️ HTML::Object::EventTarget ➑️ HTML::Object::DOM::MediaTrack. one long chain of --> and honestly? slay. ✨


πŸ’œ METHODS πŸ’œ

these are the methods, one by one, no skipping, i promise. πŸŽ€

🌸 id

a string that uniquely identifies the track within the media. and yes, that ID is useful β€” you can locate a specific track inside an audio track list by calling "AudioTrackList".getTrackById(). it can ALSO be used as the fragment part of the URL, but only if the media supports seeking by media fragment per the Media Fragments URI specification. so like, conditional slay. πŸ’…

see also the Mozilla documentation for audio id <https://developer.mozilla.org/en-US/docs/Web/API/AudioTrack/id> and also see the Mozilla documentation for video id <https://developer.mozilla.org/en-US/docs/Web/API/VideoTrack/id>.

πŸ¦‹ kind

a string specifying the category the track falls into. for example, the main audio track would have a kind of "main". think of it as the track's whole personality. 😌

see also the Mozilla documentation for audio kind <https://developer.mozilla.org/en-US/docs/Web/API/AudioTrack/kind> and the Mozilla documentation for video kind <https://developer.mozilla.org/en-US/docs/Web/API/VideoTrack/kind>.

πŸ“ label

a string giving a human-readable label for the track. like, an audio commentary track for a movie might have a label of "Commentary with director John Q. Public and actors John Doe and Jane Eod." iconic casting, honestly. and if no label is provided? this string is empty. periodt. πŸ’€

see also the Mozilla documentation for audio label <https://developer.mozilla.org/en-US/docs/Web/API/AudioTrack/label> and the Mozilla documentation for vide label <https://developer.mozilla.org/en-US/docs/Web/API/VideoTrack/label>.

(yes, the original really says "vide label" without the "o" β€” i'm keeping it exactly as written, because the facts stay the facts, bestie. πŸ™ˆ)

🌈 language

a string specifying the audio track's primary language, or an empty string if it's unknown. it's specified as a BCP 47 (RFC 5646) language code, such as "en-US" or "pt-BR". multilingual queen. πŸ‘‘

see also the Mozilla documentation for audio language <https://developer.mozilla.org/en-US/docs/Web/API/AudioTrack/language> and the Mozilla documentation for video language <https://developer.mozilla.org/en-US/docs/Web/API/VideoTrack/language>.


πŸ‘‘ AUTHOR πŸ‘‘

Jacques Deguest <jack@deguest.jp>. we stan.


🫢 SEE ALSO 🫢

  • HTML::Object::DOM::AudioTrack
  • HTML::Object::DOM::VideoTrack

go read those, they're the siblings and they're literally the whole point of this shared interface. 🧚


Copyright(c) 2021 DEGUEST Pte. Ltd.

All rights reserved.

This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.

so yeah β€” free software, same terms as Perl itself. redistribute responsibly and with flair. πŸ’…


okay that's the whole page, you ate that. and since we're being thorough: this little beauty is perl v5.42.2, dated 2026-02-15, and it's the HTML::O...diaTrack(3) page from the User Contributed Perl Documentation. mwah. πŸ’•πŸŒˆβ­

πŸ“¦ where this page comes from