From 7787c36f5079ba0a819a0a1a715d34192ba17fd0 Mon Sep 17 00:00:00 2001 From: Tsachi Shlidor Date: Wed, 4 Dec 2024 14:56:57 +0200 Subject: [PATCH] fix: videojs 8 deprecation warning for videojs.bind (#744) --- .../components/SourceMenuButton.js | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/plugins/videojs-http-source-selector/components/SourceMenuButton.js b/src/plugins/videojs-http-source-selector/components/SourceMenuButton.js index 5165fb8d..cf688085 100644 --- a/src/plugins/videojs-http-source-selector/components/SourceMenuButton.js +++ b/src/plugins/videojs-http-source-selector/components/SourceMenuButton.js @@ -36,8 +36,7 @@ class SourceMenuButton extends MenuButton { } // Bind update to qualityLevels changes - // Todo: switch to Function.prototype.bind - this.player_.qualityLevels().on(['change', 'addqualitylevel', 'removequalitylevel'], videojs.bind(this, this.update)); + this.player_.qualityLevels().on(['change', 'addqualitylevel', 'removequalitylevel'], this.update.bind(this)); } /**