PeripheralModeAudio

"Peripheral mode" refers to when the Dolby Conference Phone is paired with another device, such as the Dolby Voice Hub. This object allows the application to monitor the audio connection between the Dolby Conference Phone and the Dolby Voice Hub.

Example:

// Connect signal to know when the state of the connection has changed
function myStateChangedHandler(newState)
{
    // The value of 'newState' will be equal to 'dapi.peripheralModeAudio.state'.
    if (newState == "CONNECTED") {
        console.log("Peripheral Mode Audio is connected");
    } else if (newState == "CONNECTING") {
        console.log("Peripheral Mode Audio is connecting...");
    } else if (newState== "DISCONNECTED") {
        console.log("Peripheral Mode Audio connection has terminated");
    }
}

dapi.peripheralModeAudio.stateChanged.connect(function(newState) { myStateChangedHandler(newState); });

Member Summary

Public Members

Flag that specifies whether the audio connection is active.

Flag that indicates whether the current audio connection allows DTMF interactions.

Indicates the codec that is being used during an active audio connection.

Connection identifier.

Controls the targeted minimum jitter buffer latency.

This property indicates the state of the media channel connection during the call (CONNECTED, CONNECTING, DISCONNECTED).

Flag that specifies whether the audio is muted.

State of the connection (CONNECTED, CONNECTING and DISCONNECTED).

Indicates the transport type that is being used during an active audio connection (TCP, UDP, DTLS, TLS).

The peripheral mode audio connection call UUID.

Method Summary

Public Methods

Disconnects the current audio connection and resets properties.

Method for monitoring media connection state change notifications.

sendDtmf(keys: string, playback: string)

Sends DTMF digits over the audio connection.

stateChanged(newState: string)

Method for monitoring connection state change notifications.

Public Members

public active: boolean source

Flag that specifies whether the audio connection is active. You can bind a function to be called when this property changes: dapi.peripheralModeAudio.activeChanged.connect(myHandlerFunction);

public canSendDtmf: boolean source

Flag that indicates whether the current audio connection allows DTMF interactions. If the far end supports in-band or out-of-band DTMF, then this property will be set to True. The application can use this indicator to decide whether to allow the user to enter DTMF digits when the call is connected. You can bind a function to be called when this property changes: dapi.peripheralModeAudio.canSendDtmfChanged.connect(myHandlerFunction);

public codec: string source

Indicates the codec that is being used during an active audio connection. You can bind a function to be called when this property changes: dapi.peripheralModeAudio.codecChanged.connect(myHandlerFunction);

public connectionId: number source

Connection identifier. You can bind a function to be called when this property changes: dapi.peripheralModeAudio.connectionIdChanged.connect(myHandlerFunction);

public jbLatency: number source

Controls the targeted minimum jitter buffer latency. The value is in ms. Valid values are: 0-800. You can bind a function to be called when this property changes: dapi.peripheralModeAudio.jbLatencyChanged.connect(myHandlerFunction);

public mediaConnection: string source

This property indicates the state of the media channel connection during the call (CONNECTED, CONNECTING, DISCONNECTED). It is only applicable for calls using the DVC codec. While connecting, the state may be empty. See "mediaConnectionChanged" below for information on receiving notification when this value changes.

public muted: boolean source

Flag that specifies whether the audio is muted. You can bind a function to be called when this property changes: dapi.peripheralModeAudio.mutedChanged.connect(myHandlerFunction);

public state: string source

State of the connection (CONNECTED, CONNECTING and DISCONNECTED). See "stateChanged" below for information on receiving notification when this value changes.

public transport: string source

Indicates the transport type that is being used during an active audio connection (TCP, UDP, DTLS, TLS). You can bind a function to be called when this property changes: dapi.peripheralModeAudio.transportChanged.connect(myHandlerFunction);

public uuid: string source

The peripheral mode audio connection call UUID. You can bind a function to be called when this property changes: dapi.peripheralModeAudio.uuidChanged.connect(myHandlerFunction);

Public Methods

public disconnect() source

Disconnects the current audio connection and resets properties.

public mediaConnectionChanged(newState: string) source

Method for monitoring media connection state change notifications.

Params:

NameTypeAttributeDescription
newState string

the new state of the media connection

Example:

dapi.peripheralModeAudio.mediaConnectionChanged.connect(myMediaConnectionStateHandlerFunction);

public sendDtmf(keys: string, playback: string) source

Sends DTMF digits over the audio connection. DTMF will be silently ignored if there is no active audio connection. The "keys" parameter indicates which key the user has pressed. It may also be used by the application to provide a sequence of DTMF for preset DTMF commands. For example, "keys" value can be "00234" to send a sequence of DTMF digits automatically to the far end services. Use the "playback" parameter to play the DTMF tones. This is an optional parameter and by default it is true.

Params:

NameTypeAttributeDescription
keys string

sequence of DTMF tones

playback string

option to play back the DTMF tones

public stateChanged(newState: string) source

Method for monitoring connection state change notifications.

Params:

NameTypeAttributeDescription
newState string

the new state of the connection

Example:

dapi.peripheralModeAudio.stateChanged.connect(myNewStateHandlerFunction);