Go
Not registered? Sign up!

plugin with localhost

Google Translate
24 posts | return to the Plugins forum | get the rss feed for this thread

Mar. 09, 2009kurt59

Hello,
First, sorry for my english, I'm french.

I have created a plugin but, when I start it with wamp, the plugin is not visble.
But when I open the player.swf I have compiled, my plugin is visible.
I don't understand why it doesn't work in local.

Thanks for your help.

Mar. 09, 2009lefTy

Try using a full URI to load the plugin:
    'plugins':      'http://localhost/path/plugin1,http://localhost/path/plugin2',


 

Mar. 11, 2009juaron

Just a little more details: the player checks if the url of the player-swf contains "http". If it doesn't, a relative path is used. If it does, another check is performed, this time upon the url of the plugin. if that url contains "http", it uses the url specified, otherwise the plugin is fetched from the longtail repository.
So lefTy's suggestion should solve your problem.

Mar. 11, 2009kurt59

Thanks for your answers. My problem is solved, it was just the basedir line I have not modified.

Jun. 22, 2009Evan

I am having the opposite problem I test locally and my plugin loads. After I posted to the server it does not.

to insure it's not my plugin I tried the same thing with the demo plugin positioning .swf and I am having the same problem.

here is the code:
<script type="text/javascript" src="http://www.jeroenwijering.com/embed/swfobject.js"></script>

<div id="player">This text will be replaced</div>

<script type="text/javascript">
var so = new SWFObject('flash/player.swf','mpl','470','320','9');
so.addParam('allowscriptaccess','always');
so.addParam('allowfullscreen','true');
so.addParam('flashvars','&file=../video/driver.flv&skin=flash/rpmvmskin1.swf&plugins=flash/plugins/smartlogo_b/smartlogo_b.swf');
so.write('player');
</script>

Jun. 22, 2009ringo

Please read the posts above.

You have to use a full URI for the plugin, otherwise the player will try to load it from http://plugins.longtailvideo.com

Jun. 22, 2009Evan

Actually I did -albeit wrong because it didn't work.
-So I tried other things

do I put in the whole url like this:
http://www.rpmvm.com/dev/flash/plugins/smartlogo_b/smartlogo_b.swf

or

http://localhost/dev/flash/plugins/smartlogo_b/smartlogo_bswf

I know this is trivial but for the last two days I was testing the javascript, my actionscript, recompiling my swf,the placement of folders -server settings

credit me for effort -I appreciate the help greatly

Jun. 23, 2009lost

The domain that you load the Flash movie (player.swf) from must be exacttly the same as the domain that you load the plugin from, unless you place a cross-domain policy file on the domain that is hosting the plugin.

<script type="text/javascript">
var so = new SWFObject(http://www.rpmvm.com/dev/flash/player.swf','mpl','470','320','9');
so.addParam('allowscriptaccess','always');
so.addParam('allowfullscreen','true');
so.addParam('flashvars','file=../video/driver.flv&skin=flash/rpmvmskin1.swf&plugins=http://www.rpmvm.com/dev/flash/plugins/smartlogo_b/smartlogo_b.swf);
so.write('player');
</script>

Jun. 23, 2009J. Fishwick

I understand that, in order to load the plugin locally I need to do something like this in the flashvars:

'plugins': 'http://localhost/path/plugin1,http://localhost/path/plugin2'

And I understand that the behavior of the player-swf is as follows:

"The player checks if the url of the player-swf contains "http". If it doesn't, a relative path is used. If it does, another check is performed, this time upon the url of the plugin. if that url contains "http", it uses the url specified, otherwise the plugin is fetched from the longtail repository."

My problem is that my local environment is a DVD, not a web server. The URI will instead look something like: file:///D:/path/plugin1

So I have two concerns:

1) Will the swf load locally from "file"? If not, how do I need to modify the swf?
2) Is there some method I could get around the fact that the DVD may not be mounted to "D:"?

Thanks for any pointers.

Jun. 23, 2009lost

As long as the domains (or lack of them) match EXACTLY, you can load without the drive letter.

