11 |
with 'Frey::Web'; |
with 'Frey::Web'; |
12 |
#with 'Frey::Storage'; |
#with 'Frey::Storage'; |
13 |
|
|
14 |
has skeleton => ( |
has flv => ( |
15 |
is => 'rw', |
is => 'rw', |
16 |
isa => 'Str', |
isa => 'Str', |
17 |
required => 1, |
required => 1, |
18 |
default => 'skeleton', |
default => 'var/flv/strix-2005-2008-codeswarm.flv', |
19 |
|
); |
20 |
|
|
21 |
|
has flowplayer_js => ( |
22 |
|
is => 'rw', |
23 |
|
isa => 'Str', |
24 |
|
required => 1, |
25 |
|
default => 'http://static.flowplayer.org/js/flowplayer-3.0.1.min.js', |
26 |
|
); |
27 |
|
|
28 |
|
has flowplayer_swf => ( |
29 |
|
is => 'rw', |
30 |
|
isa => 'Str', |
31 |
|
required => 1, |
32 |
|
default => 'http://static.flowplayer.org/swf/flowplayer-3.0.1.swf', |
33 |
); |
); |
34 |
|
|
35 |
sub as_markup { |
sub as_markup { |
36 |
my ($self) = @_; |
my ($self) = @_; |
37 |
|
|
38 |
warn $self->skeleton; |
my $flv = $self->flv; |
39 |
|
die "can't find $flv" unless -e $flv; |
40 |
|
|
41 |
|
$flv = "http://localhost:3000/$flv"; |
42 |
|
|
43 |
|
$self->add_js( $self->flowplayer_js ); |
44 |
|
my $swf = $self->flowplayer_swf; |
45 |
|
|
46 |
qq| |
qq| |
47 |
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" |
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" |
48 |
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> |
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> |
49 |
|
|
|
<!-- include the only required JavaScript file --> |
|
|
<script src="http://static.flowplayer.org/js/flowplayer-3.0.1.min.js"></script> |
|
|
|
|
50 |
<!-- |
<!-- |
51 |
Setup player with standard HTML syntax |
Setup player with standard HTML syntax |
52 |
* movie file is specified in "href" attribute |
* movie file is specified in "href" attribute |
53 |
* player dimensions are defined with CSS |
* player dimensions are defined with CSS |
54 |
--> |
--> |
55 |
<a |
<a |
56 |
href="http://blip.tv/file/get/KimAronson-TwentySeconds4461.flv" |
href="$flv" |
57 |
style="display:block;width:425px;height:300px;" |
style="display:block;width:425px;height:300px;" |
58 |
id="player"> |
id="player"> |
59 |
</a> |
</a> |
60 |
|
|
61 |
<!-- this script block will install Flowplayer inside previous anchor tag --> |
<!-- this script block will install Flowplayer inside previous anchor tag --> |
62 |
<script language="JavaScript"> |
<script language="JavaScript"> |
63 |
flowplayer("player", "http://static.flowplayer.org/swf/flowplayer-3.0.1.swf"); |
flowplayer("player", "$swf"); |
64 |
</script> |
</script> |
65 |
|; |
|; |
66 |
|
|