2023-02-17 15:09:39 +00:00
|
|
|
import { joinRoom as trysteroJoinRoom, Room, BaseRoomConfig } from 'trystero'
|
2022-08-19 02:10:16 +00:00
|
|
|
|
|
|
|
export const joinRoom: typeof trysteroJoinRoom = (
|
2023-02-17 15:09:39 +00:00
|
|
|
_config: BaseRoomConfig,
|
2022-08-19 02:10:16 +00:00
|
|
|
_roomId: string
|
|
|
|
) => {
|
|
|
|
const room: Room = {
|
2022-08-23 02:57:45 +00:00
|
|
|
makeAction: () => [() => Promise.resolve([]), () => {}, () => {}],
|
2022-08-19 02:10:16 +00:00
|
|
|
ping: () => Promise.resolve(0),
|
|
|
|
leave: () => {},
|
|
|
|
getPeers: () => [],
|
|
|
|
addStream: () => [Promise.resolve()],
|
|
|
|
removeStream: () => {},
|
|
|
|
addTrack: () => [Promise.resolve()],
|
|
|
|
removeTrack: () => {},
|
|
|
|
replaceTrack: () => [Promise.resolve()],
|
|
|
|
onPeerJoin: () => {},
|
|
|
|
onPeerLeave: () => {},
|
|
|
|
onPeerStream: () => {},
|
|
|
|
onPeerTrack: () => {},
|
|
|
|
}
|
|
|
|
|
|
|
|
return room
|
|
|
|
}
|
|
|
|
|
|
|
|
export const selfId = ''
|