/[Frey]/trunk/lib/Frey/Web/FLVPlayer.pm
This is repository of my old source code which isn't updated any more. Go to git.rot13.org for current projects!
ViewVC logotype

Contents of /trunk/lib/Frey/Web/FLVPlayer.pm

Parent Directory Parent Directory | Revision Log Revision Log


Revision 846 - (show annotations)
Mon Dec 15 18:42:48 2008 UTC (15 years, 4 months ago) by dpavlin
File size: 931 byte(s)
move to FLV Player which is better and more flexibile than Flowplayer
1 package Frey::Web::FLVPlayer;
2 use Moose;
3
4 =head1 SEE ALSO
5
6 L<http://flv-player.net/>
7
8 =cut
9
10 extends 'Frey';
11 with 'Frey::Web';
12 #with 'Frey::Storage';
13 with 'Frey::File::FLV';
14
15 has path => (
16 is => 'rw',
17 isa => 'Str',
18 required => 1,
19 default => 'var/flv/codeswarm.flv',
20 );
21
22 has player_swf => (
23 is => 'rw',
24 isa => 'Str',
25 required => 1,
26 default => 'http://flv-player.net/medias/player_flv_maxi.swf',
27 );
28
29 sub as_markup {
30 my ($self) = @_;
31
32 my $path = $self->path;
33 die "can't find $path" unless -e $path;
34
35 my $url = "http://localhost:3000/$path"; # FIXME
36
37 my $swf = $self->player_swf;
38
39 my %info = $self->flv_info;
40 warn "# info ", $self->dump( \%info );
41
42 my $width = $info{meta_width};
43 my $height = $info{meta_height};
44
45 qq|
46 <object type="application/x-shockwave-flash" data="$swf" width="$width" height="$height">
47 <param name="movie" value="$swf" />
48 <param name="FlashVars" value="flv=$url" />
49 </object>
50 |;
51
52 }
53
54 1;

  ViewVC Help
Powered by ViewVC 1.1.26