33 lines
		
	
	
		
			998 B
		
	
	
	
		
			HTML
		
	
	
	
			
		
		
	
	
			33 lines
		
	
	
		
			998 B
		
	
	
	
		
			HTML
		
	
	
	
<!DOCTYPE html>
 | 
						|
<html lang="en">
 | 
						|
<head>
 | 
						|
    <meta charset="UTF-8">
 | 
						|
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
 | 
						|
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
 | 
						|
    <title>Document</title>
 | 
						|
</head>
 | 
						|
<body>
 | 
						|
    <script src="./wsjs.js"></script>
 | 
						|
    <script>
 | 
						|
        let ws = new WSJS();
 | 
						|
        ws.connect('ws://localhost:8282');
 | 
						|
        ws.scope(async ()=>{
 | 
						|
            console.log("Connected ws")
 | 
						|
            let roomInfo = await ws.fetchMyRoomInfo();
 | 
						|
            let secretRoom = await ws.createRoom({
 | 
						|
                name: "Benim Odam",
 | 
						|
                description: "Gizli Odam"
 | 
						|
            });
 | 
						|
        });
 | 
						|
        ws.signal('id',(data)=>{
 | 
						|
            console.log("Your id is ", data.value)
 | 
						|
        });
 | 
						|
        ws.signal("room/joined",(joinStatus)=>{
 | 
						|
            console.log("Room ejected", joinStatus)
 | 
						|
        });
 | 
						|
        ws.signal("room/ejected",(ejectStatus)=>{
 | 
						|
            console.log("Room ejected", ejectStatus)
 | 
						|
        })
 | 
						|
    </script>
 | 
						|
</body>
 | 
						|
</html> |