@vonage/voice
Version:
The Voice API lets you create outbound calls, control in-progress calls and get information about historical calls.
46 lines • 1.53 kB
TypeScript
import { NCCOActions } from '../../enums';
import { StreamAction } from '../../types';
import { Serializable } from '../../ncco';
/**
* Represents a Stream action in a Nexmo Call Control Object (NCCO).
*
* This action allows streaming audio into the call.
*/
export declare class Stream implements StreamAction, Serializable {
/**
* The action type for this NCCO action.
*/
action: NCCOActions.STREAM;
/**
* An array of stream URLs to play audio from.
*/
streamUrl: string[];
/**
* The audio level at which to play the stream (optional).
*/
level?: number;
/**
* Indicates whether the stream should allow barge-in (optional).
*/
bargeIn?: boolean;
/**
* The number of times to loop the audio (optional).
*/
loop?: number;
/**
* Creates a new Stream action.
*
* @param {string} streamUrl - The URL of the audio stream.
* @param {number} [level] - The audio level at which to play the stream (optional).
* @param {boolean} [bargeIn] - Indicates whether the stream should allow barge-in (optional).
* @param {number} [loop] - The number of times to loop the audio (optional).
*/
constructor(streamUrl: string, level?: number, bargeIn?: boolean, loop?: number);
/**
* Serializes the Stream action to a Nexmo Call Control Object (NCCO).
*
* @return {StreamAction} - The serialized Stream action.
*/
serializeToNCCO(): StreamAction;
}
//# sourceMappingURL=Stream.d.ts.map