line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Mojolicious::Plugin::LinkEmbedder::Link::Game::_2play; |
2
|
|
|
|
|
|
|
|
3
|
|
|
|
|
|
|
=head1 NAME |
4
|
|
|
|
|
|
|
|
5
|
|
|
|
|
|
|
Mojolicious::Plugin::LinkEmbedder::Link::Game::_2play - 2play.com link |
6
|
|
|
|
|
|
|
|
7
|
|
|
|
|
|
|
=head1 DESCRIPTION |
8
|
|
|
|
|
|
|
|
9
|
|
|
|
|
|
|
This class inherit from L. |
10
|
|
|
|
|
|
|
|
11
|
|
|
|
|
|
|
=cut |
12
|
|
|
|
|
|
|
|
13
|
1
|
|
|
1
|
|
614
|
use Mojo::Base 'Mojolicious::Plugin::LinkEmbedder::Link::Game'; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
8
|
|
14
|
|
|
|
|
|
|
|
15
|
|
|
|
|
|
|
=head1 ATTRIBUTES |
16
|
|
|
|
|
|
|
|
17
|
|
|
|
|
|
|
=head2 media_id |
18
|
|
|
|
|
|
|
|
19
|
|
|
|
|
|
|
Returns the second path segment from L. |
20
|
|
|
|
|
|
|
|
21
|
|
|
|
|
|
|
=head2 provider_name |
22
|
|
|
|
|
|
|
|
23
|
|
|
|
|
|
|
=cut |
24
|
|
|
|
|
|
|
|
25
|
|
|
|
|
|
|
has media_id => sub { shift->url->path->[2] || '' }; |
26
|
0
|
|
|
0
|
1
|
|
sub provider_name {'2play'} |
27
|
0
|
|
|
0
|
|
|
sub _js_embed_url {'http://video.nettavisen.no/javascripts/embed.js'} |
28
|
|
|
|
|
|
|
|
29
|
|
|
|
|
|
|
=head1 METHODS |
30
|
|
|
|
|
|
|
|
31
|
|
|
|
|
|
|
=head2 to_embed |
32
|
|
|
|
|
|
|
|
33
|
|
|
|
|
|
|
Returns the HTML code for an iframe embedding this movie. |
34
|
|
|
|
|
|
|
|
35
|
|
|
|
|
|
|
=cut |
36
|
|
|
|
|
|
|
|
37
|
|
|
|
|
|
|
sub to_embed { |
38
|
0
|
|
|
0
|
1
|
|
my $self = shift; |
39
|
0
|
0
|
|
|
|
|
my $media_id = $self->media_id or return $self->SUPER::to_embed; |
40
|
|
|
|
|
|
|
|
41
|
0
|
|
|
|
|
|
qq(); |
|
0
|
|
|
|
|
|
|
42
|
|
|
|
|
|
|
} |
43
|
|
|
|
|
|
|
|
44
|
|
|
|
|
|
|
=head1 AUTHOR |
45
|
|
|
|
|
|
|
|
46
|
|
|
|
|
|
|
Jan Henning Thorsen - C |
47
|
|
|
|
|
|
|
|
48
|
|
|
|
|
|
|
Marcus Ramberg - C |
49
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
=cut |
51
|
|
|
|
|
|
|
|
52
|
|
|
|
|
|
|
1; |