Skip to content

Commit

Permalink
fix(FEC-13038): fix wrong media type reported as Image on change medi…
Browse files Browse the repository at this point in the history
…a cont. (#137)

* Add image track type only player sources with image is populated
  • Loading branch information
giladna committed Mar 15, 2023
1 parent 9a1b6b9 commit 67cce4c
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/adapter/adapter.js
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down

0 comments on commit 67cce4c

Please sign in to comment.