TeamsCaptions interface
Data structure for TeamsCaptions object
- Extends
Properties
active |
Indicates the current active caption language in ISO 639-1 format |
supported |
List of supported caption languages to use with the caption service in ISO 639-1 format |
Inherited Properties
active |
Indicates the current active spoken language in the call in BCP 47 format |
is |
Indicates if captions are active in the current call |
kind | Indicates the Captions type for the active captions object |
supported |
List of supported spoken languages to use with the caption service in BCP 47 format |
Methods
off("Caption |
Unsubscribe function for any of the CaptionLanguageChangedEventType events |
off("Captions |
Unsubscribe function for any of the CaptionsPropertyChangedEventType events |
off("Captions |
Unsubscribe function for any of the CaptionsPropertyChangedEventType events |
off("Spoken |
Unsubscribe function for any of the SpokenLanguageChangedEventType events |
on("Caption |
Subscribe function for any of the CaptionLanguageChangedEventType events |
on("Captions |
Subscribe function for any of the CaptionsPropertyChangedEventType events |
on("Captions |
Subscribe function for the CaptionsReceivedEventType event |
on("Spoken |
Subscribe function for any of the SpokenLanguageChangedEventType events |
set |
Updates the language of the ongoing Transcription / Captions |
Inherited Methods
set |
Updates the language of the ongoing Transcription / Captions |
start |
Starts the processing of captions in this call with the provided handler for this client |
stop |
Stops the retrieval of captions data in the call for the user who initiated stopCaptions |
Property Details
activeCaptionLanguage
Indicates the current active caption language in ISO 639-1 format
activeCaptionLanguage: string
Property Value
string
supportedCaptionLanguages
List of supported caption languages to use with the caption service in ISO 639-1 format
supportedCaptionLanguages: string[]
Property Value
string[]
Inherited Property Details
activeSpokenLanguage
Indicates the current active spoken language in the call in BCP 47 format
activeSpokenLanguage: string
Property Value
string
Inherited From CaptionsCommon.activeSpokenLanguage
isCaptionsFeatureActive
Indicates if captions are active in the current call
isCaptionsFeatureActive: boolean
Property Value
boolean
Inherited From CaptionsCommon.isCaptionsFeatureActive
kind
Indicates the Captions type for the active captions object
kind: CaptionsKind
Property Value
Inherited From CaptionsCommon.kind
supportedSpokenLanguages
List of supported spoken languages to use with the caption service in BCP 47 format
supportedSpokenLanguages: string[]
Property Value
string[]
Inherited From CaptionsCommon.supportedSpokenLanguages
Method Details
off("CaptionLanguageChanged", PropertyChangedEvent)
Unsubscribe function for any of the CaptionLanguageChangedEventType events
function off(event: "CaptionLanguageChanged", listener: PropertyChangedEvent)
Parameters
- event
-
"CaptionLanguageChanged"
event name
- listener
- PropertyChangedEvent
callback fn that was used to subscribe to this event
off("CaptionsActiveChanged", PropertyChangedEvent)
Unsubscribe function for any of the CaptionsPropertyChangedEventType events
function off(event: "CaptionsActiveChanged", listener: PropertyChangedEvent)
Parameters
- event
-
"CaptionsActiveChanged"
event name
- listener
- PropertyChangedEvent
callback fn that was used to subscribe to this event
off("CaptionsReceived", TeamsCaptionsHandler)
Unsubscribe function for any of the CaptionsPropertyChangedEventType events
function off(event: "CaptionsReceived", listener: TeamsCaptionsHandler)
Parameters
- event
-
"CaptionsReceived"
event name
- listener
- TeamsCaptionsHandler
callback fn that was used to subscribe to this event
off("SpokenLanguageChanged", PropertyChangedEvent)
Unsubscribe function for any of the SpokenLanguageChangedEventType events
function off(event: "SpokenLanguageChanged", listener: PropertyChangedEvent)
Parameters
- event
-
"SpokenLanguageChanged"
event name
- listener
- PropertyChangedEvent
callback fn that was used to subscribe to this event
on("CaptionLanguageChanged", PropertyChangedEvent)
Subscribe function for any of the CaptionLanguageChangedEventType events
function on(event: "CaptionLanguageChanged", listener: PropertyChangedEvent)
Parameters
- event
-
"CaptionLanguageChanged"
event name
- listener
- PropertyChangedEvent
callback fn that was used to subscribe to this event
on("CaptionsActiveChanged", PropertyChangedEvent)
Subscribe function for any of the CaptionsPropertyChangedEventType events
function on(event: "CaptionsActiveChanged", listener: PropertyChangedEvent)
Parameters
- event
-
"CaptionsActiveChanged"
event name
- listener
- PropertyChangedEvent
callback fn that was used to subscribe to this event
on("CaptionsReceived", TeamsCaptionsHandler)
Subscribe function for the CaptionsReceivedEventType event
function on(event: "CaptionsReceived", listener: TeamsCaptionsHandler)
Parameters
- event
-
"CaptionsReceived"
event name
- listener
- TeamsCaptionsHandler
callback fn that was used to subscribe to this event
on("SpokenLanguageChanged", PropertyChangedEvent)
Subscribe function for any of the SpokenLanguageChangedEventType events
function on(event: "SpokenLanguageChanged", listener: PropertyChangedEvent)
Parameters
- event
-
"SpokenLanguageChanged"
event name
- listener
- PropertyChangedEvent
callback fn that was used to subscribe to this event
setCaptionLanguage(string)
Updates the language of the ongoing Transcription / Captions
function setCaptionLanguage(language: string): Promise<void>
Parameters
- language
-
string
The language to caption speech as. Must be ISO 639-1 format (e.g. "en")
Returns
Promise<void>
A Promise representing the completion of the Set Language operation The completion of this promise does NOT indicate the language has changed. A 'CaptionLanguageChanged' event will be emitted when the language has actually successfully changed.
Inherited Method Details
setSpokenLanguage(string)
Updates the language of the ongoing Transcription / Captions
function setSpokenLanguage(language: string): Promise<void>
Parameters
- language
-
string
The language to caption speech as. Must be BCP 47 format (e.g. "en-us")
Returns
Promise<void>
A Promise representing the completion of the Set Language operation. The completion of this promise does NOT indicate the language has changed. A 'SpokenLanguageChanged' event will be emitted when the language has actually successfully changed.
Inherited From CaptionsCommon.setSpokenLanguage
startCaptions(StartCaptionsOptions)
Starts the processing of captions in this call with the provided handler for this client
function startCaptions(startCaptionsOptions?: StartCaptionsOptions): Promise<void>
Parameters
- startCaptionsOptions
- StartCaptionsOptions
Additional options for starting captions.
Returns
Promise<void>
A Promise representing the completion of the intialization process for the Start Caption operation The completion of this promise does NOT indicate the captions have started. A 'CaptionsActiveChanged' event will be emitted when captions have actually successfully started.
Inherited From CaptionsCommon.startCaptions
stopCaptions()
Stops the retrieval of captions data in the call for the user who initiated stopCaptions
function stopCaptions(): Promise<void>
Returns
Promise<void>
A promise representing the completion of the Stop Caption operation The completion of this promise does NOT indicate the captions bot has left the call. The participant will unsubscribe from receiving captions data upon successfully stopped.
Inherited From CaptionsCommon.stopCaptions