Order Now AdSolution Sign Up | Login » Bits on the Run Sign Up | Login »

Forums

/

showing captions on player loaded locally

14 replies [Last post]

Hello-

I am looking to a launch an instance of the player from an html page on a DVD. Everything works beautifully, except I can’t get the closed caption feature to work. The same code works perfectly online <http://f1shw1ck.com/cc_test/index_ch01.html>.

I wouldn't really know, but I think perhaps the problem is that the captions-1 plugin needs to be served locally as well? But maybe that doesn't make any sense. If I am on to something, I would appreciate any tips on how to do so, searching through the forum finds only leads that have been taken down or are obsolete.

Appreciate any and all help on this one!

thanks Ringo. I still have some concerns that addressed in the post you referenced, but I added them there.

Oh yeah!

I kinda, sorta forgot about the main point, which is, "Can you load a plugin from a local folder?"

OK, gotta do some experimenting.

Having the same problem here. I want to load the captions plugin locally (from hard drive or dvd). I can get everything working except for the captions plugin.

Yes, I've looked at: http://www.longtailvideo.com/support/forum/Plugins/16311/plugin-with-localhost

...I also noticed that there's no follow-up response from ringo since last June. If there's a solution to this, I can't find it.

Simple_Local_v5.html (Updated)

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">

<html lang="en">

<!--

CD/DVD Files:

Simple_Local_v5.html
swfobject-2.2.js
Big Buck Bunny.flv
metaviewer.swf
captions.swf
replay.swf
captions.xml
player-5.1.898.swf

-->

  <head>

    <title>Simple Local Player - JWMP v5.1.x - swfobject v2.2</title>

    <script src="swfobject-2.2.js"></script>

    <script type="text/javascript">
      var flashvars =
      {
        'file':                     'Big Buck Bunny.flv',
        'title':                    'The Peach Open Movie Project - Big Buck Bunny',
        'playlist':                 'bottom',
        'playlistsize':             '60',
      //'plugins':                  './metaviewer.swf',
        'plugins':                  './captions.swf,./replay.swf',
        'captions.file':            'captions.xml',
        'captions.state':           'true',
        'captions.back':            'true',
        'captions.fontsize':        '13',
        'backcolor':                'FFFFFF',  // face of buttons
        'frontcolor':               '404040',  // button symbols & playlist text
        'lightcolor':               '808080',  // highlighted playlist item
        'screencolor':              'CCEEFF',  // screen background color
        'id':                       'playerID',
        'autostart':                'false'
      };

      var params =
      {
        'allowfullscreen':          'true',
        'allowscriptaccess':        'always',
        'bgcolor':                  '#FFFFFF'
      };

      var attributes =
      {
        'id':                       'playerID',
        'name':                     'playerID'
      };

      swfobject.embedSWF('player-5.1.898.swf', 'player', '320', '320', '9.0.124', false, flashvars, params, attributes);
    </script>

  </head>

  <body>

    <div id="playercontainer" class="playercontainer"><a id="player" class="player" href="http://www.adobe.com/shockwave/download/download.cgi?P1_Prod_Version=ShockwaveFlash">Get the Flash Player to see this video</a></div>

  </body>

</html>

Note the list of files that are required on the CD/DVD.

The metaviewer and replay plugins aren't required.

Of course, use your media and data files.

The captions plugin is the v4 plugin from here:

    http://developer.longtailvideo.com/trac/browser/plugins/captions/v4

Tested from a CD...

Hey Guys,

Still having a little trouble with this, here's my code for my player, including the flashvars how would I change this from online to offline?

[quote]
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Video + Slide Presentation w/ thumbnails</title>
<link href="style.css" rel="stylesheet" type="text/css" />
</head>

<body>
<div id="banner"><center><img src="images/topflash.jpg" alt="player" width="999" height="62"></center></div>
<div id="container">
<div id="videoplayer">
<script type='text/javascript' src='swfobject.js'></script>
<script type="text/javascript">
var s1 = new SWFObject("mediaplayer5_1.swf","mediaplayer5_1","955","615","9");
s1.addParam("allowfullscreen","true");
s1.addParam('wmode','opaque');
s1.addVariable("displaywidth","320");
s1.addVariable("displayheight","240");
s1.addVariable("file","playlist.xml");
s1.addVariable('logo.file','images/logo.png');
s1.addVariable('logo.link','http://www.mediavisionz.com.au');
s1.addVariable("skin", "skins/stormtrooper.zip");
s1.addVariable('plugins', 'slidesync-1,slidescroller-1,infobox-1');
s1.addVariable('slidesync.xmlPath','slides.xml');
s1.addVariable('slidesync.position','right');
s1.addVariable('slidesync.size','635');
s1.addVariable('slidescroller.xmlPath','slides.xml');
s1.addVariable('slidescroller.position','bottom');
s1.addVariable('slidescroller.size','150');
s1.addVariable('infobox.position','bottom');
s1.addVariable('infobox.size','200');
s1.write("videoplayer");
</script>
</div>

</div>
<div id="footer"></div>
</body>
</html>
[/quote]

Thanks guys!

@Blakelolzzz - If you are going to be running the plugins locally, you are going to have to download the plugins, and then before each plugin call add ./, and then make each plugin end in .swf

Hi guys

Could you tell me where I can download the plugins for "SlideSync" and "SlideScroller", please?
So that I can run the plugins locally.

Thank you.

@MV Takeshi - If you use Firebug, you can see all of the requests on both of those pages, and download the swfs from there.

Thank you Ethan.

I've installed Firebug but still I have no idea where I can find the path to download the "SlideSync" and "SlideScroller" plugins.

Could you please tell me the link paths to download those plugins, or tell me how I can find the path with Firebug please?

Thank you.

I would like to share my code (using swfobject 1.5 and JW Player 4.6.485) to provide one more example of running captions plugin locally:

<SCRIPT src="swfobject.js" type=text/javascript></SCRIPT>

<DIV id=mediaspace>The player goes here.</DIV>

<SCRIPT type=text/javascript>
  var so = new SWFObject('player.swf','ply','440','349','9','#ffffff');
  so.addParam('allowfullscreen','true');
  so.addParam('allowscriptaccess','always');
  so.addParam('wmode','opaque');
  so.addVariable('file','video.flv');
  so.addVariable('plugins', '<strong>./captions.swf</strong>');
  so.addVariable('captions.file', '<strong>subtitles.srt</strong>'); <em>// using SubRip format</em>
  so.addVariable('captions.state', '<strong>true</strong>');
  so.addVariable('captions.back', '<strong>true</strong>');
  so.addVariable('captions.fontsize', '<strong>14</strong>');
  so.write('mediaspace');
</SCRIPT>

All the files are in the same folder: player.swf, the video file, the subtitles file in SubRip format and captions.swf, controlbar.png and dock.png, downloaded from here: http://developer.longtailvideo.com/trac/browser/plugins/captions/v4

-Ethan
Thank you for your help.

-Zenho
Thank you for sharing very useful code.

Np