skyway-siru-client

0.0.9 • Public • Published

SiRu-client

SkyWay IoT SDK room utility for client

snipet

browser

// obtain APIKEY from skyway.io.
// Don't forget to config your domain and APIKEY setting in our Dashboard https://webrtc.ecl.ntt.com/en/login.html.
const client = new SiRuClient('myroom', {key: 'YOUR_API_KEY'})
 
client.on('connect', () => {
  client.on('device:connected', (uuid, profile) => {
    // fetch echo api
    client.fetch( uuid+'/echo/hello' )
      .then(res => res.text())
      .then(text => console.log(text))
 
    // request remote camera streaming
    client.requestStreaming(uuid)
      .then(stream => video.srcObject = stream)
 
    // subscribe each topic
    client.subscribe('testtopic/+')
  })
 
  client.on('message', (topic, mesg) => {
    console.log(topic, mesg)
  })
})
 

Install

npm

$ npm install skyway-siru-client

prebuilt

API reference


Copyright. NTT Communicaations Corporation All rights reserved.

Readme

Keywords

none

Package Sidebar

Install

npm i skyway-siru-client

Weekly Downloads

7

Version

0.0.9

License

Apache-2.0

Unpacked Size

13.1 MB

Total Files

45

Last publish

Collaborators

  • alanmshelly
  • komasshu
  • nttcom-skyway
  • yusuke84