NAME

HTML::Object::DOM::TextTrackCueList - HTML Object DOM TextTrack Cue List Class

SYNOPSIS

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

VERSION

v0.2.0

DESCRIPTION

The TextTrackCueList represents a dynamically updating list of TextTrackCue objects.

It inherits from HTML::Object::DOM::List

INHERITANCE

+-----------------------+     +---------------------------+     +-------------------------+     +-------------------------------------+
| HTML::Object::Element | --> | HTML::Object::EventTarget | --> | HTML::Object::DOM::List | --> | HTML::Object::DOM::TextTrackCueList |
+-----------------------+     +---------------------------+     +-------------------------+     +-------------------------------------+

PROPERTIES

length

An unsigned long that is the number of cues in the list.

Example:

my $video = $doc->getElementById( 'video' );
$video->onplay = sub
{
    say( $video->textTracks->[0]->cues->length ) # 5;
};

See also Mozilla documentation

METHODS

forEach

This is an alias for "foreach" in Module::Generic::Array

getCueById

Returns the first TextTrackCue object with the identifier passed to it.

Example:

my $video = $doc->getElementById( 'video' );
$video->onplay = sub
{
    say( $video->textTracks->[0]->cues->getCueById( 'second' ) ) # a VTTCue object;
}

See also Mozilla documentation

AUTHOR

Jacques Deguest <jack@deguest.jp>

SEE ALSO

Mozilla documentation

COPYRIGHT & LICENSE

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.