Calling support

This commit is contained in:
Peter Thatcher 2020-06-04 11:16:19 -07:00 committed by Scott Nonnenberg
parent 83574eb067
commit d3a27a6442
72 changed files with 3864 additions and 191 deletions

View file

@ -0,0 +1,23 @@
import { RefObject } from 'react';
import { connect } from 'react-redux';
import { CanvasVideoRenderer, GumVideoCapturer } from 'ringrtc';
import { mapDispatchToProps } from '../actions';
import { CallManager } from '../../components/CallManager';
import { StateType } from '../reducer';
import { getIntl } from '../selectors/user';
const mapStateToProps = (state: StateType) => {
return {
...state.calling,
i18n: getIntl(state),
getVideoCapturer: (localVideoRef: RefObject<HTMLVideoElement>) =>
new GumVideoCapturer(640, 480, 30, localVideoRef),
getVideoRenderer: (remoteVideoRef: RefObject<HTMLCanvasElement>) =>
new CanvasVideoRenderer(remoteVideoRef),
};
};
const smart = connect(mapStateToProps, mapDispatchToProps);
export const SmartCallManager = smart(CallManager);