line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
##---------------------------------------------------------------------------- |
2
|
|
|
|
|
|
|
## HTML Object - ~/lib/HTML/Object/DOM/VTTRegion.pm |
3
|
|
|
|
|
|
|
## Version v0.2.0 |
4
|
|
|
|
|
|
|
## Copyright(c) 2021 DEGUEST Pte. Ltd. |
5
|
|
|
|
|
|
|
## Author: Jacques Deguest <jack@deguest.jp> |
6
|
|
|
|
|
|
|
## Created 2021/12/27 |
7
|
|
|
|
|
|
|
## Modified 2022/09/18 |
8
|
|
|
|
|
|
|
## All rights reserved |
9
|
|
|
|
|
|
|
## |
10
|
|
|
|
|
|
|
## |
11
|
|
|
|
|
|
|
## This program is free software; you can redistribute it and/or modify it |
12
|
|
|
|
|
|
|
## under the same terms as Perl itself. |
13
|
|
|
|
|
|
|
##---------------------------------------------------------------------------- |
14
|
|
|
|
|
|
|
package HTML::Object::DOM::VTTRegion; |
15
|
|
|
|
|
|
|
BEGIN |
16
|
|
|
|
|
|
|
{ |
17
|
1
|
|
|
1
|
|
1034
|
use strict; |
|
1
|
|
|
|
|
1
|
|
|
1
|
|
|
|
|
35
|
|
18
|
1
|
|
|
1
|
|
7
|
use warnings; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
31
|
|
19
|
1
|
|
|
1
|
|
6
|
use parent qw( Module::Generic ); |
|
1
|
|
|
|
|
1
|
|
|
1
|
|
|
|
|
15
|
|
20
|
1
|
|
|
1
|
|
59
|
use vars qw( $VERSION ); |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
50
|
|
21
|
1
|
|
|
1
|
|
39
|
our $VERSION = 'v0.2.0'; |
22
|
|
|
|
|
|
|
}; |
23
|
|
|
|
|
|
|
|
24
|
1
|
|
|
1
|
|
8
|
use strict; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
24
|
|
25
|
1
|
|
|
1
|
|
10
|
use warnings; |
|
1
|
|
|
|
|
3
|
|
|
1
|
|
|
|
|
329
|
|
26
|
|
|
|
|
|
|
|
27
|
|
|
|
|
|
|
sub init |
28
|
|
|
|
|
|
|
{ |
29
|
0
|
|
|
0
|
1
|
|
my $self = shift( @_ ); |
30
|
0
|
|
|
|
|
|
$self->{_init_strict_use_sub} = 1; |
31
|
0
|
0
|
|
|
|
|
$self->SUPER::init( @_ ) || return( $self->pass_error ); |
32
|
0
|
|
|
|
|
|
return( $self ); |
33
|
|
|
|
|
|
|
} |
34
|
|
|
|
|
|
|
|
35
|
|
|
|
|
|
|
# Note: property |
36
|
0
|
|
|
0
|
1
|
|
sub id : lvalue { return( shift->_set_get_scalar_as_object( 'id', @_ ) ); } |
37
|
|
|
|
|
|
|
|
38
|
|
|
|
|
|
|
# Note: property |
39
|
0
|
|
|
0
|
1
|
|
sub lines : lvalue { return( shift->_set_get_number( 'lines', @_ ) ); } |
40
|
|
|
|
|
|
|
|
41
|
|
|
|
|
|
|
# Note: property |
42
|
0
|
|
|
0
|
1
|
|
sub regionAnchorX : lvalue { return( shift->_set_get_number( 'regionanchorx', @_ ) ); } |
43
|
|
|
|
|
|
|
|
44
|
|
|
|
|
|
|
# Note: property |
45
|
0
|
|
|
0
|
1
|
|
sub regionAnchorY : lvalue { return( shift->_set_get_number( 'regionanchory', @_ ) ); } |
46
|
|
|
|
|
|
|
|
47
|
|
|
|
|
|
|
# Note: property |
48
|
0
|
|
|
0
|
1
|
|
sub scroll : lvalue { return( shift->_set_get_scalar_as_object( 'scroll', @_ ) ); } |
49
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
# Note: property |
51
|
0
|
|
|
0
|
1
|
|
sub viewportAnchorX : lvalue { return( shift->_set_get_number( 'viewportanchorx', @_ ) ); } |
52
|
|
|
|
|
|
|
|
53
|
|
|
|
|
|
|
# Note: property |
54
|
0
|
|
|
0
|
1
|
|
sub viewportAnchorY : lvalue { return( shift->_set_get_number( 'viewportanchory', @_ ) ); } |
55
|
|
|
|
|
|
|
|
56
|
|
|
|
|
|
|
# Note: property |
57
|
0
|
|
|
0
|
1
|
|
sub width : lvalue { return( shift->_set_get_number( 'width', @_ ) ); } |
58
|
|
|
|
|
|
|
|
59
|
|
|
|
|
|
|
1; |
60
|
|
|
|
|
|
|
# NOTE: POD |
61
|
|
|
|
|
|
|
__END__ |
62
|
|
|
|
|
|
|
|
63
|
|
|
|
|
|
|
=encoding utf-8 |
64
|
|
|
|
|
|
|
|
65
|
|
|
|
|
|
|
=head1 NAME |
66
|
|
|
|
|
|
|
|
67
|
|
|
|
|
|
|
HTML::Object::DOM::VTTRegion - HTML Object DOM VTTRegion Class |
68
|
|
|
|
|
|
|
|
69
|
|
|
|
|
|
|
=head1 SYNOPSIS |
70
|
|
|
|
|
|
|
|
71
|
|
|
|
|
|
|
use HTML::Object::DOM::VTTRegion; |
72
|
|
|
|
|
|
|
my $region = HTML::Object::DOM::VTTRegion->new || |
73
|
|
|
|
|
|
|
die( HTML::Object::DOM::VTTRegion->error, "\n" ); |
74
|
|
|
|
|
|
|
|
75
|
|
|
|
|
|
|
=head1 VERSION |
76
|
|
|
|
|
|
|
|
77
|
|
|
|
|
|
|
v0.2.0 |
78
|
|
|
|
|
|
|
|
79
|
|
|
|
|
|
|
=head1 DESCRIPTION |
80
|
|
|
|
|
|
|
|
81
|
|
|
|
|
|
|
The C<VTTRegion> interface—part of the API for handling C<WebVTT> (text tracks on media presentations)—describes a portion of the video to render a L<HTML::Object::DOM::VTTCue> onto. |
82
|
|
|
|
|
|
|
|
83
|
|
|
|
|
|
|
=head1 PROPERTIES |
84
|
|
|
|
|
|
|
|
85
|
|
|
|
|
|
|
=head2 id |
86
|
|
|
|
|
|
|
|
87
|
|
|
|
|
|
|
Sets or gets a string that identifies the region, as a L<scalar object|Module::Generic::Scalar>. |
88
|
|
|
|
|
|
|
|
89
|
|
|
|
|
|
|
See also L<Mozilla documentation|https://developer.mozilla.org/en-US/docs/Web/API/VTTRegion/id> |
90
|
|
|
|
|
|
|
|
91
|
|
|
|
|
|
|
=head2 lines |
92
|
|
|
|
|
|
|
|
93
|
|
|
|
|
|
|
Sets or gets a L<double|Module::Generic::Number> representing the height of the region, in number of lines. |
94
|
|
|
|
|
|
|
|
95
|
|
|
|
|
|
|
See also L<Mozilla documentation|https://developer.mozilla.org/en-US/docs/Web/API/VTTRegion/lines> |
96
|
|
|
|
|
|
|
|
97
|
|
|
|
|
|
|
=head2 regionAnchorX |
98
|
|
|
|
|
|
|
|
99
|
|
|
|
|
|
|
Sets or gets a L<double|Module::Generic::Number> representing the region anchor X offset, as a percentage of the region. |
100
|
|
|
|
|
|
|
|
101
|
|
|
|
|
|
|
See also L<Mozilla documentation|https://developer.mozilla.org/en-US/docs/Web/API/VTTRegion/regionAnchorX> |
102
|
|
|
|
|
|
|
|
103
|
|
|
|
|
|
|
=head2 regionAnchorY |
104
|
|
|
|
|
|
|
|
105
|
|
|
|
|
|
|
Sets or gets a L<double|Module::Generic::Number> representing the region anchor Y offset, as a percentage of the region. |
106
|
|
|
|
|
|
|
|
107
|
|
|
|
|
|
|
See also L<Mozilla documentation|https://developer.mozilla.org/en-US/docs/Web/API/VTTRegion/regionAnchorY> |
108
|
|
|
|
|
|
|
|
109
|
|
|
|
|
|
|
=head2 scroll |
110
|
|
|
|
|
|
|
|
111
|
|
|
|
|
|
|
Sets or gets an enum representing how adding new cues will move existing cues, as a L<scalar object|Module::Generic::Scalar>. |
112
|
|
|
|
|
|
|
|
113
|
|
|
|
|
|
|
See also L<Mozilla documentation|https://developer.mozilla.org/en-US/docs/Web/API/VTTRegion/scroll> |
114
|
|
|
|
|
|
|
|
115
|
|
|
|
|
|
|
=head2 viewportAnchorX |
116
|
|
|
|
|
|
|
|
117
|
|
|
|
|
|
|
Sets or gets a L<double|Module::Generic::Number> representing the viewport anchor X offset, as a percentage of the video. |
118
|
|
|
|
|
|
|
|
119
|
|
|
|
|
|
|
See also L<Mozilla documentation|https://developer.mozilla.org/en-US/docs/Web/API/VTTRegion/viewportAnchorX> |
120
|
|
|
|
|
|
|
|
121
|
|
|
|
|
|
|
=head2 viewportAnchorY |
122
|
|
|
|
|
|
|
|
123
|
|
|
|
|
|
|
Sets or gets a L<double|Module::Generic::Number> representing the viewport anchor Y offset, as a percentage of the video. |
124
|
|
|
|
|
|
|
|
125
|
|
|
|
|
|
|
See also L<Mozilla documentation|https://developer.mozilla.org/en-US/docs/Web/API/VTTRegion/viewportAnchorY> |
126
|
|
|
|
|
|
|
|
127
|
|
|
|
|
|
|
=head2 width |
128
|
|
|
|
|
|
|
|
129
|
|
|
|
|
|
|
Sets or gets a L<double|Module::Generic::Number> representing the width of the region, as a percentage of the video. |
130
|
|
|
|
|
|
|
|
131
|
|
|
|
|
|
|
See also L<Mozilla documentation|https://developer.mozilla.org/en-US/docs/Web/API/VTTRegion/width> |
132
|
|
|
|
|
|
|
|
133
|
|
|
|
|
|
|
=head1 METHODS |
134
|
|
|
|
|
|
|
|
135
|
|
|
|
|
|
|
There are no method. |
136
|
|
|
|
|
|
|
|
137
|
|
|
|
|
|
|
=head1 AUTHOR |
138
|
|
|
|
|
|
|
|
139
|
|
|
|
|
|
|
Jacques Deguest E<lt>F<jack@deguest.jp>E<gt> |
140
|
|
|
|
|
|
|
|
141
|
|
|
|
|
|
|
=head1 SEE ALSO |
142
|
|
|
|
|
|
|
|
143
|
|
|
|
|
|
|
L<Mozilla documentation|https://developer.mozilla.org/en-US/docs/Web/API/VTTRegion> |
144
|
|
|
|
|
|
|
|
145
|
|
|
|
|
|
|
=head1 COPYRIGHT & LICENSE |
146
|
|
|
|
|
|
|
|
147
|
|
|
|
|
|
|
Copyright(c) 2021 DEGUEST Pte. Ltd. |
148
|
|
|
|
|
|
|
|
149
|
|
|
|
|
|
|
All rights reserved |
150
|
|
|
|
|
|
|
|
151
|
|
|
|
|
|
|
This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself. |
152
|
|
|
|
|
|
|
|
153
|
|
|
|
|
|
|
=cut |