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

Forums

/

plugin with localhost

33 replies [Last post]

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.

Try using a full URI to load the plugin:

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

 

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.

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

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>

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

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

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://<strong>www.rpmvm.com</strong>/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://<strong>www.rpmvm.com</strong>/dev/flash/plugins/smartlogo_b/smartlogo_b.swf);
so.write('player');
</script>

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.

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>

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

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.

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

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

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

We have v4.5.224 now!

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

Try:

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

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

Thanks!

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.

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.

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

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!

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>

Hello.

I have problems too with my plugin or in genereal with external hosted files:

In my local apache I have the next example and it works with the files hosted in the same server (localhost)

<object id="player" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" name="player" width="400" height="815">
<param name="movie" value="player46.swf" />
<param name="allowfullscreen" value="true" />
<param name="allowscriptaccess" value="always" />
<param name="flashvars" value="file=xspfUTF8.xml&playlistsize=300&playlist=bottom&plugins=gad2.swf&repeat=list" />
<embed type="application/x-shockwave-flash"
id="player2"
name="player2"
src="player46.swf"
width="400"
height="615"
allowscriptaccess="always"
allowfullscreen="true"
flashvars="file=xspfUTF8.xml&playlistsize=300&playlist=bottom&plugins=gad2.swf&repeat=list"
/>
</object>

The problem occurs when I host the player or the plugin in S3, but i'm still accesing via my localhost with the following code:

<object id="player" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" name="player" width="400" height="815">
<param name="movie" value="http://formacion.s3.amazonaws.com/mediaplayer/player46.swf" />
<param name="allowfullscreen" value="true" />
<param name="allowscriptaccess" value="always" />
<param name="flashvars" value="file=xspfUTF8.xml&playlistsize=300&playlist=bottom&plugins=http://formacion.s3.amazonaws.com/mediaplayer/gad2.swf&repeat=list" />
<embed type="application/x-shockwave-flash"
id="player2"
name="player2"
src="http://formacion.s3.amazonaws.com/mediaplayer/player46.swf"
width="400"
height="615"
allowscriptaccess="always"
allowfullscreen="true"
flashvars="file=xspfUTF8.xml&playlistsize=300&playlist=bottom&plugins=http://formacion.s3.amazonaws.com/mediaplayer/gad2.swf&repeat=list"
/>
</object>

The crossdomain exist

http://formacion.s3.amazonaws.com/mediaplayer/crossdomain.xml

And I tried with v4.6.485 and v4.5.230 with the same result.

Even if i only change the player is not working

any help?

Can you provide a link to where you are running this?

i used this code in my site but logobox plugin didnt work? how can i fix it?

<script type="text/javascript" charset="utf-8">
var flashvars = {
width: "400",
height: "340",
autostart: "false",
repeat: "false",
backcolor: "111111",
frontcolor: "cccccc",
lightcolor: "66cc00",
stretching: "fill",
enablejs: "true",
mute: "false",
skin: "http://www.sporxvideo.com/wp-content/plugins/proplayer/players/skins/metarby10.swf",
image: "<?php $values = get_post_custom_values("image"); echo $values[0]; ?>",
plugins: 'http://sporxvideo.com/logobox/logobox.swf',
javascriptid: "92pp-single-4bf5b687e98b2",
image: "<?php $values = get_post_custom_values("image"); echo $values[0]; ?>",
file: '<?php $values = get_post_custom_values("video"); echo $values[0]; ?>'
};
var params = {
wmode: "transparent",
allowfullscreen: "true",
allowscriptaccess: "always",
allownetworking: "all"
};
var attributes = {
id: "obj-pro-player-92pp-single-4bf5b687e98b2",
name: "obj-pro-player-92pp-single-4bf5b687e98b2"
};
swfobject.embedSWF("http://www.sporxvideo.com/wp-content/plugins/proplayer/players/player.swf", "pro-player-92pp-single-4bf5b687e98b2", "400", "340", "9.0.0", false, flashvars, params, attributes);</script>

That should work - Can you provide a link to where you are running this?

i use it at www.sporxvideo.com

is there any problem in my logobox.xml file?

It looks like you need a crossdomain.xml file here - http://www.sporxvideo.com/crossdomain.xml

i added crossdomain.xml and this code for flashvar :

file:"<?php $values = get_post_custom_values("video"); echo $values[0]; ?>&plugins=logobox&logobox.file=http://www.sporxvideo.com/wp-content/themes/wpremix3/images/logo1.png&logobox.link=http://www.sporxvideo.com&logobox.align=right&logobox.margin=8&logobox.position=over",

fixed ;)

Great! :-)

I am using 5.3 please help?

Provide a link?