From 67cce4c26ec2b4962daef3348f38f72fa7edfa36 Mon Sep 17 00:00:00 2001 From: Gilad Nadav Date: Wed, 15 Mar 2023 18:56:38 +0200 Subject: [PATCH] fix(FEC-13038): fix wrong media type reported as Image on change media cont. (#137) * Add image track type only player sources with image is populated --- src/adapter/adapter.js | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/adapter/adapter.js b/src/adapter/adapter.js index 512be88b..45ee6ac4 100644 --- a/src/adapter/adapter.js +++ b/src/adapter/adapter.js @@ -155,8 +155,12 @@ let YouboraAdapter = youbora.Adapter.extend({ /** @returns {void} - Listener for 'load_start' event. */ loadListener: function () { - if (this.player.isImage()) { - this.plugin.options['content.playbackType'] = MediaType.IMAGE; + if (!this.player.config.plugins.youbora.options['content.playbackType']) { + if (this.player.isImage()) { + this.plugin.options['content.playbackType'] = MediaType.IMAGE; + } else { + this.plugin.options['content.playbackType'] = null; + } } if (this.player.config.playback.preload !== 'auto') { this.playListener();