PLEASE HELP - Proper syntax for passing "flashvars" and "flash parameters to reskin FLV player

5 messages Options
Embed this post
Permalink
hothousegraphix

PLEASE HELP - Proper syntax for passing "flashvars" and "flash parameters to reskin FLV player

Reply Threaded More More options
Print post
Permalink
(This post was updated on )
I can't seem to locate any examples for passing multiple parameters and variables to the JWPLayer.

My goal here is to reskin the player.

How would I pass this necessary info or would this require a hack of the JS?
<script type="text/javascript">
  var s1 = new SWFObject("/scripts/shadowbox-build-3.0b/libraries/mediaplayer/player.swf","ply","580","326","9","#F3F3F3");
  s1.addParam("allowfullscreen","true");
  s1.addParam("allownetworking","all");
  s1.addParam("allowscriptaccess","always");
  s1.addParam("wmode", "opaque");
  s1.addParam("flashvars","file=/videos/my.flv&skin=/scripts/shadowbox-build-3.0b/libraries/mediaplayer/overlay.swf&frontcolor=ffffff&lightcolor=F15922&controlbar=over&stretching=fill");
  s1.write("container");
</script>


What syntax should be used to pass multiple parameters?

The only example I've been able to locate only uses one parameter
<a href="my.flv" title="myTitle" rel="shadowbox;width=600;height=450" ;options={flashParams:{bgcolor:'#ffffff '}}">test</a>


Anyone able to provide some guidance?

Thanks
hothousegraphix

Re: Proper syntax for passing "flashvars" and "flash parameters to reskin FLV player

Reply Threaded More More options
Print post
Permalink


I'm hoping someone might be able to clue me in because there is nothing in the docs that actually indicates exactly how one would properly format multiple variables and then send to the FLV player via flashvars.

There is indication that this can be done on a per-link basis but again, though examples exist none represent the type of situation I'm attempting to achieve. I've spent the last 12 hours combing the forums for some sort of clue and there are little nuggets but nothing definitive.

I'm able to achieve the re-skining of the JWPlayer outside of the Shadowbox environment so I'm confident it can be done but I'm perplexed as to how to achieve.

I have found a work around which would avoid Shadowbox interaction with the JWPlayer altogether and simply have SB call a hidden div that contains my FLVPlayer object/embed. Not super kludgy but I would really like this to work as advertised.

Any advice would be extremely appreciated!
hothousegraphix

Re: Proper syntax for passing "flashvars" and "flash parameters to reskin FLV player

Reply Threaded More More options
Print post
Permalink
This has been incredibly frustrating. Impossible to post examples because the documentation neglects to cover this subject in full. So all attempts are like grabbing at the wind to catch a fly.

Regardless, I'm trying to recreate the passing of multiple flashvars and flash parameters as is done by the js below:
<script type="text/javascript">
  var s1 = new SWFObject("/scripts/shadowbox-build-3.0b/libraries/mediaplayer/player.swf","ply","580","326","9","#F3F3F3");
  s1.addParam("allowfullscreen","true");
  s1.addParam("allownetworking","all");
  s1.addParam("allowscriptaccess","always");
  s1.addParam("wmode", "opaque");
  s1.addParam("flashvars","file=/videos/my.flv&skin=/scripts/shadowbox-build-3.0b/libraries/mediaplayer/overlay.swf&frontcolor=ffffff&lightcolor=F15922&controlbar=over&stretching=fill");
  s1.write("container");
</script>

I've tried
<script type="text/javascript">
Shadowbox.init({
	players: ["html","img","flv"],
	overlayColor: "#0C0012",
	overlayOpacity: 0.6;
	flashVars: file=/media/ATT.flv&skin=/scripts/shadowbox-build-3.0b/libraries/mediaplayer/overlay.swf&frontcolor=ffffff&lightcolor=F15922&controlbar=over&stretching=fill"

//Also tried this formatting for flashvars 
	flashVars: {file:"/media/ATT.flv", skin: "/scripts/shadowbox-build-3.0b/libraries/mediaplayer/overlay.swf", frontcolor: "ffffff", lightcolor: "F15922", controlbar: "over", stretching: "fill"}
});

//And this
	flashVars: {file:"/media/ATT.flv"; skin: "/scripts/shadowbox-build-3.0b/libraries/mediaplayer/overlay.swf"; frontcolor: "ffffff"; lightcolor: "F15922"; controlbar: "over"; stretching: "fill"}


</script>

No Luck with any of these attempts! They force the download of the FLV - not what I want.

I've tried working with the per link method -this is what I'd prefer to use:
//This basic method works but I'm not passing anything
<a href="/media/ATT.flv" rel="shadowbox; width=580; height=326">

//Tried this and passing parameters that should cancel the defaults
<a href="/media/ATT.flv" allowfullscreen="false" allowscriptaccess="always" wmode="transparent" type="application/x-shockwave-flash" rel="shadowbox; width=580; height=326">test_2</a>


Also, in combing thru shadowbox.js, I've found (around line 246 in source version)
flashVars: {},              // flash vars

Again, not formatting examples for multiple values.

Should I be hacking this file to pass these values?

Please, any clues would be much appreciated!

hothousegraphix

Re: Proper syntax for passing "flashvars" and "flash parameters to reskin FLV player

Reply Threaded More More options
Print post
Permalink
If I edit shadowbox.js around line 241
flashParams: {
   bgcolor:            '#000000',
   allowFullScreen:    true,
   allownetworking:    'all',
   allowscriptaccess:  'always'
},

flashVars: {
    file: '/videos/my.flv&skin=/scripts/shadowbox-build-3.0b/libraries/mediaplayer/overlay.swf',
    frontcolor: '0xffffff',
    lightcolor: '0xF15922',
    controlbar: 'over',
    stretching: 'fill'
},

and from the page my link look like:
<a href="http://www.mierkagirten.com/media/ATT.flv" rel="shadowbox; width=580; height=326">test</a>


This does in fact pass the proper parameters to the JWPlayer to reskin it. Can I pass these flashVars on the init instead?
hothousegraphix

Re: Proper syntax for passing "flashvars" and "flash parameters to reskin FLV player

Reply Threaded More More options
Print post
Permalink
I've tried reverting shadowbox.js back to it's provided state and passing these values on the init function - no luck. I've tried passing on the Shadowbox.open function:
window.onload = function(){
    Shadowbox.open({
	flashParams: {
		bgcolor: '#000000',
		allowFullScreen: true,
		allownetworking: 'all',
		allowscriptaccess: 'always'
	},
	flashVars: {
		skin:'/scripts/shadowbox-build-3.0b/libraries/mediaplayer/overlay.swf',
		frontcolor: '0xffffff',
		lightcolor: '0x8B39B1',
		controlbar: 'over',
		stretching: 'fill'
	}
    });
};

and the Shadowbox.setup function
window.onload = function(){
    Shadowbox.setup("li a", {
	flashParams: {
		bgcolor: '#000000',
		allowFullScreen: true,
		allownetworking: 'all',
		allowscriptaccess: 'always'
	},
	flashVars: {
		skin:'/scripts/shadowbox-build-3.0b/libraries/mediaplayer/overlay.swf',
		frontcolor: '0xffffff',
		lightcolor: '0x8B39B1',
		controlbar: 'over',
		stretching: 'fill'
	},
    });
};

No Luck as well!!!!! I think some documentation as to how to achieve this would be in order!