Room invite / Peer invite / Private public peer / private transport / wsjs api

This commit is contained in:
Abdussamed ULUTAŞ 2022-11-26 23:30:47 +03:00
parent 7e54c8b7c3
commit c0d35eb113
2 changed files with 17 additions and 2 deletions

View File

@ -481,6 +481,21 @@ addService(({
status : "success" status : "success"
}); });
} }
case 'room/list':{
let rooms = [];
for (const [id, {accessType,name,joinType,description}] of Room.rooms) if(accessType == "public"){
rooms.push({
name,
joinType,
description,
id
})
}
end({
type:'public/rooms',
rooms
});
}
default:{ default:{
next(); next();
} }

View File

@ -9,7 +9,7 @@
<body> <body>
<script src="./wsjs.js"></script> <script src="./wsjs.js"></script>
<script> <script>
let wsjs = new WSJS({ /* let wsjs = new WSJS({
endpoint: "ws://localhost:8282" endpoint: "ws://localhost:8282"
}); });
let room = wsjs.room({ let room = wsjs.room({
@ -64,7 +64,7 @@
}); });
peer.close(); peer.close();
*/