Skip to content
This repository was archived by the owner on Jul 17, 2024. It is now read-only.

Commit 3faa5a4

Browse files
committed
Change ts-client-sdk to branch debug_reconnect
1 parent 57fd63b commit 3faa5a4

File tree

3 files changed

+20
-17
lines changed

3 files changed

+20
-17
lines changed

assets/package-lock.json

+3-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

assets/package.json

+1
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
},
1313
"dependencies": {
1414
"@fishjam-dev/react-client": "github:fishjam-dev/react-client-sdk#reconnet-on-network-change",
15+
"@fishjam-dev/ts-client": "github:fishjam-dev/ts-client-sdk#debug_reconnect",
1516
"@mediapipe/tasks-vision": "^0.10.12",
1617
"axios": "^1.6.8",
1718
"chartist": "^1.3.0",

assets/src/features/streaming/StreamingErrorBoundary.tsx

+16-16
Original file line numberDiff line numberDiff line change
@@ -67,22 +67,22 @@ export const StreamingErrorBoundary: FC<PropsWithChildren> = ({ children }) => {
6767
}, 2000);
6868
};
6969

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+
// };
8686

8787
const onJoinError: ClientEvents<PeerMetadata, TrackMetadata>["joinError"] = (event) => {
8888
console.log(event);

0 commit comments

Comments
 (0)