Import AudioDevice and VideoFrameSource directly from RingRTC

This commit is contained in:
Evan Hahn
2021-09-28 11:37:03 -05:00
committed by GitHub
parent ed222fee9a
commit e32503eed4
14 changed files with 21 additions and 42 deletions

View File

@@ -1,7 +1,8 @@
// Copyright 2020-2021 Signal Messenger, LLC
// SPDX-License-Identifier: AGPL-3.0-only
import { ConversationType } from '../state/ducks/conversations';
import type { AudioDevice } from 'ringrtc';
import type { ConversationType } from '../state/ducks/conversations';
// These are strings (1) for the database (2) for Storybook.
export enum CallMode {
@@ -134,23 +135,6 @@ export type GroupCallVideoRequest = {
height: number;
};
// Should match RingRTC's VideoFrameSource
export type VideoFrameSource = {
receiveVideoFrame(buffer: Buffer): [number, number] | undefined;
};
// Must be kept in sync with RingRTC.AudioDevice
export type AudioDevice = {
// Device name.
name: string;
// Index of this device, starting from 0.
index: number;
// A unique and somewhat stable identifier of this device.
uniqueId: string;
// If present, the identifier of a localized string to substitute for the device name.
i18nKey?: string;
};
export enum CallingDeviceType {
CAMERA,
MICROPHONE,