From e5c1c6f8c48a5f4ae33eaff176489773f71cecf8 Mon Sep 17 00:00:00 2001 From: Cat Date: Thu, 5 Jul 2018 11:30:55 +0200 Subject: [PATCH 1/2] Embed: don't attempt to remove error element if it is not shown --- embed/core.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/embed/core.js b/embed/core.js index 72f588ac..722cc2ef 100644 --- a/embed/core.js +++ b/embed/core.js @@ -915,7 +915,7 @@ function mistPlay(streamName,options) { button.appendChild(t); err.appendChild(button); button.onclick = function(){ - options.target.removeChild(err); + if (err.parentElement) { err.parentElement.removeChild(err); } delete options.startCombo; if (err.timeOut) { clearTimeout(err.timeOut); From 3a699ae3e1f81df1ea8fd3235bd819363b3e7fd9 Mon Sep 17 00:00:00 2001 From: Cat Date: Wed, 4 Jul 2018 11:37:44 +0200 Subject: [PATCH 2/2] Embed: added workaround for IE-only issue when seeking after trackswitch --- embed/core.js | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/embed/core.js b/embed/core.js index 722cc2ef..4aae50e0 100644 --- a/embed/core.js +++ b/embed/core.js @@ -161,7 +161,19 @@ MistPlayer.prototype.setTracks = function(usetracks){ this.element.load(); } - this.element.currentTime = time; + + if (this.element.currentTime != time) { + try { + this.element.currentTime = time; + } + catch (e) { + var f = function(){ + this.currentTime = time; + this.removeEventListener("loadeddata",f); + }; + this.element.addEventListener("loadeddata",f); + } + } if ('trackselects' in this) { for (var i in usetracks) { @@ -1429,7 +1441,7 @@ function mistPlay(streamName,options) { } catch (e) { //show the next player/reload buttons if there is an error in the player build code - player.askNextCombo('Error while building player: '+e.stack); + player.askNextCombo('Error while building player'+("stack" in e ? ": "+e.stack : "")); throw e; player.report({ type: 'init',