MicrophoneDevice
Defined in: system/microphone.ts:27
The MicrophoneDevice class provides you with methods to add a microphone device as a source on the stage.
Basic Usage
Section titled “Basic Usage”var XJS = require('xjs');var System = XJS.System;
System.getMicrophones().then(function(microphones) { for (var i in microphones) { microphones[i].addToScene(); }});Implements
Section titled “Implements”Constructors
Section titled “Constructors”Constructor
Section titled “Constructor”new MicrophoneDevice():
MicrophoneDevice
Returns
Section titled “Returns”MicrophoneDevice
Methods
Section titled “Methods”addToScene()
Section titled “addToScene()”addToScene(
value?):Promise<any>
Defined in: system/microphone.ts:115
param: (value?: number | Scene)
return: Promise<any>Adds this microphone device to the current scene by default. Accepts an optional parameter value, which, when supplied, points to the scene where item will be added instead. If ready config {listenToItemAdd: true} it returns item id, else returns boolean.
Note: There is yet no way to detect error responses for this action.
Parameters
Section titled “Parameters”value?
Section titled “value?”number | Scene
Returns
Section titled “Returns”Promise<any>
Implementation of
Section titled “Implementation of”getDisplayId()
Section titled “getDisplayId()”getDisplayId():
string
Defined in: system/microphone.ts:59
return: string
Gets the display ID
var micDisplayId = device.getDisplayId();Returns
Section titled “Returns”string
getName()
Section titled “getName()”getName():
string
Defined in: system/microphone.ts:74
return: string
Gets the device name
var micName = device.getName();Returns
Section titled “Returns”string
toXML()
Section titled “toXML()”toXML():
XML
Defined in: system/microphone.ts:89
return: XML
Converts Microphone object into an XML object
var microphoneXML = microphone.toXML();Returns
Section titled “Returns”parse()
Section titled “parse()”
staticparse(jxon):MicrophoneDevice
Defined in: system/microphone.ts:39
param: (deviceJXON: JXON)
return MicrophoneDeviceCreate a MicrophoneDevice onject based on a JXON object
Parameters
Section titled “Parameters”Returns
Section titled “Returns”MicrophoneDevice