/[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 813 by dpavlin, Thu Dec 11 20:18:28 2008 UTC revision 814 by dpavlin, Thu Dec 11 21:07:52 2008 UTC
# Line 11  extends 'Frey'; Line 11  extends 'Frey';
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    

Legend:
Removed from v.813  
changed lines
  Added in v.814

  ViewVC Help
Powered by ViewVC 1.1.26