@@ -67,22 +67,22 @@ export const StreamingErrorBoundary: FC<PropsWithChildren> = ({ children }) => {
67
67
} , 2000 ) ;
68
68
} ;
69
69
70
- const onSocketError : ClientEvents < PeerMetadata , TrackMetadata > [ "socketError" ] = ( error : Event ) => {
71
- console . warn ( error ) ;
72
- handleError ( `Socket error occurred.` , "onSocketError" ) ;
73
- } ;
74
-
75
- const onConnectionError : ClientEvents < PeerMetadata , TrackMetadata > [ "connectionError" ] = ( error , client ) => {
76
- if ( client . isReconnecting ( ) ) {
77
- console . log ( "%c" + "During reconnection: connectionError %o" , "color:gray" , {
78
- error,
79
- iceConnectionState : error ?. event ?. target ?. [ "iceConnectionState" ]
80
- } ) ;
81
- } else {
82
- console . warn ( { error, state : error ?. event ?. target ?. [ "iceConnectionState" ] } ) ;
83
- handleError ( `Connection error occurred. ${ error ?. message ?? "" } ` ) ;
84
- }
85
- } ;
70
+ // const onSocketError: ClientEvents<PeerMetadata, TrackMetadata>["socketError"] = (error: Event) => {
71
+ // console.warn(error);
72
+ // handleError(`Socket error occurred.`, "onSocketError");
73
+ // };
74
+
75
+ // const onConnectionError: ClientEvents<PeerMetadata, TrackMetadata>["connectionError"] = (error, client) => {
76
+ // if (client.isReconnecting()) {
77
+ // console.log("%c" + "During reconnection: connectionError %o", "color:gray", {
78
+ // error,
79
+ // iceConnectionState: error?.event?.target?.["iceConnectionState"]
80
+ // });
81
+ // } else {
82
+ // console.warn({ error, state: error?.event?.target?.["iceConnectionState"] });
83
+ // handleError(`Connection error occurred. ${error?.message ?? ""}`);
84
+ // }
85
+ // };
86
86
87
87
const onJoinError : ClientEvents < PeerMetadata , TrackMetadata > [ "joinError" ] = ( event ) => {
88
88
console . log ( event ) ;
@@ -110,8 +110,8 @@ export const StreamingErrorBoundary: FC<PropsWithChildren> = ({ children }) => {
110
110
client . on ( "reconnected" , onReconnected ) ;
111
111
client . on ( "reconnectionRetriesLimitReached" , onReconnectionRetriesLimitReached ) ;
112
112
113
- client . on ( "socketError" , onSocketError ) ;
114
- client . on ( "connectionError" , onConnectionError ) ;
113
+ // client.on("socketError", onSocketError);
114
+ // client.on("connectionError", onConnectionError);
115
115
client . on ( "joinError" , onJoinError ) ;
116
116
client . on ( "authError" , onAuthError ) ;
117
117
client . on ( "socketClose" , onSocketClose ) ;
@@ -121,8 +121,8 @@ export const StreamingErrorBoundary: FC<PropsWithChildren> = ({ children }) => {
121
121
client . off ( "reconnected" , onReconnected ) ;
122
122
client . off ( "reconnectionRetriesLimitReached" , onReconnectionRetriesLimitReached ) ;
123
123
124
- client . off ( "socketError" , onSocketError ) ;
125
- client . off ( "connectionError" , onConnectionError ) ;
124
+ // client.off("socketError", onSocketError);
125
+ // client.off("connectionError", onConnectionError);
126
126
client . off ( "joinError" , onJoinError ) ;
127
127
client . off ( "authError" , onAuthError ) ;
128
128
client . off ( "socketClose" , onSocketClose ) ;
0 commit comments