From 914d2c984249ab005f8282ab506f30ff490c0870 Mon Sep 17 00:00:00 2001 From: whns Date: Wed, 17 Sep 2025 17:54:41 -0400 Subject: [PATCH] Patch deprecated mergeOptions usage --- src/plugin.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/plugin.js b/src/plugin.js index c6369f0..02d543f 100644 --- a/src/plugin.js +++ b/src/plugin.js @@ -131,8 +131,10 @@ class OverlayPlugin extends Plugin { } mapOverlays_(items) { + // Use merge function based on video.js version. + const merge = (videojs.obj && videojs.obj.merge) || videojs.mergeOptions; return items.map(o => { - const mergeOptions = videojs.mergeOptions(this.options, o); + const mergeOptions = merge(this.options, o); const attachToControlBar = typeof mergeOptions.attachToControlBar === 'string' || mergeOptions.attachToControlBar === true; if (!this.player.controls() || !this.player.controlBar) {