@webex/plugin-device-manager

Plugin for the DeviceManager service

Usage no npm install needed!

<script type="module">
  import webexPluginDeviceManager from 'https://cdn.skypack.dev/@webex/plugin-device-manager';
</script>

README

@webex/plugin-device-manager

standard-readme compliant

Plugin for the DeviceManager service

WARNING: This plugin is currently under active development, is not stable, and breaking changes can and will happen!

Install

npm install --save @webex/plugin-device-manager

Usage

This is a plugin for the Cisco Webex JS SDK . Please see our developer portal and the API docs for full details.

Samples

npm run samples:devicemanager

// initialize webex instance -> connects to mercury -> registers device -> // initializes plugin-device-manager to listen for device updates

import '@webex/plugin-device-manager';
import WebexCore from '@webex/webex-core';
function connect() {
  if (!webex) {
    webex = WebexCore.init({
      config: {},
      credentials: {
        access_token: document.getElementById('access-token').value,
      },
    });
  }
  if (!webex.internal.device.registered) {
    webex.internal.device.register().then(() => {
      return webex.internal.mercury.connect();
    });
  }
}

// Typical flow
webex.devicemanager
  .getAll() // gets a list of all devices registered to the user
  .refresh() // refreshes and re-populates all devices registered to the user
  .search() // search a device by name
  .requestPin() // displays PIN Challenge on the device
  .pair() // pairs the device and registers for subsequent fetches
  .increaseVolume() // increases paired device's volume
  .decreaseVolume() // decreases paired device's volume
  .mute() // mutes the paired device
  .unmute() // unmutes the paired device
  .bindSpace() // binds the space to the paired device
  .unbindSpace() // unbinds the space to the paired device
  .unpair(); // disconnects the device paired session

Maintainers

This package is maintained by Cisco Webex for Developers.

Contribute

Pull requests welcome. Please see CONTRIBUTING.md for more details.

License

© 2016-2020 Cisco and/or its affiliates. All Rights Reserved.