Name is required.
Email address is required.
Invalid email address
Answer is required.
Exceeding max length of 5KB

Is there a default volume param?, or can i add one?


Hi,
the version of the player i'm using is a couple of years old. I'd like to have the player open up to a default volume setting of about 60%?, is that possible?

i have some experience as a JS programmer and wouldn't mind opening up the swfobject.js file to set or add this if need be? is it possible?

thanks!

6 Community Answers

Ethan Feldman

JW Player Support Agent  
0 rated :

The default volume is 80.

All you need to do, to specify a volume, is use the volume flashvar, and you can set it between 0-100.

JW Player

User  
0 rated :

thank you, but what is the exact syntax?

i have tried the following but is not working. i don't know what the syntax should be.

so.addVariable('volume','10');
so.addParam('flashvars','volume', '10');
so.addParam('volume','10');
so.addParam('volume','10%');

JW Player

User  
0 rated :


bc.. so.addVariable('volume', '10');


If that isn't working, post your full player code so someone can examine it and advise you further.

JW Player

User  
0 rated :

thanks for responding. it didn't work, ...seems like it should. here's my code -

<div id="player">
<script type="text/javascript" src="mediaplayer/swfobject.js"></script>
<script type="text/javascript">
var so = new SWFObject('mediaplayer/player.swf','mpl','500','200','2');
so.addParam('allowscriptaccess','always');
so.addParam('allowfullscreen','true');
so.addParam('flashvars','&file=submarine_songs.xml&autostart=true&playlist=bottom&repeat=list&backcolor=cdcdcd&frontcolor=ae5ef2&lightcolor=dedede&screencolor=ffffff');
so.addVariable('repeat','always');
so.addVariable('volume', '0');
so.write('player');
</script>
</div>

thanks for the help,

Ethan Feldman

JW Player Support Agent  
0 rated :

You need to make this:

so.addParam(‘flashvars’,‘&file=submarine_songs.xml&autostart=true&playlist=bottom&repeat=list&backcolor=cdcdcd&frontcolor=ae5ef2&lightcolor=dedede&screencolor=ffffff’);

Look like this:

so.addParam(‘flashvars’,‘&file=submarine_songs.xml&autostart=true&playlist=bottom&repeat=list&backcolor=cdcdcd&frontcolor=ae5ef2&lightcolor=dedede&screencolor=ffffff&volume=0’);

When you add flashvars, it overrides the addvariable lines.

JW Player

User  
0 rated :


Also, don't wrap the JavaScript in the targeted HTML element.

bc.. <head>

<script src="mediaplayer/swfobject.js"></script>

</head>

<body>

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

<script type="text/javascript">
var so = new SWFObject('mediaplayer/player.swf', 'mpl', '500', '200', '9.0.124');
so.addParam('allowscriptaccess', 'always');
so.addParam('allowfullscreen', 'true');
so.addParam('flashvars', 'file=submarine_songs.xml&autostart=true&playlist=bottom&repeat=list&backcolor=cdcdcd&frontcolor=ae5ef2&lightcolor=dedede&screencolor=ffffff');
so.addVariable('repeat', 'always');
so.addVariable('volume', '0');
so.write('player');
</script>

</body>




Also, it's best to require a minimum version of Flash of at least v9,0,124,0.

This question has received the maximum number of answers.