--- trunk/lib/Frey/Web/Flowplayer.pm 2008/12/11 21:07:52 814 +++ trunk/lib/Frey/Web/Flowplayer.pm 2008/12/15 18:32:49 844 @@ -1,4 +1,4 @@ -package Frey::Web::Flowplayer; +package Frey::Web::FLVPlayer; use Moose; =head1 SEE ALSO @@ -10,12 +10,13 @@ extends 'Frey'; with 'Frey::Web'; #with 'Frey::Storage'; +with 'Frey::File::FLV'; -has flv => ( +has path => ( is => 'rw', isa => 'Str', required => 1, - default => 'var/flv/strix-2005-2008-codeswarm.flv', + default => 'var/flv/codeswarm.flv', ); has flowplayer_js => ( @@ -35,14 +36,20 @@ sub as_markup { my ($self) = @_; - my $flv = $self->flv; - die "can't find $flv" unless -e $flv; + my $path = $self->path; + die "can't find $path" unless -e $path; - $flv = "http://localhost:3000/$flv"; + my $url = "http://localhost:3000/$path"; # FIXME $self->add_js( $self->flowplayer_js ); my $swf = $self->flowplayer_swf; + my %info = $self->flv_info; + warn "# info ", $self->dump( \%info ); + + my $width = $info{meta_width}; + my $height = $info{meta_height}; + qq| @@ -53,8 +60,8 @@ * player dimensions are defined with CSS -->