XFileSharing Pro - Flowplayer

Message
Author
200299
Posts: 28
Joined: Feb 17, 2011 5:04 pm

Flowplayer

#1 Postby 200299 » Feb 27, 2011 4:10 pm

How can the script embed flowplayer place flv Player??

PowerChaos
Posts: 521
Joined: Dec 19, 2009 5:12 pm

#2 Postby PowerChaos » Feb 28, 2011 8:04 pm

it is not that hard to embed flowplayer
but you will lose a part of the security

this is the place you need to edit (all i can say , rest is up to you)


first find this file

Code: Select all

/www/cgi-bin/index_dl.pm
then search for this code

Code: Select all

 elsif($file->{vid_codec}=~/(flv|h264)/i || $file->{file_name}=~/\.(flv|mp4)$/i)
and then delete below code

Code: Select all

var s1 = new SWFObject('$c->{site_url}/player/player.swf','player','$file->{vid_width}','$file->{vid_height}','9');
s1.addParam('allowfullscreen','true');
s1.addParam('wmode','opaque');
s1.addParam('allowscriptaccess','always');
s1.addVariable('duration','$file->{vid_length}');
s1.addVariable('file','$file->{direct_link}');
s1.addVariable('image','$file->{video_img_url}');
s1.addVariable('provider','http');
s1.addVariable('http.startparam','start');
s1.addVariable('streamer','$file->{direct_link}');
s1.addVariable('bufferlength','5');
s1.addVariable('skin','http://demonpower.com/player/control/controlpanel.swf');
s1.addVariable('controlbar','over');
s1.addVariable('plugins', 'like-1,newsticker-1');
s1.addVariable('newsticker.text', 'FireFox Can not skip parts , use IE or Chrome instead')
and then change it with this code

Code: Select all

=qq[ your flowplayer code ]
please note the QQ[ and closing tag ]

that code is needed to eb able to execute the code

Greets From PowerChaos

200299
Posts: 28
Joined: Feb 17, 2011 5:04 pm

#3 Postby 200299 » Mar 03, 2011 11:25 am

how the new code the flowplayer look
I searched and found nothing

Please help me

PowerChaos
Posts: 521
Joined: Dec 19, 2009 5:12 pm

#4 Postby PowerChaos » Mar 03, 2011 12:39 pm

because it seems harder for some persones to change it , so here is the code

first before you start , downlaod the flamplayer and store it in /www/player/flow (./player = where flv player is , then create a map flow in it and put there all the files )


the below code is what it normaly supose to be
change it with the next code to get flowplayer working

Code: Select all

my $code="var s1 = new SWFObject('$c->{site_url}/player/player.swf','player','$file->{vid_width}','$file->{vid_height}','9');
s1.addParam('allowfullscreen','true');
s1.addParam('wmode','opaque');
s1.addParam('allowscriptaccess','always');
s1.addVariable('duration','$file->{vid_length}');
s1.addVariable('file','$file->{direct_link}');
s1.addVariable('image','$file->{video_img_url}');
s1.addVariable('provider','http');
s1.addVariable('http.startparam','start');
s1.addVariable('streamer','$file->{direct_link}');
s1.addVariable('bufferlength','5');
s1.addVariable('skin','http://demonpower.com/player/control/controlpanel.swf');
s1.addVariable('controlbar','over');
s1.addVariable('plugins', 'like-1,newsticker-1');
s1.addVariable('newsticker.text', 'FireFox Can not skip parts , use IE or Chrome instead');
s1.write('flvplayer');";
         $code = &encodeJS($code);
         $file->{flv}=1;
         $file->{video_code}="<span id='flvplayer'></span>
<script type='text/javascript' src='$c->{site_url}/player/swfobject.js'></script>
$code
<br>";
change it with this code and flowplayer should work
be sure to check the maps

Code: Select all


my $code=qq[
<a style="display:block;width:$file->{vid_width}px;height:$file->{vid_height}px" id="player"></a>
<!-- this will install flowplayer inside previous A- tag. -->
	<script> 
	
	 /*
		use flashembed to place flowplayer into HTML element 
		whose id is "example" (below this script tag)
	 */
	 flashembed("player", 
	
		/* 
			first argument supplies standard Flash parameters. See full list:
			http://kb.adobe.com/selfservice/viewContent.do?externalId=tn_12701
		*/
		{
			src:'$c->{site_url}/player/flow/flowplayer-3.2.6.swf',
			width: $file->{vid_width}, 
			height: $file->{vid_height}
		},
		
		/*
			second argument is Flowplayer specific configuration. See full list:
			http://flowplayer.org/player/configuration.html
		*/
		{config: {   
			autoPlay: false,
			autoBuffering: true,
			controlBarBackgroundColor:'0x2e8860',
			initialScale: 'scale',
			videoFile: '$file->{direct_link}'
		}} 
	);
	</script>
];
         $code = &encodeJS($code);
         $file->{flv}=1;
         $file->{video_code}="<span id='flvplayer'></span>
<script src="$c->{site_url}/player/flow/flowplayer-3.2.6.min.js"></script>
<script type='text/javascript' src='$c->{site_url}/player/swfobject.js'></script>
$code
<br>";
this is kinda the code you need

i dit not test it out at this moment of posting
but i tryed it out before and thats how it kinda need to be done

in case this fails or it is to mutch work to get that done you can put the above code on a differend place to (with no encrypttion then )

find

Code: Select all

 $file->{video_code}="<span id='flvplayer'></span>
search for

Code: Select all

$code
and replace that $code tag with the flowplayer code , and remove the above flvplayer span tag

Greets From PowerChaos

