You've already forked matrix-js-sdk
mirror of
https://github.com/matrix-org/matrix-js-sdk.git
synced 2025-11-29 16:43:09 +03:00
Merge pull request #3217 from matrix-org/dbkr/type_sendvoipevent
Add a type to the structure used by the SendVoipEvent event
This commit is contained in:
@@ -287,6 +287,15 @@ function getCodecParamMods(isPtt: boolean): CodecParamsMod[] {
|
|||||||
return mods;
|
return mods;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export interface VoipEvent {
|
||||||
|
type: "toDevice" | "sendEvent";
|
||||||
|
eventType: string;
|
||||||
|
userId?: string;
|
||||||
|
opponentDeviceId?: string;
|
||||||
|
roomId?: string;
|
||||||
|
content: Record<string, unknown>;
|
||||||
|
}
|
||||||
|
|
||||||
export type CallEventHandlerMap = {
|
export type CallEventHandlerMap = {
|
||||||
[CallEvent.DataChannel]: (channel: RTCDataChannel) => void;
|
[CallEvent.DataChannel]: (channel: RTCDataChannel) => void;
|
||||||
[CallEvent.FeedsChanged]: (feeds: CallFeed[]) => void;
|
[CallEvent.FeedsChanged]: (feeds: CallFeed[]) => void;
|
||||||
@@ -300,7 +309,7 @@ export type CallEventHandlerMap = {
|
|||||||
[CallEvent.AssertedIdentityChanged]: () => void;
|
[CallEvent.AssertedIdentityChanged]: () => void;
|
||||||
/* @deprecated */
|
/* @deprecated */
|
||||||
[CallEvent.HoldUnhold]: (onHold: boolean) => void;
|
[CallEvent.HoldUnhold]: (onHold: boolean) => void;
|
||||||
[CallEvent.SendVoipEvent]: (event: Record<string, any>) => void;
|
[CallEvent.SendVoipEvent]: (event: VoipEvent) => void;
|
||||||
};
|
};
|
||||||
|
|
||||||
// The key of the transceiver map (purpose + media type, separated by ':')
|
// The key of the transceiver map (purpose + media type, separated by ':')
|
||||||
|
|||||||
Reference in New Issue
Block a user