Skip to content

Shig Client-Server SDK for JavaScript

License

Notifications You must be signed in to change notification settings

ludovicm67/shig-js-sdk

 
 

Repository files navigation

shig-js-sdk

Shig Client-Server SDK for JavaScript

Development

The Lobby web component is based on the Shig/core library. For development, please follow the instructions in the Shig/core README.

Download Lobby web component artifact

Please download the last tagged version

Build Lobby web component artifact

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.

Use web component

<!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

About

Shig Client-Server SDK for JavaScript

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Sponsor this project

 

Packages

No packages published

Languages

  • TypeScript 72.4%
  • SCSS 16.4%
  • HTML 10.7%
  • JavaScript 0.5%