You've already forked matrix-js-sdk
mirror of
https://github.com/matrix-org/matrix-js-sdk.git
synced 2025-11-28 05:03:59 +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;
|
||||
}
|
||||
|
||||
export interface VoipEvent {
|
||||
type: "toDevice" | "sendEvent";
|
||||
eventType: string;
|
||||
userId?: string;
|
||||
opponentDeviceId?: string;
|
||||
roomId?: string;
|
||||
content: Record<string, unknown>;
|
||||
}
|
||||
|
||||
export type CallEventHandlerMap = {
|
||||
[CallEvent.DataChannel]: (channel: RTCDataChannel) => void;
|
||||
[CallEvent.FeedsChanged]: (feeds: CallFeed[]) => void;
|
||||
@@ -300,7 +309,7 @@ export type CallEventHandlerMap = {
|
||||
[CallEvent.AssertedIdentityChanged]: () => void;
|
||||
/* @deprecated */
|
||||
[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 ':')
|
||||
|
||||
Reference in New Issue
Block a user