Embed: WebRTC: add loading icon while attempting to connect
This commit is contained in:
parent
6204a57a0e
commit
0cd4ae17b7
3 changed files with 6 additions and 3 deletions
File diff suppressed because one or more lines are too long
|
@ -6,7 +6,7 @@
|
|||
"minimize": "./minimize_internal.sh"
|
||||
},
|
||||
"dependencies": {
|
||||
"clean-css-cli": "^4.2.1",
|
||||
"clean-css-cli": "^4.3.0",
|
||||
"terser": "^3.17.0"
|
||||
}
|
||||
}
|
||||
|
|
|
@ -234,6 +234,7 @@ p.prototype.build = function (MistVideo,callback) {
|
|||
|
||||
this.connect = function(callback){
|
||||
thisWebRTCPlayer.isConnecting = true;
|
||||
MistVideo.container.setAttribute("data-loading","connecting"); //show loading icon while setting up the connection
|
||||
|
||||
//chrome on android has a bug where H264 is not available immediately after the tab is opened: https://bugs.chromium.org/p/webrtc/issues/detail?id=11620
|
||||
//this workaround tries 5x with 100ms intervals before continuing
|
||||
|
@ -288,11 +289,13 @@ p.prototype.build = function (MistVideo,callback) {
|
|||
MistVideo.nextCombo();
|
||||
break;
|
||||
}
|
||||
case "connected": {
|
||||
MistVideo.container.removeAttribute("data-loading");
|
||||
}
|
||||
case "disconnected":
|
||||
case "closed":
|
||||
case "new":
|
||||
case "connecting":
|
||||
case "connected":
|
||||
default: {
|
||||
MistVideo.log("WebRTC connection state changed to "+this.connectionState);
|
||||
break;
|
||||
|
|
Loading…
Add table
Reference in a new issue