Skip to content

Commit

Permalink
Upgrade to RingRTC v2.8.2 RC.6
Browse files Browse the repository at this point in the history
  • Loading branch information
EvanHahn-Signal authored and josh-signal committed Nov 23, 2020
1 parent 4bf5a24 commit b366967
Show file tree
Hide file tree
Showing 15 changed files with 212 additions and 181 deletions.
2 changes: 1 addition & 1 deletion package.json
Expand Up @@ -136,7 +136,7 @@
"redux-ts-utils": "3.2.2",
"reselect": "4.0.0",
"rimraf": "2.6.2",
"ringrtc": "https://github.com/signalapp/signal-ringrtc-node.git#7de95cffa71019e94c74fc43313c28eaf23c66e1",
"ringrtc": "https://github.com/signalapp/signal-ringrtc-node.git#65fbea67295005fe1a9db2cbe85fce0d5297848d",
"sanitize-filename": "1.6.3",
"sanitize.css": "11.0.0",
"semver": "5.4.1",
Expand Down
11 changes: 2 additions & 9 deletions ts/components/CallManager.stories.tsx
Expand Up @@ -62,17 +62,10 @@ const createProps = (storyProps: Partial<PropsType> = {}): PropsType => ({
cancelCall: action('cancel-call'),
closeNeedPermissionScreen: action('close-need-permission-screen'),
declineCall: action('decline-call'),
// We allow `any` here because these are fake and actually come from RingRTC, which we
// We allow `any` here because this is fake and actually comes from RingRTC, which we
// can't import.
/* eslint-disable @typescript-eslint/no-explicit-any */
createCanvasVideoRenderer: () =>
({
setCanvas: noop,
enable: noop,
disable: noop,
} as any),
// eslint-disable-next-line @typescript-eslint/no-explicit-any
getGroupCallVideoFrameSource: noop as any,
/* eslint-enable @typescript-eslint/no-explicit-any */
hangUp: action('hang-up'),
i18n,
me: {
Expand Down
5 changes: 0 additions & 5 deletions ts/components/CallManager.tsx
Expand Up @@ -12,7 +12,6 @@ import {
CallEndedReason,
CallMode,
CallState,
CanvasVideoRenderer,
GroupCallJoinState,
GroupCallRemoteParticipantType,
VideoFrameSource,
Expand Down Expand Up @@ -47,7 +46,6 @@ export interface PropsType {
activeCall?: ActiveCallType;
availableCameras: Array<MediaDeviceInfo>;
cancelCall: (_: CancelCallType) => void;
createCanvasVideoRenderer: () => CanvasVideoRenderer;
closeNeedPermissionScreen: () => void;
getGroupCallVideoFrameSource: (
conversationId: string,
Expand Down Expand Up @@ -89,7 +87,6 @@ const ActiveCallManager: React.FC<ActiveCallManagerPropsType> = ({
availableCameras,
cancelCall,
closeNeedPermissionScreen,
createCanvasVideoRenderer,
hangUp,
i18n,
getGroupCallVideoFrameSource,
Expand Down Expand Up @@ -210,7 +207,6 @@ const ActiveCallManager: React.FC<ActiveCallManagerPropsType> = ({
<CallingPip
call={call}
conversation={conversation}
createCanvasVideoRenderer={createCanvasVideoRenderer}
getGroupCallVideoFrameSource={getGroupCallVideoFrameSourceForActiveCall}
hangUp={hangUp}
hasLocalVideo={hasLocalVideo}
Expand All @@ -227,7 +223,6 @@ const ActiveCallManager: React.FC<ActiveCallManagerPropsType> = ({
<CallScreen
call={call}
conversation={conversation}
createCanvasVideoRenderer={createCanvasVideoRenderer}
getGroupCallVideoFrameSource={getGroupCallVideoFrameSourceForActiveCall}
hangUp={hangUp}
hasLocalAudio={hasLocalAudio}
Expand Down
11 changes: 2 additions & 9 deletions ts/components/CallScreen.stories.tsx
Expand Up @@ -78,17 +78,10 @@ const createProps = (
type: 'direct',
lastUpdated: Date.now(),
},
// We allow `any` here because these are fake and actually come from RingRTC, which we
// We allow `any` here because this is fake and actually comes from RingRTC, which we
// can't import.
/* eslint-disable @typescript-eslint/no-explicit-any */
createCanvasVideoRenderer: () =>
({
setCanvas: noop,
enable: noop,
disable: noop,
} as any),
// eslint-disable-next-line @typescript-eslint/no-explicit-any
getGroupCallVideoFrameSource: noop as any,
/* eslint-enable @typescript-eslint/no-explicit-any */
hangUp: action('hang-up'),
hasLocalAudio: boolean('hasLocalAudio', overrideProps.hasLocalAudio || false),
hasLocalVideo: boolean('hasLocalVideo', overrideProps.hasLocalVideo || false),
Expand Down
4 changes: 0 additions & 4 deletions ts/components/CallScreen.tsx
Expand Up @@ -22,7 +22,6 @@ import {
CallMode,
CallState,
GroupCallConnectionState,
CanvasVideoRenderer,
VideoFrameSource,
} from '../types/Calling';
import { ColorType } from '../types/Colors';
Expand All @@ -34,7 +33,6 @@ import { GroupCallRemoteParticipants } from './GroupCallRemoteParticipants';
export type PropsType = {
call: DirectCallStateType | GroupCallStateType;
conversation: ConversationType;
createCanvasVideoRenderer: () => CanvasVideoRenderer;
getGroupCallVideoFrameSource: (demuxId: number) => VideoFrameSource;
hangUp: (_: HangUpType) => void;
hasLocalAudio: boolean;
Expand Down Expand Up @@ -62,7 +60,6 @@ export type PropsType = {
export const CallScreen: React.FC<PropsType> = ({
call,
conversation,
createCanvasVideoRenderer,
getGroupCallVideoFrameSource,
hangUp,
hasLocalAudio,
Expand Down Expand Up @@ -174,7 +171,6 @@ export const CallScreen: React.FC<PropsType> = ({
remoteParticipantsElement = (
<GroupCallRemoteParticipants
remoteParticipants={call.remoteParticipants}
createCanvasVideoRenderer={createCanvasVideoRenderer}
getGroupCallVideoFrameSource={getGroupCallVideoFrameSource}
/>
);
Expand Down
4 changes: 1 addition & 3 deletions ts/components/CallingPip.stories.tsx
Expand Up @@ -46,9 +46,7 @@ const defaultCall = {
const createProps = (overrideProps: Partial<PropsType> = {}): PropsType => ({
call: overrideProps.call || defaultCall,
conversation: overrideProps.conversation || conversation,
/* eslint-disable @typescript-eslint/no-explicit-any */
createCanvasVideoRenderer: noop as any,
/* eslint-disable @typescript-eslint/no-explicit-any */
// eslint-disable-next-line @typescript-eslint/no-explicit-any
getGroupCallVideoFrameSource: noop as any,
hangUp: action('hang-up'),
hasLocalVideo: boolean('hasLocalVideo', overrideProps.hasLocalVideo || false),
Expand Down
5 changes: 1 addition & 4 deletions ts/components/CallingPip.tsx
Expand Up @@ -6,7 +6,7 @@ import Tooltip from 'react-tooltip-lite';
import { CallingPipRemoteVideo } from './CallingPipRemoteVideo';
import { LocalizerType } from '../types/Util';
import { ConversationType } from '../state/ducks/conversations';
import { CanvasVideoRenderer, VideoFrameSource } from '../types/Calling';
import { VideoFrameSource } from '../types/Calling';
import {
DirectCallStateType,
GroupCallStateType,
Expand All @@ -18,7 +18,6 @@ import {
export type PropsType = {
call: DirectCallStateType | GroupCallStateType;
conversation: ConversationType;
createCanvasVideoRenderer: () => CanvasVideoRenderer;
getGroupCallVideoFrameSource: (demuxId: number) => VideoFrameSource;
hangUp: (_: HangUpType) => void;
hasLocalVideo: boolean;
Expand All @@ -36,7 +35,6 @@ const PIP_PADDING = 8;
export const CallingPip = ({
call,
conversation,
createCanvasVideoRenderer,
getGroupCallVideoFrameSource,
hangUp,
hasLocalVideo,
Expand Down Expand Up @@ -171,7 +169,6 @@ export const CallingPip = ({
<CallingPipRemoteVideo
call={call}
conversation={conversation}
createCanvasVideoRenderer={createCanvasVideoRenderer}
getGroupCallVideoFrameSource={getGroupCallVideoFrameSource}
i18n={i18n}
setRendererCanvas={setRendererCanvas}
Expand Down
14 changes: 2 additions & 12 deletions ts/components/CallingPipRemoteVideo.tsx
Expand Up @@ -8,11 +8,7 @@ import { DirectCallRemoteParticipant } from './DirectCallRemoteParticipant';
import { GroupCallRemoteParticipant } from './GroupCallRemoteParticipant';
import { LocalizerType } from '../types/Util';
import { ConversationType } from '../state/ducks/conversations';
import {
CallMode,
CanvasVideoRenderer,
VideoFrameSource,
} from '../types/Calling';
import { CallMode, VideoFrameSource } from '../types/Calling';
import {
DirectCallStateType,
GroupCallStateType,
Expand All @@ -22,7 +18,6 @@ import {
export interface PropsType {
call: DirectCallStateType | GroupCallStateType;
conversation: ConversationType;
createCanvasVideoRenderer: () => CanvasVideoRenderer;
getGroupCallVideoFrameSource: (demuxId: number) => VideoFrameSource;
i18n: LocalizerType;
setRendererCanvas: (_: SetRendererCanvasType) => void;
Expand All @@ -31,7 +26,6 @@ export interface PropsType {
export const CallingPipRemoteVideo = ({
call,
conversation,
createCanvasVideoRenderer,
getGroupCallVideoFrameSource,
i18n,
setRendererCanvas,
Expand Down Expand Up @@ -87,16 +81,12 @@ export const CallingPipRemoteVideo = ({
return (
<div className="module-calling-pip__video--remote">
<GroupCallRemoteParticipant
isInPip
key={speaker.demuxId}
createCanvasVideoRenderer={createCanvasVideoRenderer}
demuxId={speaker.demuxId}
getGroupCallVideoFrameSource={getGroupCallVideoFrameSource}
hasRemoteAudio={speaker.hasRemoteAudio}
hasRemoteVideo={speaker.hasRemoteVideo}
height="100%"
left={0}
top={0}
width="100%"
/>
</div>
);
Expand Down

0 comments on commit b366967

Please sign in to comment.