English 中文(简体)
javascript flashvar question with JW Player
原标题:

I don t know if I ll be able to get this answer here, but I m trying to get the JW Player to toggle between high and low quality settings. Here is my code:

<script type="text/javascript">
var so = new SWFObject( /lessons/videos/player.swf , mpl , 610 , 480 , 9 );
so.addParam( allowfullscreen , true );
so.addParam( allowscriptaccess , always );
so.addVariable( plugins ,  http://www.mbira.me/lessons/videos/plugins/hd/hd.swf );
so.addVariable( hd.state ,false);
so.addVariable( hd.autoswitch ,false);
so.addVariable( hd.bandwidth ,3200);
so.addVariable( hd.file ,  /lessons/videos/Buka_Tiende_from_calculator.flv );
so.addVariable( file , /lessons/L2/Nhemamusasa_Acoustic.flv );
so.write( mediaspace );
</script>

I read here that there is a setting that there is a default built into the HD plugin to switch determined on the users bandwidth. I downloaded a patch here: http://interfacelab.com/patch-for-hd-plugin-for-jw-player/

So I could disable that behavior to test, but still no luck. You can see in my code, that for now, I just have two different videos to toggle in order to test if things are working. I should say that both those videos are actually "high quality" for now, but that shouldn t make a difference I guess. Any ideas, and if not, any other places I could look to implement this functionality? Thanks! Joel

最佳回答
so.addVariable( plugins ,  plugins=hd-1 );

needs to be changed to:

so.addVariable( plugins ,  hd-1 );

The example page was incorrect...

问题回答

暂无回答




相关问题
selected text in iframe

How to get a selected text inside a iframe. I my page i m having a iframe which is editable true. So how can i get the selected text in that iframe.

How to fire event handlers on the link using javascript

I would like to click a link in my page using javascript. I would like to Fire event handlers on the link without navigating. How can this be done? This has to work both in firefox and Internet ...

How to Add script codes before the </body> tag ASP.NET

Heres the problem, In Masterpage, the google analytics code were pasted before the end of body tag. In ASPX page, I need to generate a script (google addItem tracker) using codebehind ClientScript ...

Clipboard access using Javascript - sans Flash?

Is there a reliable way to access the client machine s clipboard using Javascript? I continue to run into permissions issues when attempting to do this. How does Google Docs do this? Do they use ...

javascript debugging question

I have a large javascript which I didn t write but I need to use it and I m slowely going trough it trying to figure out what does it do and how, I m using alert to print out what it does but now I ...

Parsing date like twitter

I ve made a little forum and I want parse the date on newest posts like twitter, you know "posted 40 minutes ago ","posted 1 hour ago"... What s the best way ? Thanx.

热门标签