Stage 252
This commit is contained in:
parent
5d1a19a94a
commit
093392ac0e
|
@ -102,17 +102,17 @@ export default class Room extends EventTarget
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
async fetchAllPeers(){
|
async fetchAllPeers(){
|
||||||
let {type, peers} = await this.mwse.EventPooling.request({
|
let {status, peers} = await this.mwse.EventPooling.request({
|
||||||
type:'room-peers',
|
type:'room-peers',
|
||||||
roomId: this.roomId
|
roomId: this.roomId
|
||||||
}) as {type:"success"|"fail", peers: string[]};
|
}) as {status:"success"|"fail", peers: string[]};
|
||||||
|
|
||||||
let cup : Peer[] = [];
|
let cup : Peer[] = [];
|
||||||
|
|
||||||
if(type == 'fail')
|
if(status == 'fail')
|
||||||
{
|
{
|
||||||
throw new Error("Cant using peers on room")
|
throw new Error("Cant using peers on room")
|
||||||
}else if(type == 'success'){
|
}else if(status == 'success'){
|
||||||
for (const peerid of peers) {
|
for (const peerid of peers) {
|
||||||
let peer = this.mwse.peer(peerid);
|
let peer = this.mwse.peer(peerid);
|
||||||
cup.push(peer);
|
cup.push(peer);
|
||||||
|
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
Loading…
Reference in New Issue