Internet Explorer's security model is a bit different than Firefox's, so you might have to experiment a bit to get it to be cross-browser.

Here's some code that works, illustrating the various forms of the "file://" pseudo protocol, including no URI/URL/path at all.

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

<html lang="en">

  <head>

    <!-- <script src="file:///C:/Program%20Files/FLVCheck/swfobject-2.2.js"></script> -->
    <!-- <script src="file:///Program%20Files/FLVCheck/swfobject-2.2.js"></script> -->
    <script src="swfobject-2.2.js"></script>

    <title>Local Player - JWMP v4.5.x - swfobject v2.2</title>

    <script type="text/javascript">
      var flashvars =
      {
      //'file':                'file:///C:/Program%20Files/FLVCheck/playlist_local.xml',
      //'file':                'file:///Program%20Files/FLVCheck/playlist_local.xml',
        'file':                'playlist_local.xml',
      //'file':                'file:///C:/Program%20Files/FLVCheck/playlist_local_rss.xml',
      //'file':                'file:///Program%20Files/FLVCheck/playlist_local_rss.xml',
      //'file':                'playlist_local_rss.xml',
      //'file':                'file:///C:/Program%20Files/LightTPD-1.4.22-1/htdocs/Movies/1408.flv',
      //'file':                'file:///Program%20Files/LightTPD-1.4.22-1/htdocs/Movies/1408.flv',

//...works - online/online - http://127.0.0.1:8081/local_v4.html
//'streamer':            'lighttpd',
//'file':                'http://127.0.0.1:8081/Movies/1408.flv',
//'file':                'http://127.0.0.1:8081/playlist_local.xml',
//swfobject.embedSWF('http://127.0.0.1:8081/player-4.5.223.swf', 'player', '320', '440', '9.0.124', false, flashvars, params, attributes);

//...won't work - can't play local/offline files with an online player
//swfobject.embedSWF('http://willswonders.myip.org:8085/php/player-4.5.223.swf', 'player', '320', '440', '9.0.124', false, flashvars, params, attributes);

//...won't work - can't play online files with a local/offline player
//'file':                'http://www.jeroenwijering.com/upload/acera.flv',
//'file':                'http://willswonders.myip.org:8085/php/Blondie - Heart of Glass.flv',

        'author':              'Stephen King',
        'title':               '1408',
        'playlist':            'bottom',
        'playlistsize':        '180',
        'respectduration':     'true',
        '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('file:///C:/Program%20Files/FLVCheck/player-4.5.223.swf', 'player', '320', '440', '9.0.124', false, flashvars, params, attributes);
    //swfobject.embedSWF('file:///Program%20Files/FLVCheck/player-4.5.223.swf', 'player', '320', '440', '9.0.124', false, flashvars, params, attributes);
      swfobject.embedSWF('player-4.5.223.swf', 'player', '320', '440', '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>

Jun. 23, 2009lost

The metaviewer plugin seems to load locally using the code posted above, like this:
        'plugins':             'metaviewer',


So maybe the other plugins will also load locally???

Jun. 24, 2009Evan

I am still having some trouble applying a plugin one posted too a server I tried your suggestion

I may have a mistake -do you mind just looking at it and seeing if I missed something again as I have gone over it a dozen times myself.


<!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" />

<script type="text/javascript" src="http://www.jeroenwijering.com/embed/swfobject.js"></script>
<title>plugin test</title>
</head>

<body>

<div id="makeithappen">




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

<script type="text/javascript">
var so = new SWFObject(http://www.rpmvm.com/dev/flash/player.swf','mpl','470','320','9');
so.addParam('allowscriptaccess','always');
so.addParam('allowfullscreen','true');
so.addParam('flashvars','file=../video/driver.flv&skin=flash/rpmvmskin1.swf&plugins=http://www.rpmvm.com/dev/flash/plugins/smartlogo_b/smartlogo_b.swf);
so.write('player');
</script>


</div>




</body>
</html>


I appreciate it.

Jun. 24, 2009lost


<!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>

    <title>plugin test</title>

    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />

    <script src="http://www.jeroenwijering.com/embed/swfobject.js"></script>

  </head>

  <body>

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

<script type="text/javascript">
  var so = new SWFObject(http://www.rpmvm.com/dev/flash/player.swf', 'mpl', '470', '320', '9.0.124');
      so.addParam('allowscriptaccess',   'always');
      so.addParam('allowfullscreen',     'true');
      so.addVariable('file',             '../video/driver.flv');
      so.addVariable('skin',             'http://www.rpmvm.com/dev/flash/rpmvmskin1');
      so.addVariable('plugins',          'http://www.rpmvm.com/dev/flash/plugins/smartlogo_b/smartlogo_b');
      so.write('player');
</script>

  </body>

</html>


Your file URIs don't seem to be accessible from the Internet. Are you sure they are all right?
http://www.rpmvm.com/dev/flash/player.swf -- 404
http://www.rpmvm.com/dev/flash/rpmvmskin1.swf -- 404
http://www.rpmvm.com/dev/flash/plugins/smartlogo_b/smartlogo_b.swf -- 404
http://www.rpmvm.com/dev/flash/video/driver.flv -- 404

Be sure that you have a player version between v4.4.141 & v4.5.223 (latest).

Jun. 25, 2009valter

people take attention with the version of the players,

i spend a lot of days to understand what was my problem and finally i see that my player v4.4.198 don't run plugins locally

now i have the v4.5.223 and it runs very well

Jun. 26, 2009BENNYSOFT

That's true but we have no release of the v4.5, unfortunately.

Jun. 26, 2009lost

We have v4.5.224 now!

Jun. 30, 2009Lucki

I want to host embed-1,quickkeys-1 and googlytics-1 localy.

How can i host them, because i canot find them on http://developer.longtailvideo.com/trac/browser/plugins

Sry for my romanian english.
Thanx

Jun. 30, 2009lost

Try:
http://plugins.longtailvideo.com/embed-1.swf

Jul. 01, 2009hetes

Hi!
Where can i download the latest version of the player(v4.5.xxx) ?

Thanks!

Jul. 01, 2009hetes

I have same problem. On localhost drelated plugin works, but if i upload the files to my server, the plugin doesn't work. I use the original source code of the plugin.
Now i have the v4.4.198 mediaplayer.swf.

Jul. 01, 2009lost

Players & source here: http://developer.longtailvideo.com/trac/

Click Source Code, trunk, as3, then the number in the Rev column-player.swf row. Then click on the release that you want in the Rev column.

Jul. 02, 2009hetes

Thank you, lost! It works great with the new player!

Jul. 07, 2009J. Fishwick

I've tried the example given by lost above.

However, no matter what I do, I cannot seem to get plugins to load locally. More specifically, closed captioning...

Does any one have a working example of how to do this?

Ultimately I would like to have the player in a page on a DVD which could be played on any computer... I'm still not sure from the example how one can get around not specifying the drive letter...

Thanks!

Jul. 07, 2009lost

Here's a simplified version of the code.

Just to make sure that I wasn't just blowin' smoke, I burned the five files to a CD.

Double-clicking on Simple_Local.html on the CD fires up a browser and plays the video — FF & IE.

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

<html lang="en">

<!--

CD Files:

Simple_Local.html
swfobject-2.2.js
player-4.5.227.swf
metaviewer.swf
Bubble Movie.flv

-->

  <head>

    <title>Local Player - JWMP v4.5.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',
        '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-4.5.227.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>

Add a reaction

You can also return to the category or try this search for related threads.


 

Search the Forums

Go

Support

Support Here are some helpful links to learn more about the JW Player™:

Monetize Your Video

Monetize Your Video Earn money with ads from LongTail's AdSolution. Watch our demos and sign up now!

Why Buy a License?

Why Buy a License? If you don’t buy a commercial license, you cannot use a JW Player™ on (i) a site that has ads; (ii) a corporate site; or a (iii) CMS. Our licenses are very inexpensive, so what are you waiting for? Buy a license today.