From b49d5bb4116f20fd9082fa96d179fc6c88175a8f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Javi=20N=C3=BA=C3=B1ez?= Date: Tue, 30 Jan 2018 11:39:42 +0100 Subject: [PATCH 1/2] Fix issue 109 - plugin() deprecated on videojs plugin --- lib/videojs-resolution-switcher.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/videojs-resolution-switcher.js b/lib/videojs-resolution-switcher.js index eae1c38..6f4aa98 100644 --- a/lib/videojs-resolution-switcher.js +++ b/lib/videojs-resolution-switcher.js @@ -362,6 +362,6 @@ }; // register the plugin - videojs.plugin('videoJsResolutionSwitcher', videoJsResolutionSwitcher); + videojs.registerPlugin('videoJsResolutionSwitcher', videoJsResolutionSwitcher); })(window, videojs); })(); From eb3491125bfb3a8f25599242077b33df0e2e5934 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Javi=20N=C3=BA=C3=B1ez?= Date: Tue, 30 Jan 2018 11:43:50 +0100 Subject: [PATCH 2/2] Fixing deprecated function videojs.addClass -> videojs.dom().addClass --- lib/videojs-resolution-switcher.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/videojs-resolution-switcher.js b/lib/videojs-resolution-switcher.js index 6f4aa98..2f3b14b 100644 --- a/lib/videojs-resolution-switcher.js +++ b/lib/videojs-resolution-switcher.js @@ -58,11 +58,11 @@ this.controlText('Quality'); if(options.dynamicLabel){ - videojs.addClass(this.label, 'vjs-resolution-button-label'); + videojs.dom().addClass(this.label, 'vjs-resolution-button-label'); this.el().appendChild(this.label); }else{ var staticLabel = document.createElement('span'); - videojs.addClass(staticLabel, 'vjs-menu-icon'); + videojs.dom().addClass(staticLabel, 'vjs-menu-icon'); this.el().appendChild(staticLabel); } player.on('updateSources', videojs.bind( this, this.update ) );