Embed: Added websocket timeouts (stream info, mews, webrtc)
This commit is contained in:
parent
854315afdd
commit
f4fd56f170
6 changed files with 36 additions and 4 deletions
|
@ -406,6 +406,13 @@ p.prototype.build = function (MistVideo,callback) {
|
|||
});
|
||||
}
|
||||
};
|
||||
this.ws.timeOut = MistVideo.timers.start(function(){
|
||||
if (player.ws.readyState == 0) {
|
||||
MistVideo.log("MP4 over WS: socket timeout - try next combo");
|
||||
MistVideo.nextCombo();
|
||||
}
|
||||
},5e3);
|
||||
|
||||
this.ws.listeners = {}; //kind of event listener list for websocket messages
|
||||
this.ws.addListener = function(type,f){
|
||||
if (!(type in this.listeners)) { this.listeners[type] = []; }
|
||||
|
|
|
@ -435,6 +435,14 @@ p.prototype.build = function (MistVideo,callback) {
|
|||
this.ws.onopen = function() {
|
||||
onEvent({type: "on_connected"});
|
||||
};
|
||||
|
||||
this.ws.timeOut = MistVideo.timers.start(function(){
|
||||
if (MistVideo.player.webrtc.signaling.ws.readyState == 0) {
|
||||
MistVideo.log("WebRTC: socket timeout - try next combo");
|
||||
MistVideo.nextCombo();
|
||||
}
|
||||
},5e3);
|
||||
|
||||
|
||||
this.ws.onmessage = function(e) {
|
||||
try {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue