|
8 | 8 | * - http://www.gnu.org/copyleft/gpl.html
|
9 | 9 | *
|
10 | 10 | * Author: Mark J Panaghiston
|
11 |
| - * Version: 2.3.8 |
| 11 | + * Version: 2.3.9 |
12 | 12 | * Date: 30th May 2013
|
13 | 13 | */
|
14 | 14 |
|
|
469 | 469 | $.jPlayer.prototype = {
|
470 | 470 | count: 0, // Static Variable: Change it via prototype.
|
471 | 471 | version: { // Static Object
|
472 |
| - script: "2.3.8", |
| 472 | + script: "2.3.9", |
473 | 473 | needFlash: "2.3.5",
|
474 | 474 | flash: "unknown"
|
475 | 475 | },
|
|
1836 | 1836 | },
|
1837 | 1837 | volumeBar: function(e) { // Handles clicks on the volumeBar
|
1838 | 1838 | if(this.css.jq.volumeBar.length) {
|
1839 |
| - var offset = this.css.jq.volumeBar.offset(), |
| 1839 | + // Using $(e.currentTarget) to enable multiple volume bars |
| 1840 | + var $bar = $(e.currentTarget), |
| 1841 | + offset = $bar.offset(), |
1840 | 1842 | x = e.pageX - offset.left,
|
1841 |
| - w = this.css.jq.volumeBar.width(), |
1842 |
| - y = this.css.jq.volumeBar.height() - e.pageY + offset.top, |
1843 |
| - h = this.css.jq.volumeBar.height(); |
1844 |
| - |
| 1843 | + w = $bar.width(), |
| 1844 | + y = $bar.height() - e.pageY + offset.top, |
| 1845 | + h = $bar.height(); |
1845 | 1846 | if(this.options.verticalVolume) {
|
1846 | 1847 | this.volume(y/h);
|
1847 | 1848 | } else {
|
|
1852 | 1853 | this._muted(false);
|
1853 | 1854 | }
|
1854 | 1855 | },
|
1855 |
| - volumeBarValue: function(e) { // Handles clicks on the volumeBarValue |
1856 |
| - e.stopPropagation(); // Avoids duplicate call by the volumeBar parent. |
1857 |
| - this.volumeBar(e); |
| 1856 | + volumeBarValue: function() { // Handles clicks on the volumeBarValue |
| 1857 | + // The volumeBar handles this event as the event propagates up the DOM. |
1858 | 1858 | },
|
1859 | 1859 | _updateVolume: function(v) {
|
1860 | 1860 | if(v === undefined) {
|
|
1967 | 1967 | }
|
1968 | 1968 | },
|
1969 | 1969 | seekBar: function(e) { // Handles clicks on the seekBar
|
1970 |
| - if(this.css.jq.seekBar) { |
1971 |
| - var offset = this.css.jq.seekBar.offset(); |
1972 |
| - var x = e.pageX - offset.left; |
1973 |
| - var w = this.css.jq.seekBar.width(); |
1974 |
| - var p = 100*x/w; |
| 1970 | + if(this.css.jq.seekBar.length) { |
| 1971 | + // Using $(e.currentTarget) to enable multiple seek bars |
| 1972 | + var $bar = $(e.currentTarget), |
| 1973 | + offset = $bar.offset(), |
| 1974 | + x = e.pageX - offset.left, |
| 1975 | + w = $bar.width(), |
| 1976 | + p = 100 * x / w; |
1975 | 1977 | this.playHead(p);
|
1976 | 1978 | }
|
1977 | 1979 | },
|
1978 |
| - playBar: function(e) { // Handles clicks on the playBar |
1979 |
| - e.stopPropagation(); // Avoids duplicate call by the seekBar parent. |
1980 |
| - this.seekBar(e); |
| 1980 | + playBar: function() { // Handles clicks on the playBar |
| 1981 | + // The seekBar handles this event as the event propagates up the DOM. |
1981 | 1982 | },
|
1982 | 1983 | repeat: function() { // Handle clicks on the repeat button
|
1983 | 1984 | this._loop(true);
|
|
0 commit comments