200299
Posts: 28
Joined: Feb 17, 2011 5:04 pm

#5 Postby 200299 » Mar 03, 2011 1:59 pm

after adding the code I'm reporting this bug

Could you please advise me via Skype or ICQ where's my mistake?

Here is my sript
http://www.sharefiles4u.com/ii02pqz9k1wr/index_dl.pm

Code: Select all

Software error:

syntax error at index_dl.pm line 596, near "<"
Global symbol "$s" requires explicit package name at index_dl.pm line 631.
Global symbol "$s" requires explicit package name at index_dl.pm line 631.
Global symbol "$s" requires explicit package name at index_dl.pm line 631.
Global symbol "$s" requires explicit package name at index_dl.pm line 642.
syntax error at index_dl.pm line 642, near "$s<"
Global symbol "$utype2" requires explicit package name at index_dl.pm line 656.
Missing right curly or square bracket at index_dl.pm line 837, at end of line
syntax error at index_dl.pm line 837, at EOF
Compilation failed in require at /var/www/clients/client0/web4/cgi-bin/index_dl.cgi line 5.
BEGIN failed--compilation aborted at /var/www/clients/client0/web4/cgi-bin/index_dl.cgi line 5.

PowerChaos
Posts: 521
Joined: Dec 19, 2009 5:12 pm

#6 Postby PowerChaos » Mar 03, 2011 2:36 pm

it says what kind of error it is

Code: Select all

Missing right curly or square bracket at index_dl.pm line 837, at end of line 

Code: Select all

syntax error at index_dl.pm line 596, near "<" 
1 error cause the other errors

as soon i got it worked out again then i will release the full code , as the code proveded now is just the basic how it need to be done ( i do not know for sure as i can not test it )

there is probaly something wrong in my code i provided

the thing you can do to

delete this

Code: Select all

my $code="var s1 = new SWFObject('$c->{site_url}/player/player.swf','player','$file->{vid_width}','$file->{vid_height}','9'); 
s1.addParam('allowfullscreen','true'); 
s1.addParam('wmode','opaque'); 
s1.addParam('allowscriptaccess','always'); 
s1.addVariable('duration','$file->{vid_length}'); 
s1.addVariable('file','$file->{direct_link}'); 
s1.addVariable('image','$file->{video_img_url}'); 
s1.addVariable('provider','http'); 
s1.addVariable('http.startparam','start'); 
s1.addVariable('streamer','$file->{direct_link}'); 
s1.addVariable('bufferlength','5'); 
s1.addVariable('skin','http://demonpower.com/player/control/controlpanel.swf');
s1.addVariable('controlbar','over'); 
s1.addVariable('plugins', 'like-1,newsticker-1'); 
s1.addVariable('newsticker.text', 'FireFox Can not skip parts , use IE or Chrome instead'); 
s1.write('flvplayer');"; 
  $code = &encodeJS($code); 
         $file->{flv}=1; 
         $file->{video_code}="<span id='flvplayer'></span> 
<script src="$c->{site_url}/player/flow/flowplayer-3.2.6.min.js"></script> 
<script type='text/javascript' src='$c->{site_url}/player/swfobject.js'></script> 
$code 
<br>"; 
then just add this in place

Code: Select all

         $file->{flv}=1; 
$file->{video_code}="<span id='flvplayer'></span> 
<script src='$c->{site_url}/player/flow/flowplayer-3.2.6.min.js'>
</script> 
<script type='text/javascript' src='$c->{site_url}/player/swfobject.js'></script> 

<a style='display:block;width:$file->{vid_width}px;height:$file->{vid_height}px' id='player'></a> 
<!-- this will install flowplayer inside previous A- tag. --> 
   <script> 
    flashembed('player', 

      { 
         src:'$c->{site_url}/player/flow/flowplayer-3.2.6.swf', 
         width: $file->{vid_width}, 
         height: $file->{vid_height} 
      }, 
       

      {config: {    
         autoPlay: false, 
         autoBuffering: true, 
         controlBarBackgroundColor:'0x2e8860', 
         initialScale: 'scale', 
         videoFile: '$file->{direct_link}' 
      }} 
   ); 
   </script>  
<br>";
then it should normaly work for 100% (as it direcly output the player now instead first encrypting the player )

be sure that there is no " in it exept at the beginning and at the end ( as it else will break the code)

the player will not be encrypted then on this way

again , i dit not tested this code yet , i tryed it before but i am not sure of the code that i used , but this should normaly work ( maybe mirror errors in it :s )

Greets From PowerChaos

200299
Posts: 28
Joined: Feb 17, 2011 5:04 pm

#7 Postby 200299 » Mar 03, 2011 4:09 pm

Player can see, but not run
so once there is a problem
Last edited by 200299 on Mar 03, 2011 5:44 pm, edited 1 time in total.

PowerChaos
Posts: 521
Joined: Dec 19, 2009 5:12 pm

#8 Postby PowerChaos » Mar 03, 2011 5:30 pm

the file works perfect for me (google chrome)

and to be able to vieuw it in all browsers , you need to install psuedostreaming
as only google chrome is able to vieuw movie's larger then 1 hour ( other browsers first need to load the complete movie first , google chrome can play those sometimes)

and to confirm

you sended just a link to a porno movie to me o.O (no more detais will be released on this forum ^^ )

dint you got a other example ??

Greets From PowerChaos

200299
Posts: 28
Joined: Feb 17, 2011 5:04 pm

#9 Postby 200299 » Mar 03, 2011 5:48 pm

dont work

this link (flv format)

Code: Select all

http://mega****stream.eu/h91y5lai18fy