Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added Beta4 PlayStarted Event. #29678

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ export interface CallAutomationClientOptions extends CommonClientOptions {
}

// @public
export type CallAutomationEvent = AddParticipantSucceeded | AddParticipantFailed | RemoveParticipantSucceeded | RemoveParticipantFailed | CallConnected | CallDisconnected | CallTransferAccepted | CallTransferFailed | ParticipantsUpdated | RecordingStateChanged | PlayCompleted | PlayFailed | PlayCanceled | RecognizeCompleted | RecognizeCanceled | RecognizeFailed | ContinuousDtmfRecognitionToneReceived | ContinuousDtmfRecognitionToneFailed | ContinuousDtmfRecognitionStopped | SendDtmfTonesCompleted | SendDtmfTonesFailed | CancelAddParticipantSucceeded | CancelAddParticipantFailed | TranscriptionStarted | TranscriptionStopped | TranscriptionUpdated | TranscriptionFailed | HoldFailed | MediaStreamingStarted | MediaStreamingStopped | MediaStreamingFailed;
export type CallAutomationEvent = AddParticipantSucceeded | AddParticipantFailed | RemoveParticipantSucceeded | RemoveParticipantFailed | CallConnected | CallDisconnected | CallTransferAccepted | CallTransferFailed | ParticipantsUpdated | RecordingStateChanged | PlayStarted | PlayCompleted | PlayFailed | PlayCanceled | RecognizeCompleted | RecognizeCanceled | RecognizeFailed | ContinuousDtmfRecognitionToneReceived | ContinuousDtmfRecognitionToneFailed | ContinuousDtmfRecognitionStopped | SendDtmfTonesCompleted | SendDtmfTonesFailed | CancelAddParticipantSucceeded | CancelAddParticipantFailed | TranscriptionStarted | TranscriptionStopped | TranscriptionUpdated | TranscriptionFailed | HoldFailed | MediaStreamingStarted | MediaStreamingStopped | MediaStreamingFailed;

// @public
export interface CallConnected extends Omit<RestCallConnected, "callConnectionId" | "serverCallId" | "correlationId"> {
Expand Down Expand Up @@ -898,6 +898,15 @@ export interface RestPlayFailed {
serverCallId?: string;
}

// @public
export interface RestPlayStarted {
callConnectionId?: string;
correlationId?: string;
operationContext?: string;
resultInformation?: RestResultInformation;
serverCallId?: string;
}

// @public (undocumented)
export interface RestRecognizeCanceled {
callConnectionId?: string;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ import {
CallTransferFailed,
ParticipantsUpdated,
RecordingStateChanged,
PlayStarted,
PlayCompleted,
PlayFailed,
PlayCanceled,
Expand Down Expand Up @@ -97,6 +98,9 @@ export function parseCallAutomationEvent(
case "Microsoft.Communication.RecordingStateChanged":
callbackEvent = { kind: "RecordingStateChanged" } as RecordingStateChanged;
break;
case "Microsoft.Communication.PlayStarted":
callbackEvent = { kind: "PlayStarted" } as PlayStarted;
break;
case "Microsoft.Communication.PlayCompleted":
callbackEvent = { kind: "PlayCompleted" } as PlayCompleted;
break;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ import {
CallTransferFailed as RestCallTransferFailed,
ParticipantsUpdated as RestParticipantsUpdated,
RecordingStateChanged as RestRecordingStateChanged,
PlayStarted as RestPlayStarted,
PlayCompleted as RestPlayCompleted,
PlayFailed as RestPlayFailed,
PlayCanceled as RestPlayCanceled,
Expand Down Expand Up @@ -53,6 +54,7 @@ export type CallAutomationEvent =
| CallTransferFailed
| ParticipantsUpdated
| RecordingStateChanged
| PlayStarted
| PlayCompleted
| PlayFailed
| PlayCanceled
Expand Down Expand Up @@ -86,6 +88,7 @@ export {
RestCallTransferFailed,
RestParticipantsUpdated,
RestRecordingStateChanged,
RestPlayStarted,
RestPlayCompleted,
RestPlayFailed,
RestPlayCanceled,
Expand Down Expand Up @@ -300,6 +303,21 @@ export interface RecordingStateChanged
kind: "RecordingStateChanged";
}

/** Event when Media play was successfully started. */
export interface PlayStarted
extends Omit<RestPlayStarted, "callConnectionId" | "serverCallId" | "correlationId"> {
/** Call connection ID. */
callConnectionId: string;
/** Server call ID. */
serverCallId: string;
/** Correlation ID for event to call correlation. Also called ChainId for skype chain ID. */
correlationId: string;
/** Contains the resulting SIP code, sub-code and message. */
resultInformation?: RestResultInformation;
/** kind of this event. */
kind: "PlayStarted";
}

/** Event when Media play was successfully completed. */
export interface PlayCompleted
extends Omit<
Expand Down