Embed: options.reloadDelay:

- when > an hour, parse as ms;
- in dev mode, when options.reloadDelay is set, show the timeouts as normal
This commit is contained in:
Cat 2021-09-13 13:06:34 +02:00 committed by Thulinma
parent 12c117e297
commit be7e44727f
3 changed files with 12 additions and 2 deletions

File diff suppressed because one or more lines are too long

View file

@ -103,6 +103,12 @@ function MistVideo(streamName,options) {
}
return url;
}
if (options.reloadDelay && (options.reloadDelay > 3600)) {
options.reloadDelay /= 1000;
this.log("A reloadDelay of more than an hour was set: assuming milliseconds were intended. ReloadDelay is now "+options.reloadDelay+"s");
}
new MistSkin(this);

View file

@ -2135,7 +2135,11 @@ MistSkins["default"] = {
MistSkins.dev = {
structure: MistUtil.object.extend({},MistSkins["default"].structure,true),
blueprints: {
timeout: function(){ //don't use countdowns on buttons
timeout: function(){
//don't use countdowns on buttons unless MistVideo.options.reloadDelay is set
if (this.options.reloadDelay !== false) {
return MistSkins.default.blueprints.timeout.apply(this,arguments);
}
return false;
},
log: function(){