Embed: mews: don't try to reopen the websocket when the stream goes offline
This commit is contained in:
parent
2e17dd8635
commit
12c117e297
2 changed files with 3 additions and 3 deletions
File diff suppressed because one or more lines are too long
|
@ -371,7 +371,7 @@ p.prototype.build = function (MistVideo,callback) {
|
||||||
};
|
};
|
||||||
this.ws.onclose = function(e){
|
this.ws.onclose = function(e){
|
||||||
MistVideo.log("MP4 over WS: websocket closed");
|
MistVideo.log("MP4 over WS: websocket closed");
|
||||||
if (this.wasConnected && (!MistVideo.destroyed)) {
|
if (this.wasConnected && (!MistVideo.destroyed) && (MistVideo.state == "Stream is online")) {
|
||||||
MistVideo.log("MP4 over WS: reopening websocket");
|
MistVideo.log("MP4 over WS: reopening websocket");
|
||||||
player.wsconnect().then(function(){
|
player.wsconnect().then(function(){
|
||||||
if (!player.sb) {
|
if (!player.sb) {
|
||||||
|
@ -424,7 +424,7 @@ p.prototype.build = function (MistVideo,callback) {
|
||||||
MistUtil.event.send("ended",null,video);
|
MistUtil.event.send("ended",null,video);
|
||||||
MistUtil.event.removeListener(eObj);
|
MistUtil.event.removeListener(eObj);
|
||||||
});
|
});
|
||||||
|
player.ws.onclose = function(){}; //don't reopen websocket, just close, it's okay, rly
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case "on_time": {
|
case "on_time": {
|
||||||
|
|
Loading…
Add table
Reference in a new issue