Embed: improved unloading behaviour (again), removed artificial HLS latency addition because it was causing negative timestamps

This commit is contained in:
Cat 2019-04-23 16:41:55 +02:00 committed by Thulinma
parent 09d4bb6318
commit 420fea9b31
7 changed files with 68 additions and 26 deletions

View file

@ -388,6 +388,7 @@ function MistVideo(streamName,options) {
MistVideo.player.build(MistVideo,function(video){
MistVideo.log("Building new player");
MistVideo.container.removeAttribute("data-loading");
MistVideo.video = video;
@ -1110,6 +1111,12 @@ function MistVideo(streamName,options) {
if ((this.UI) && (this.UI.elements)) {
for (var i in this.UI.elements) {
var e = this.UI.elements[i];
if ("attachedListeners" in e) {
//remove attached event listeners
for (var i in e.attachedListeners) {
MistUtil.event.removeListener(e.attachedListeners[i]);
}
}
if (e.parentNode) {
e.parentNode.removeChild(e);
}