import React, {useContext} from 'react'; import {RenderModeType, RtcSurfaceView} from 'react-native-agora'; import styles from '../Style'; import PropsContext, {UidInterface} from '../Contexts/PropsContext'; import {View} from 'react-native'; // import {RtcContext} from 'Contexts'; interface MaxViewInterface { user: UidInterface; fallback?: React.ComponentType; } const MaxVideoView: React.FC = (props) => { const {styleProps} = useContext(PropsContext); // const {rtcUidRef} = useContext(RtcContext); const {maxViewStyles} = styleProps || {}; const Fallback = props.fallback; return props.user.uid === 'local' ? ( props.user.video ? ( ) : Fallback ? ( ) : ( ) ) : ( <>
{props.user.video ? ( <> ) : ( <> {Fallback ? ( ) : ( )} )} ); }; export default MaxVideoView;