Shig Client-Server SDK for JavaScript
The Lobby web component is based on the Shig/core
library. For development, please follow the instructions in the Shig/core
README.
Please download the last tagged version
Run npm run build:lobby
to build the lobby web component. The build shig-lobby.js
artifacts will be stored in
the dist/lobby
directory.
<!DOCTYPE html>
<html lang="en">
<head></head>
<body>
<div id="wrapper"></div>
<script type="text/javascript" src="./shig-lobby.js"></script>
<script type="text/javascript">
const lobby = document.createElement('shig-lobby');
lobby.addEventListener('loadComp', (event) => {
console.log("Component loaded successfully!", event);
});
// settings:
lobby.setAttribute('token', 'your-proxy-api-token');
lobby.setAttribute('api-prefix', '/your/proxy/api/prefix');
lobby.setAttribute('stream', '1234');
lobby.setAttribute('space', '[email protected]');
lobby.setAttribute('user', '[email protected]');
const wrapper = document.getElementById("wrapper");
wrapper.appendChild(lobby);
</script>
</body>
</html>
You can find the complete list of parameters here: Parameter