• Page 1 of 2
  • 1
  • 2
  • »
Forum moderator: bigblog  
uCoz Community » For Webmasters » Custom Solutions » How to make your personal jw player for youtube videos (for trailers, movies, gameplays etc...)
How to make your personal jw player for youtube videos
Davor24
Posts: 330
Reputation: 10

Message # 1 | 7:11 PM
Many times I found the questions how to make a personal player for playing music, movies etc. from youtube...

Step 1:

Follow the Download Link and download the files. (it's free).

Create a folder named "player" in your File Manager:



Step 2:

Unpack the jw player and upload the files [color=blue]jwplayer.js player.swf swfobject.js
into the "player" folder:



Step 3:

I've indicated in the following code what should be replaced by your own links.

Code
<?if($AUTHOR_SITE$)?><center><script type='text/javascript' src='link to swfobject.js'></script><div id="mediaspace">This text will be replaced</div><script type='text/javascript'> var so = new SWFObject('link to-player.swf','mpl','580','400','9');
so.addParam('allowfullscreen','true');
so.addParam('allowscriptaccess','always');
so.addParam('wmode','opaque');
so.addVariable('image','your image, logo etc');
so.addVariable('file','youtube link');
so.write('mediaspace'); </script></center><?endif?>


We will use the field $AUTHOR_SITE$ to automatically add a youtube link. Change the size of the player by changing '580','400','9'.

This code can be used in almost all modules, just add it in 'Page with full entry text and associated comments' (best after or before $MESSAGE$).

Go to the module in which you add it in Substitution of default phrases--> FORM FOR ADDING NEW ENTRIES TO "( module you have chosen )" MODULE.

Change AUTHOR SITE into Youtube link.

When you add content you only need to insert a link into the field:



and you have your own player for the site (example):








If your site is not in English you can add the translation to your player ( for movies ) by adding:

Code
so.addVariable('plugins', 'captions-2');
so.addVariable('captions.file', '$SOURCE$');


after:

Code
so.addVariable('file','$AUTHOR_SITE$');


in the player code and use the field $SOURCE$ for your translation (must be in .srt forma).
Attachments: 0718736.jpg (16.6 Kb) · 6483597.jpg (40.4 Kb) · 1423102.jpg (8.3 Kb) · 8132302.jpg (26.2 Kb) · 6796028.jpg (34.8 Kb)
StelexXx
Posts: 3
Reputation: 0

Message # 2 | 4:56 PM
Quote (Davor24)
<?if($AUTHOR_SITE$)?><center><script type='text/javascript' src='$HOME_PAGE_LINK$/player/swfobject.js'></script><div id="mediaspace">This text will be replaced</div><script type='text/javascript'> var so = new SWFObject('$HOME_PAGE_LINK$/player.swf','mpl','580','400','9');
so.addParam('allowfullscreen','true');
so.addParam('allowscriptaccess','always');
so.addParam('wmode','opaque');
so.addVariable('image','your image, logo etc');
so.addVariable('skin','$HOME_PAGE_LINK$/player/player.swf');
so.addVariable('file','http://www.youtube.com/watch?v=$AUTHOR_SITE$');
so.write('mediaspace'); </script></center><?else?>


Where tu put this biggrin
Sunny
Posts: 9296
Reputation: 456

Message # 3 | 11:04 AM
Quote (Davor24)
Page with full entry text and associated comments' ( best after or before $MESSAGE$ )

I'm not active on the forum anymore. Please contact other forum staff.
belmo996
Posts: 123
Reputation: 4

Message # 4 | 3:26 PM
When I click on Save It say me One or more conditional operators (<?if?>) are not closed
Post edited by belmo996 - Friday, 2012-07-27, 3:27 PM
Paradox
Old Guard
Posts: 3284
Reputation: 145

Message # 5 | 1:52 PM
belmo996, I believe the code should end in an instead of an else. wink If you test this and it works I will change the code here in the thread so users will be aware.
Jack of all trades in development, design, strategy.
Working as a Support Engineer.
Been here for 13 years and counting.
belmo996
Posts: 123
Reputation: 4

Message # 6 | 8:49 PM
Paradox, I close <?endif?> tag but jw player doesn't work,only white background is appear,where is problem ? happy
Davor24
Posts: 330
Reputation: 10

Message # 7 | 0:24 AM
Please can someone from admin or moderators of change the code in first post with:

Code
<?if($AUTHOR_SITE$)?><center><script type='text/javascript' src='$HOME_PAGE_LINK$/player/swfobject.js'></script><div id="mediaspace">This text will be replaced</div><script type='text/javascript'> var so = new SWFObject('$HOME_PAGE_LINK$/player.swf','mpl','580','400','9');   
so.addParam('allowfullscreen','true');   
so.addParam('allowscriptaccess','always');   
so.addParam('wmode','opaque');   
so.addVariable('image','your image, logo etc');   
so.addVariable('file','$AUTHOR_SITE$');   
so.write('mediaspace'); </script></center><?endif?>


I would did it myself but i have no edit option smile
Post edited by Davor24 - Sunday, 2012-07-29, 1:21 PM
Paradox
Old Guard
Posts: 3284
Reputation: 145

Message # 8 | 0:41 AM
belmo996, are you using the $AUTHOR_SITE$ field for your video? And you have downloaded the files? For the latter I am just checking, I'm sure you most likely have but some people miss it from time to time.

Davor24, done. smile Thnx.

Jack of all trades in development, design, strategy.
Working as a Support Engineer.
Been here for 13 years and counting.
Davor24
Posts: 330
Reputation: 10

Message # 9 | 1:19 AM
Paradox, you have change only <?else?> to <?endif?>

plase change the whole code smile

Code
so.addVariable('file','http://www.youtube.com/watch?v=$AUTHOR_SITE$');


to

Code
so.addVariable('file','$AUTHOR_SITE$');


in working with both options but for first must used youtube ID and for second youtube link ( i think the second option is easier for users )...

or just change part where is written to copy the youtube link in the copy youtube ID...

I checked the code now and it works 100%

belmo996, you probably copied youtube link insted youtube ID...
Post edited by Davor24 - Sunday, 2012-07-29, 1:21 AM
Paradox
Old Guard
Posts: 3284
Reputation: 145

Message # 10 | 1:26 AM
Davor24, ahh, sorry, I thought it was only the tag - hadn't noticed the other changes. Doing so now. wink
Jack of all trades in development, design, strategy.
Working as a Support Engineer.
Been here for 13 years and counting.
belmo996
Posts: 123
Reputation: 4

Message # 11 | 9:50 AM
Ok,I found where is problem

SWFObject('$HOME_PAGE_LINK$/player.swf','mpl','580','400','9');

I replace with this:

SWFObject('$HOME_PAGE_LINK$/player/player.swf','mpl','580','400','9');

but now I have this message(on jw player):

Task queue failed at step 3:View setup failed:Error #1069 :/
Davor24
Posts: 330
Reputation: 10

Message # 12 | 11:02 AM
Quote (belmo996)
SWFObject('$HOME_PAGE_LINK$/player.swf','mpl','580','400','9');

I replace with this:

SWFObject('$HOME_PAGE_LINK$/player/player.swf','mpl','580','400','9');


Links should lead to the file where you upload it i write the code as an example but you should change all off the links for yours...

also pay attention if you are using:

Quote (Davor24)
so.addVariable('file','http://www.youtube.com/watch?v=$AUTHOR_SITE$');


you should put youtube ID ( not link ).

Quote (Davor24)
so.addVariable('file','$AUTHOR_SITE$');


you should put youtube link...

check which one you put in the code...
Post edited by Davor24 - Sunday, 2012-07-29, 11:03 AM
belmo996
Posts: 123
Reputation: 4

Message # 13 | 11:24 AM
Davor24, I use
Code
so.addVariable('file','$AUTHOR_SITE$');
and I put YouTube Link
Davor24
Posts: 330
Reputation: 10

Message # 14 | 11:26 AM
belmo996, please provide a link to the topic on your site where the player is not working...
belmo996
Posts: 123
Reputation: 4

Message # 15 | 11:33 AM
Davor24, all files in publisher with jw player doesn't work you can go to www.download-baza.ucoz.com/publ
uCoz Community » For Webmasters » Custom Solutions » How to make your personal jw player for youtube videos (for trailers, movies, gameplays etc...)
  • Page 1 of 2
  • 1
  • 2
  • »
Search: