@@ -3,7 +3,7 @@ import useToast from "../shared/hooks/useToast";
3
3
import { ErrorMessage , messageComparator } from "../../pages/room/errorMessage" ;
4
4
import { PeerMetadata , TrackMetadata , useClient } from "../../fishjam" ;
5
5
import useEffectOnChange from "../shared/hooks/useEffectOnChange" ;
6
- import { MessageEvents } from "@fishjam-dev/ts -client" ;
6
+ import { ClientEvents } from "@fishjam-dev/react -client" ;
7
7
8
8
export const StreamingErrorBoundary : FC < PropsWithChildren > = ( { children } ) => {
9
9
const { addToast } = useToast ( ) ;
@@ -24,26 +24,26 @@ export const StreamingErrorBoundary: FC<PropsWithChildren> = ({ children }) => {
24
24
useEffect ( ( ) => {
25
25
if ( ! client ) return ;
26
26
27
- const onSocketError : MessageEvents < PeerMetadata , TrackMetadata > [ "socketError" ] = ( error : Event ) => {
27
+ const onSocketError : ClientEvents < PeerMetadata , TrackMetadata > [ "socketError" ] = ( error : Event ) => {
28
28
console . warn ( error ) ;
29
29
handleError ( `Socket error occurred.` , "onSocketError" ) ;
30
30
} ;
31
31
32
- const onConnectionError : MessageEvents < PeerMetadata , TrackMetadata > [ "connectionError" ] = ( error ) => {
32
+ const onConnectionError : ClientEvents < PeerMetadata , TrackMetadata > [ "connectionError" ] = ( error ) => {
33
33
console . warn ( error ) ;
34
34
handleError ( `Connection error occurred. ${ error ?. message ?? "" } ` ) ;
35
35
} ;
36
36
37
- const onJoinError : MessageEvents < PeerMetadata , TrackMetadata > [ "joinError" ] = ( event ) => {
37
+ const onJoinError : ClientEvents < PeerMetadata , TrackMetadata > [ "joinError" ] = ( event ) => {
38
38
console . log ( event )
39
39
handleError ( `Failed to join the room` ) ;
40
40
} ;
41
- const onAuthError : MessageEvents < PeerMetadata , TrackMetadata > [ "authError" ] = ( reason ) => {
41
+ const onAuthError : ClientEvents < PeerMetadata , TrackMetadata > [ "authError" ] = ( reason ) => {
42
42
console . warn ( reason ) ;
43
43
handleError ( `Socket error occurred.` , "onAuthError" ) ;
44
44
} ;
45
45
46
- const onSocketClose : MessageEvents < PeerMetadata , TrackMetadata > [ "socketClose" ] = ( event ) => {
46
+ const onSocketClose : ClientEvents < PeerMetadata , TrackMetadata > [ "socketClose" ] = ( event ) => {
47
47
console . warn ( event ) ;
48
48
handleError ( `Signaling socket closed.` , "onSocketClose" ) ;
49
49
} ;
0 commit comments