Subtitles using JWPlayer?

Got an idea? Missing something? Post your feature request here.

Moderator: moderators

Re: Subtitles using JWPlayer?

Postby Tenaya » Thu Aug 09, 2012 2:47 pm

I'm sorry if my previous post was a bit unclear. I was very tired when i posted it.

Noxeus, did you compile the captions.swf file and put it in the 'flash' directory? Otherwise it won't load the plugin. Changing the line 'plugins:"./flash/captions.swf",' to
Code: Select all
plugins:"captions-2",

will make JWplayer load the plugin from the JWplayer site. The point of compiling your own is so you can make a few changes in the plugin.

In any case, i don't have that exact file anymore. Reformat and all that. I do, however, have one with my latest changes. Theres a few more options to customize the subtitle how you like. Size, color etc. I also replaced the offset dropbox with a custom sliderbar. Makes it a bit easier for me at least. I won't go over all the code changes cause there are a few. If you would like some explanation of the code then feel free to ask.

2012-08-09_1623.png

Pic taken on virtual machine.

Also i tried to upload the subsonic.war file to this site but for some reason it wont let me. Here is another link that should hopefully stay up for a while.

http://www.filefactory.com/file/5m0sro9 ... bsonic_war

Good luck.

Edit: I forgot to mention, if you stream flv files directly (no transcode). Some of the settings will make the subtitle out of sync. It's easy to fix but since i don't stream .flv files directly i won't bother with it.

Also, it's for 4.7.b2 not b3. If you want it for b3 all you have to do is copy videoPlayer.jsp and the captions.swf to the b3 war file. No clue if any code changed in videoPlayer.jsp in b3 so try it on your own risk. When i have time i might update it to b3.
Tenaya
 
Posts: 3
Joined: Tue Jul 24, 2012 3:50 pm

Re: Subtitles using JWPlayer?

Postby Tenaya » Thu Aug 09, 2012 3:21 pm

Castius wrote:Do you mind explaining those two lines? I don't know java and i would love to understand what you are doing there.
Why -6 on the length and why 737274


This might be a bit late but the '737274' refers to the hexadecimal value of 'srt'. 73 for 's', 72 for 'r', 74 for 't'. In short, what the code does is removing whatever extension the video file has and adding 'srt' to it.

Also it's not java :) It's JavaScript. I know the name can be confusing to those that don't code but the difference is quite substantial.

Here's a reference to the substring method if you are interested.

http://www.w3schools.com/jsref/jsref_substring.asp
Tenaya
 
Posts: 3
Joined: Tue Jul 24, 2012 3:50 pm

Re: Subtitles using JWPlayer?

Postby nikku » Tue Aug 14, 2012 3:21 pm

Did you add the line for srtPath as per the previous instructions? I had forgotten to do that at one point and it broke things for me o:
nikku
 
Posts: 14
Joined: Sun Aug 14, 2011 11:39 pm

Re: Subtitles using JWPlayer?

Postby karvanapa » Sun Sep 23, 2012 11:26 am

Anyone got this working with 4.7 final release? I've been waiting for subtitle support, but I think I lack the skills to make Tenaya's modifications work...
karvanapa
 
Posts: 13
Joined: Sun Jun 20, 2010 8:24 pm

Previous

Return to Feature Requests

Who is online

Users browsing this forum: No registered users and 8 guests