Embed: mews: prevent javascript error "Cannot read properties of undefined (reading 'add')"
This commit is contained in:
parent
15ff0dcb9f
commit
48260e6bc5
4 changed files with 7 additions and 2 deletions
|
@ -839,6 +839,7 @@ p.prototype.build = function (MistVideo,callback) {
|
|||
if (responseType) {
|
||||
var starttime = new Date().getTime();
|
||||
function onResponse() {
|
||||
if (!player.ws || !player.ws.serverDelay) { return; }
|
||||
player.ws.serverDelay.add(new Date().getTime() - starttime);
|
||||
player.ws.removeListener(responseType,onResponse);
|
||||
}
|
||||
|
@ -896,6 +897,7 @@ p.prototype.build = function (MistVideo,callback) {
|
|||
return;
|
||||
}
|
||||
if (player.ws.readyState >= player.ws.CLOSING) {
|
||||
if (MistVideo.destroyed) { return; }
|
||||
//throw "WebSocket has been closed already.";
|
||||
MistVideo.log("MP4 over WS: reopening websocket");
|
||||
player.wsconnect().then(function(){
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue