mirror of
https://github.com/signalapp/Signal-Desktop.git
synced 2026-05-08 08:58:38 +01:00
Calling Reactions
This commit is contained in:
+19
-1
@@ -1,10 +1,13 @@
|
||||
// Copyright 2020 Signal Messenger, LLC
|
||||
// SPDX-License-Identifier: AGPL-3.0-only
|
||||
|
||||
import type { AudioDevice } from '@signalapp/ringrtc';
|
||||
import type { AudioDevice, Reaction as CallReaction } from '@signalapp/ringrtc';
|
||||
import type { ConversationType } from '../state/ducks/conversations';
|
||||
import type { AciString, ServiceIdString } from './ServiceId';
|
||||
|
||||
export const MAX_CALLING_REACTIONS = 5;
|
||||
export const CALLING_REACTIONS_LIFETIME = 4000;
|
||||
|
||||
// These are strings (1) for the database (2) for Storybook.
|
||||
export enum CallMode {
|
||||
Direct = 'Direct',
|
||||
@@ -34,6 +37,16 @@ export type PresentedSource = {
|
||||
name: string;
|
||||
};
|
||||
|
||||
// export type ActiveCallReactionsType = {
|
||||
// [timestamp: number]: ReadonlyArray<CallReaction>;
|
||||
// };
|
||||
|
||||
export type ActiveCallReaction = {
|
||||
timestamp: number;
|
||||
} & CallReaction;
|
||||
|
||||
export type ActiveCallReactionsType = ReadonlyArray<ActiveCallReaction>;
|
||||
|
||||
export type ActiveCallBaseType = {
|
||||
conversation: ConversationType;
|
||||
hasLocalAudio: boolean;
|
||||
@@ -50,6 +63,7 @@ export type ActiveCallBaseType = {
|
||||
settingsDialogOpen: boolean;
|
||||
showNeedsScreenRecordingPermissionsWarning?: boolean;
|
||||
showParticipantsList: boolean;
|
||||
reactions?: ActiveCallReactionsType;
|
||||
};
|
||||
|
||||
export type ActiveDirectCallType = ActiveCallBaseType & {
|
||||
@@ -73,8 +87,10 @@ export type ActiveDirectCallType = ActiveCallBaseType & {
|
||||
export type ActiveGroupCallType = ActiveCallBaseType & {
|
||||
callMode: CallMode.Group;
|
||||
connectionState: GroupCallConnectionState;
|
||||
conversationsByDemuxId: ConversationsByDemuxIdType;
|
||||
conversationsWithSafetyNumberChanges: Array<ConversationType>;
|
||||
joinState: GroupCallJoinState;
|
||||
localDemuxId: number | undefined;
|
||||
maxDevices: number;
|
||||
deviceCount: number;
|
||||
groupMembers: Array<Pick<ConversationType, 'id' | 'firstName' | 'title'>>;
|
||||
@@ -148,6 +164,8 @@ export type GroupCallRemoteParticipantType = ConversationType & {
|
||||
videoAspectRatio: number;
|
||||
};
|
||||
|
||||
export type ConversationsByDemuxIdType = Map<number, ConversationType>;
|
||||
|
||||
// Similar to RingRTC's `VideoRequest` but without the `framerate` property.
|
||||
export type GroupCallVideoRequest = {
|
||||
demuxId: number;
|
||||
|
||||
Reference in New Issue
Block a user