|
495 | 495 | supplied: "mp3", // Defines which formats jPlayer will try and support and the priority by the order. 1st is highest,
|
496 | 496 | auroraFormats: "wav", // List the aurora.js codecs being loaded externally. Its core supports "wav". Specify format in jPlayer context. EG., The aac.js codec gives the "m4a" format.
|
497 | 497 | preload: 'metadata', // HTML5 Spec values: none, metadata, auto.
|
498 |
| - volume: 0.8, // The volume. Number 0 to 1. |
| 498 | + volume: 0.512, // The volume. Number 0 to 1. 0.512 (logarithmic) == 0.8 (percentile). |
| 499 | + volumePower: 3, // The factor use for logarithmic volume control. Recommended = 3. Higher values create a sharper curve. See http://dr-lex.be/info-stuff/volumecontrols.html |
499 | 500 | muted: false,
|
500 | 501 | remainingDuration: false, // When true, the remaining time is shown in the duration GUI element.
|
501 | 502 | toggleDuration: false, // When true, clicks on the duration toggle between the duration and remaining display.
|
|
2265 | 2266 | }
|
2266 | 2267 | },
|
2267 | 2268 | volume: function(v) {
|
| 2269 | + v = Math.pow(v,this.options.volumePower); |
2268 | 2270 | this.volumeWorker(v);
|
2269 | 2271 | if(this.options.globalVolume) {
|
2270 | 2272 | this.tellOthers("volumeWorker", function() {
|
|
2336 | 2338 | }
|
2337 | 2339 | if(this.css.jq.volumeBarValue.length) {
|
2338 | 2340 | this.css.jq.volumeBarValue.show();
|
2339 |
| - this.css.jq.volumeBarValue[this.options.verticalVolume ? "height" : "width"]((v*100)+"%"); |
| 2341 | + this.css.jq.volumeBarValue[this.options.verticalVolume ? "height" : "width"]((Math.pow(v,1/this.options.volumePower)*100)+"%"); |
2340 | 2342 | }
|
2341 | 2343 | if(this.css.jq.volumeMax.length) {
|
2342 | 2344 | this.css.jq.volumeMax.show();
|
|
0 commit comments