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

@ -1006,9 +1006,12 @@ MistSkins["default"] = {
},button);
//apply initial video state
if (('localStorage' in window) && (localStorage != null) && ('mistVolume' in localStorage)) {
MistVideo.player.api.volume = localStorage['mistVolume'];
}
var initevent = MistUtil.event.addListener(video,"loadstart",function(){
if (('localStorage' in window) && (localStorage != null) && ('mistVolume' in localStorage)) {
MistVideo.player.api.volume = localStorage['mistVolume'];
}
MistUtil.event.removeListener(initevent);
});
button.addPadding = function(actual){
return actual * (1 - (this.margin.start + this.margin.end)) + this.margin.start;