that, but properly
This commit is contained in:
parent
5b16e89acd
commit
35b4dd9b1f
2 changed files with 4 additions and 2 deletions
|
@ -146,7 +146,6 @@ export class WebRTCStreamer extends Streamer {
|
||||||
switch (this.pc.iceConnectionState) {
|
switch (this.pc.iceConnectionState) {
|
||||||
case "connected":
|
case "connected":
|
||||||
case "completed":
|
case "completed":
|
||||||
case "disconnected": // using this here because disconnected may happen intermittently
|
|
||||||
return "CONNECTED";
|
return "CONNECTED";
|
||||||
case "new":
|
case "new":
|
||||||
if (this.ws) {
|
if (this.ws) {
|
||||||
|
@ -165,6 +164,8 @@ export class WebRTCStreamer extends Streamer {
|
||||||
}
|
}
|
||||||
case "checking":
|
case "checking":
|
||||||
return "CONNECTING";
|
return "CONNECTING";
|
||||||
|
case "disconnected":
|
||||||
|
return "CONNECTION_LOST_RECONNECTING";
|
||||||
case "failed":
|
case "failed":
|
||||||
return "CONNECTION_LOST";
|
return "CONNECTION_LOST";
|
||||||
case "closed":
|
case "closed":
|
||||||
|
|
|
@ -2,7 +2,8 @@ export type ConnectionStateEnum =
|
||||||
| "NOT_CONNECTED"
|
| "NOT_CONNECTED"
|
||||||
| "CONNECTING"
|
| "CONNECTING"
|
||||||
| "CONNECTED"
|
| "CONNECTED"
|
||||||
| "CONNECTION_LOST";
|
| "CONNECTION_LOST"
|
||||||
|
| "CONNECTION_LOST_RECONNECTING";
|
||||||
export type ConnectionStateListener = (val: ConnectionStateEnum) => any;
|
export type ConnectionStateListener = (val: ConnectionStateEnum) => any;
|
||||||
|
|
||||||
export abstract class Streamer {
|
export abstract class Streamer {
|
||||||
|
|
Loading…
Reference in a new issue