Jump to content


Photo
- - - - -

JW Player 5 Integration in AVS


  • Please log in to reply
8 replies to this topic

#1 Lao

Lao

    Junior Member

  • Members
  • Pip
  • 10 posts

Posted 25 April 2011 - 12:15 AM

Can anyone tell me how to Integrate into AVS?

#2 cyberdream3

cyberdream3

    Junior Member

  • Members
  • Pip
  • 4 posts

Posted 09 December 2011 - 02:45 PM

Adult Video Script 2.1 comes with JWPlayer3 as an alternative video player, but it's not setup as default.

Simple how to integrate the JW Player with Adult Video Script:

Confirm that the JWPlayer file is on the server
Look for the file /WHERE/AVS/IS/INSTALLED/media/player/player_adv.swf

Get the latest version of the player from http://www.longtailv...s/jw-flv-player and replace the flash player file on your server.

1 Create the Video Player template

In the directory /WHERE/AVS/IS/INSTALLED/templates/frontend/CURRENTLY-USED-TEMPLATE/ , create the file video_jwadx.tpl and add these lines:



{if $video.embed_code != ''}
{$video.embed_code}
{else}
<script type='text/javascript' src="{$relative_tpl}/js/swfobject.js" mce_src="{$relative_tpl}/js/swfobject.js"></script>
<script type='text/javascript'>
var s1 = new SWFObject('{$relative}/media/player/player_adv.swf','player','630','500','9'); s1.addParam('allowfullscreen','true');
s1.addParam('allowscriptaccess','always');
s1.addParam('wmode','transparent');
s1.addVariable('autostart','true');
s1.addVariable('bufferlength', '3');
s1.addVariable('file', '{$baseurl}/media/videos/flv/{$video.VID}.flv');
s1.addVariable('streamer', 'lighttpd');
s1.addVariable('id', 'player');
s1.addVariable('token', 'K49sS9q0');
s1.addVariable("stretching", "uniform");
s1.addVariable('javascriptid','player');
s1.addVariable('enablejs','true');
s1.write('player');
</script>
{/if}



2 Setup your template to use the new player

Edit /WHERE/AVS/IS/INSTALLED/templates/frontend/CURRENTLY-USED-TEMPLATE/video.tpl and
replace following line:
{include file='video_vplayer.tpl'}


with (look for all instances):
{include file='video_jwadx.tpl'}


Test your site to confirm new player work

The JwPlayer should now be used to display your movies. Make sure everything works the way you expect.

Edited by cyberdream3, 10 December 2011 - 08:44 AM.


#3 zayarln

zayarln

    Member

  • Members
  • PipPipPip
  • 81 posts

Posted 09 December 2011 - 02:50 PM

what is this...
src="http://help.adxpansion.com/faq/content/5

LOL

#4 dargre

dargre

    Senior Member

  • Members
  • PipPipPipPipPip
  • 991 posts

Posted 09 December 2011 - 07:15 PM

zayarln, can be because of user "cyberdream3" ignorance,
but rather is poor attempt of malicious code input, especially as this is first ever post by this user in which he reply to few months old thread.

Beware of this code,
even without suspicious line, code is useless, far from what it should be.

Edited by dargre, 09 December 2011 - 11:09 PM.

VIDEO.JS - best HTML5 player in the world for AVS script

NUEVOPLAYER 8 - best flash+html5 player for video scripts
Mods, custom code by NuevoLab (Search Suggest, Multiple image upload, Seo mods,and much more)


#5 cyberdream3

cyberdream3

    Junior Member

  • Members
  • Pip
  • 4 posts

Posted 10 December 2011 - 08:50 AM

I'm sorry, real moron sometimes :(
My fault, I take code from the wrong file :mad:
Code corrected

I just want to tell how you can do it for free

#6 dargre

dargre

    Senior Member

  • Members
  • PipPipPipPipPip
  • 991 posts

Posted 10 December 2011 - 10:00 AM

