README
@webex/plugin-devicemanager
Plugin for the DeviceManager service
This is an internal Cisco Webex plugin. As such, it does not strictly adhere to semantic versioning. Use at your own risk. If you're not working on one of our first party clients, please look at our developer api and stick to our public plugins.
Install
npm install --save @webex/plugin-devicemanager
Usage
This is a plugin for the Cisco Webex JS SDK . Please see our developer portal and the API docs for full details.
Samples // refer @webex/samples/browser-devicemanager/app.js
// initialize spark instance -> connects to mercury -> registers device -> // initializes plugin-devicemanager to listen for device updates
import '@webex/plugin-devicemanager';
import SparkCore from '@ciscospark/spark-core';
function connect() {
if (!spark) {
spark = ciscospark.init({
config: {
},
credentials: {
access_token: document.getElementById('access-token').value
}
});
}
if (!spark.internal.device.registered) {
spark.internal.device
.register()
.then(() => {
return spark.internal.mercury.connect();
})
}
}
// Typical flow
spark.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-2018 Cisco and/or its affiliates. All Rights Reserved.