Skip to content

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.

var XJS = require('xjs');
var System = XJS.System;
System.getMicrophones().then(function(microphones) {
for (var i in microphones) {
microphones[i].addToScene();
}
});
  • Addable

new MicrophoneDevice(): MicrophoneDevice

MicrophoneDevice

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.

number | Scene

Promise<any>

Addable.addToScene


getDisplayId(): string

Defined in: system/microphone.ts:59

return: string

Gets the display ID

var micDisplayId = device.getDisplayId();

string


getName(): string

Defined in: system/microphone.ts:74

return: string

Gets the device name

var micName = device.getName();

string


toXML(): XML

Defined in: system/microphone.ts:89

return: XML

Converts Microphone object into an XML object

var microphoneXML = microphone.toXML();

XML


static parse(jxon): MicrophoneDevice

Defined in: system/microphone.ts:39

param: (deviceJXON: JXON)

return MicrophoneDevice

Create a MicrophoneDevice onject based on a JXON object

JSON

MicrophoneDevice