|
1895 | 1895 | mutedWorker: function(muted) {
|
1896 | 1896 | this.options.muted = muted;
|
1897 | 1897 | if(this.html.used) {
|
1898 |
| - this._html_mute(muted); |
| 1898 | + this._html_setProperty('muted', muted); |
1899 | 1899 | }
|
1900 | 1900 | if(this.flash.used) {
|
1901 | 1901 | this._flash_mute(muted);
|
|
1947 | 1947 | this.options.volume = v;
|
1948 | 1948 |
|
1949 | 1949 | if(this.html.used) {
|
1950 |
| - this._html_volume(v); |
| 1950 | + this._html_setProperty('volume', v); |
1951 | 1951 | }
|
1952 | 1952 | if(this.flash.used) {
|
1953 | 1953 | this._flash_volume(v);
|
|
2265 | 2265 | case "playbackRate" :
|
2266 | 2266 | this.options[key] = value = this._limitValue(value, this.options.minPlaybackRate, this.options.maxPlaybackRate);
|
2267 | 2267 | if(this.html.used) {
|
2268 |
| - this._html_playbackRate(value); |
| 2268 | + this._html_setProperty('playbackRate', value); |
2269 | 2269 | }
|
2270 | 2270 | this._updatePlaybackRate();
|
2271 | 2271 | break;
|
2272 | 2272 | case "defaultPlaybackRate" :
|
2273 | 2273 | this.options[key] = value = this._limitValue(value, this.options.minPlaybackRate, this.options.maxPlaybackRate);
|
2274 | 2274 | if(this.html.used) {
|
2275 |
| - this._html_defaultPlaybackRate(value); |
| 2275 | + this._html_setProperty('defaultPlaybackRate', value); |
2276 | 2276 | }
|
2277 | 2277 | this._updatePlaybackRate();
|
2278 | 2278 | break;
|
|
2703 | 2703 | }
|
2704 | 2704 | }
|
2705 | 2705 | },
|
2706 |
| - // These (next 4) html media property methods could have a generic function to set them. ie., Duplicate (functional) code. |
2707 |
| - _html_defaultPlaybackRate: function(dpbr) { |
| 2706 | + _html_setProperty: function(property, value) { |
2708 | 2707 | if(this.html.audio.available) {
|
2709 |
| - this.htmlElement.audio.defaultPlaybackRate = dpbr; |
| 2708 | + this.htmlElement.audio[property] = value; |
2710 | 2709 | }
|
2711 | 2710 | if(this.html.video.available) {
|
2712 |
| - this.htmlElement.video.defaultPlaybackRate = dpbr; |
2713 |
| - } |
2714 |
| - }, |
2715 |
| - _html_playbackRate: function(pbr) { |
2716 |
| - if(this.html.audio.available) { |
2717 |
| - this.htmlElement.audio.playbackRate = pbr; |
2718 |
| - } |
2719 |
| - if(this.html.video.available) { |
2720 |
| - this.htmlElement.video.playbackRate = pbr; |
2721 |
| - } |
2722 |
| - }, |
2723 |
| - _html_volume: function(v) { |
2724 |
| - if(this.html.audio.available) { |
2725 |
| - this.htmlElement.audio.volume = v; |
2726 |
| - } |
2727 |
| - if(this.html.video.available) { |
2728 |
| - this.htmlElement.video.volume = v; |
2729 |
| - } |
2730 |
| - }, |
2731 |
| - _html_mute: function(m) { |
2732 |
| - if(this.html.audio.available) { |
2733 |
| - this.htmlElement.audio.muted = m; |
2734 |
| - } |
2735 |
| - if(this.html.video.available) { |
2736 |
| - this.htmlElement.video.muted = m; |
| 2711 | + this.htmlElement.video[property] = value; |
2737 | 2712 | }
|
2738 | 2713 | },
|
2739 | 2714 | _flash_setAudio: function(media) {
|
|
0 commit comments