/[Frey]/trunk/lib/Frey/Web/Flowplayer.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

Diff of /trunk/lib/Frey/Web/Flowplayer.pm

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 822 by dpavlin, Thu Dec 11 21:07:52 2008 UTC revision 823 by dpavlin, Fri Dec 12 19:34:42 2008 UTC
# Line 10  L<http://flowplayer.org/documentation/in Line 10  L<http://flowplayer.org/documentation/in
10  extends 'Frey';  extends 'Frey';
11  with 'Frey::Web';  with 'Frey::Web';
12  #with 'Frey::Storage';  #with 'Frey::Storage';
13    with 'Frey::File::FLV';
14    
15  has flv => (  has path => (
16          is => 'rw',          is => 'rw',
17          isa => 'Str',          isa => 'Str',
18          required => 1,          required => 1,
# Line 35  has flowplayer_swf => ( Line 36  has flowplayer_swf => (
36  sub as_markup {  sub as_markup {
37          my ($self) = @_;          my ($self) = @_;
38    
39          my $flv = $self->flv;          my $path = $self->path;
40          die "can't find $flv" unless -e $flv;          die "can't find $path" unless -e $path;
41    
42          $flv = "http://localhost:3000/$flv";          my $url = "http://localhost:3000/$path"; # FIXME
43    
44          $self->add_js( $self->flowplayer_js );          $self->add_js( $self->flowplayer_js );
45          my $swf = $self->flowplayer_swf;          my $swf = $self->flowplayer_swf;
46    
47            my %info = $self->flv_info;
48            warn "# info ", $self->dump( \%info );
49    
50            my $width  = $info{meta_width};
51            my $height = $info{meta_height};
52    
53          qq|          qq|
54  <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"  <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
55      "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">      "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
# Line 53  sub as_markup { Line 60  sub as_markup {
60        * player dimensions are defined with CSS          * player dimensions are defined with CSS  
61  -->  -->
62  <a    <a  
63      href="$flv"      href="$url"
64      style="display:block;width:425px;height:300px;"        style="display:block;width:${width}px;height:${height}px;"  
65      id="player">      id="player">
66  </a>  </a>
67    

Legend:
Removed from v.822  
changed lines
  Added in v.823

  ViewVC Help
Powered by ViewVC 1.1.26