The code is still useless for what AVS current script is,
It doesn't differ if http streaming is used or not, doesn't support links for lighttpd secdownload mod, doesn't support HD videos, doesn't support video player dynamic size.

VIDEO.JS - best HTML5 player in the world for AVS script

NUEVOPLAYER 8 - best flash+html5 player for video scripts
Mods, custom code by NuevoLab (Search Suggest, Multiple image upload, Seo mods,and much more)


#7 cyberdream3

cyberdream3

    Junior Member

  • Members
  • Pip
  • 4 posts

Posted 10 December 2011 - 11:45 AM

4dargre
you want too much for free :)

So, configuration with mod_secdownlaod and lighttpd

If you are using mod_secdownload to prevent hotlinking on your movies, you need to create a new configuration file.

1 Copy the file /WHERE/AVS/IS/INSTALLED/MEDIA/PLAYER/config.php to configjw.php

2 Edit the new file configjw.php, replace toward the end everything that start with <xml> and end with </xml> with:

 <config>
<file><?php echo $SD_URL; ?></file>
<image><?php echo $config['TMB_URL']. '/' .$video_id. '/default.jpg' ?></image>
<autostart><?php echo $player['autorun']; ?></autostart>
<bufferlength><?php echo $player['buffertime']; ?></bufferlength>
<?php if ($config['lighttpd'] == '1'): ;?>
<streamer>lighttpd</streamer>
<?php endif; ?>
<stretching>uniform</stretching>
</config>


3 In the directory /WHERE/AVS/IS/INSTALLED/templates/frontend/CURRENTLY-USED-TEMPLATE/ , create the file video_jwadx.tpl and add these lines:



if $video.embed_code != ''}
{$video.embed_code}
{else}
<script type='text/javascript' src="{$relative_tpl}/js/swfobject.js" mce_src="{$relative_tpl}/js/swfobject.js"></script>
<script type='text/javascript'>
var s1 = new SWFObject('{$relative}/media/player/player_adv.swf','player','630','500','9');
s1.addParam('allowfullscreen','true');
s1.addParam('allowscriptaccess','always');
s1.addParam('wmode','transparent');
s1.addVariable('config', '{$baseurl}/media/player/configjw.php?vkey={$video.VID}');
s1.addVariable(‘streamer’, ‘lighttpd’);
s1.addVariable('id', 'player');
s1.addVariable('javascriptid','player');
s1.addVariable('enablejs','true');
</script>
{/if}



4 Edit /WHERE/AVS/IS/INSTALLED/templates/frontend/CURRENTLY-USED-TEMPLATE/video.tpl and

replace following line:
{include file='video_vplayer.tpl'}


with (look for all instances):
{include file='video_jwadx.tpl'}


dargre, check pls, I'm moron again or now I write here correct code :confused:

Edited by cyberdream3, 10 December 2011 - 11:51 AM.


#8 dargre

dargre

    Senior Member

  • Members
  • PipPipPipPipPip
  • 991 posts

Posted 10 December 2011 - 01:28 PM

dargre, check pls, I'm moron again or now I write here correct code :confused:


Unfrotunately still code is useless. No hd support, no player dynamic size.
What for a player that cannot play hd video while avs script support such nice quality?

And...
jwplayer 4.x, 5.x doesn't use 'lighttpd' value for streamer flashvar from long time, if I remember from version 4 streamer flashvar is for pseudo-php streaming script URL or rtmp server url. Seems you stucked with jwplayer 3.x very outdated and limited version.

Really maybe stop posting your code for a while, come back once you know little bit more about both: avs script and a player.

Edited by dargre, 10 December 2011 - 11:30 PM.

VIDEO.JS - best HTML5 player in the world for AVS script

NUEVOPLAYER 8 - best flash+html5 player for video scripts
Mods, custom code by NuevoLab (Search Suggest, Multiple image upload, Seo mods,and much more)


#9 GILBERTO

GILBERTO

    Senior Member

  • Members
  • PipPipPipPip
  • 264 posts

Posted 11 December 2011 - 05:45 PM

Then u do the integration