mirror of
https://github.com/videojs/video.js.git
synced 2025-07-03 00:57:02 +02:00
Promote 'features' to the prototype
This commit is contained in:
@ -13,16 +13,16 @@ vjs.Html5 = vjs.MediaTechController.extend({
|
||||
/** @constructor */
|
||||
init: function(player, options, ready){
|
||||
// volume cannot be changed from 1 on iOS
|
||||
this.features['volumeControl'] = vjs.Html5.canControlVolume();
|
||||
this['volumeControl'] = vjs.Html5.canControlVolume();
|
||||
|
||||
// just in case; or is it excessively...
|
||||
this.features['playbackRate'] = vjs.Html5.canControlPlaybackRate();
|
||||
this['playbackRate'] = vjs.Html5.canControlPlaybackRate();
|
||||
|
||||
// In iOS, if you move a video element in the DOM, it breaks video playback.
|
||||
this.features['movingMediaElementInDOM'] = !vjs.IS_IOS;
|
||||
this['movingMediaElementInDOM'] = !vjs.IS_IOS;
|
||||
|
||||
// HTML video is able to automatically resize when going to fullscreen
|
||||
this.features['fullscreenResize'] = true;
|
||||
this['fullscreenResize'] = true;
|
||||
|
||||
// HTML video supports progress events
|
||||
this.features['progressEvents'] = true;
|
||||
@ -75,7 +75,7 @@ vjs.Html5.prototype.createEl = function(){
|
||||
// Check if this browser supports moving the element into the box.
|
||||
// On the iPhone video will break if you move the element,
|
||||
// So we have to create a brand new element.
|
||||
if (!el || this.features['movingMediaElementInDOM'] === false) {
|
||||
if (!el || this['movingMediaElementInDOM'] === false) {
|
||||
|
||||
// If the original tag is still there, clone and remove it.
|
||||
if (el) {
|
||||
|
Reference in New Issue
Block a user