|
|
|
@ -21,6 +21,8 @@ import { setSeeWhatIsBeingShared } from '../actions.web'; |
|
|
|
|
|
|
|
|
|
import ScreenSharePlaceholder from './ScreenSharePlaceholder.web'; |
|
|
|
|
|
|
|
|
|
// Hack to detect Spot.
|
|
|
|
|
const SPOT_DISPLAY_NAME = 'Meeting Room'; |
|
|
|
|
|
|
|
|
|
declare var interfaceConfig: Object; |
|
|
|
|
|
|
|
|
@ -41,6 +43,11 @@ type Props = { |
|
|
|
|
*/ |
|
|
|
|
_customBackgroundImageUrl: string, |
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
* Whether the screen-sharing placeholder should be displayed or not. |
|
|
|
|
*/ |
|
|
|
|
_displayScreenSharingPlaceholder: boolean, |
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
* Prop that indicates whether the chat is open. |
|
|
|
|
*/ |
|
|
|
@ -156,11 +163,10 @@ class LargeVideo extends Component<Props> { |
|
|
|
|
*/ |
|
|
|
|
render() { |
|
|
|
|
const { |
|
|
|
|
_displayScreenSharingPlaceholder, |
|
|
|
|
_isChatOpen, |
|
|
|
|
_noAutoPlayVideo, |
|
|
|
|
_showDominantSpeakerBadge, |
|
|
|
|
_isScreenSharing, |
|
|
|
|
_seeWhatIsBeingShared |
|
|
|
|
_showDominantSpeakerBadge |
|
|
|
|
} = this.props; |
|
|
|
|
const style = this._getCustomStyles(); |
|
|
|
|
const className = `videocontainer${_isChatOpen ? ' shift-right' : ''}`; |
|
|
|
@ -199,11 +205,11 @@ class LargeVideo extends Component<Props> { |
|
|
|
|
onTouchEnd = { this._onDoubleTap } |
|
|
|
|
ref = { this._wrapperRef } |
|
|
|
|
role = 'figure' > |
|
|
|
|
{_isScreenSharing && !_seeWhatIsBeingShared ? <ScreenSharePlaceholder /> : <video |
|
|
|
|
{ _displayScreenSharingPlaceholder ? <ScreenSharePlaceholder /> : <video |
|
|
|
|
autoPlay = { !_noAutoPlayVideo } |
|
|
|
|
id = 'largeVideo' |
|
|
|
|
muted = { true } |
|
|
|
|
playsInline = { true } /* for Safari on iOS to work */ />} |
|
|
|
|
playsInline = { true } /* for Safari on iOS to work */ /> } |
|
|
|
|
</div> |
|
|
|
|
</div> |
|
|
|
|
{ interfaceConfig.DISABLE_TRANSCRIPTION_SUBTITLES |
|
|
|
@ -323,7 +329,8 @@ function _mapStateToProps(state) { |
|
|
|
|
const { backgroundColor, backgroundImageUrl } = state['features/dynamic-branding']; |
|
|
|
|
const { isOpen: isChatOpen } = state['features/chat']; |
|
|
|
|
const { width: verticalFilmstripWidth, visible } = state['features/filmstrip']; |
|
|
|
|
const { hideDominantSpeakerBadge } = state['features/base/config']; |
|
|
|
|
const { defaultLocalDisplayName, hideDominantSpeakerBadge } = state['features/base/config']; |
|
|
|
|
const { seeWhatIsBeingShared } = state['features/large-video']; |
|
|
|
|
|
|
|
|
|
const tracks = state['features/base/tracks']; |
|
|
|
|
const localParticipantId = getLocalParticipant(state)?.id; |
|
|
|
@ -338,16 +345,19 @@ function _mapStateToProps(state) { |
|
|
|
|
const isLocalScreenshareOnLargeVideo = largeVideoParticipant?.id?.includes(localParticipantId) |
|
|
|
|
&& videoTrack?.videoType === VIDEO_TYPE.DESKTOP; |
|
|
|
|
|
|
|
|
|
const isOnSpot = defaultLocalDisplayName === SPOT_DISPLAY_NAME; |
|
|
|
|
|
|
|
|
|
return { |
|
|
|
|
_backgroundAlpha: state['features/base/config'].backgroundAlpha, |
|
|
|
|
_customBackgroundColor: backgroundColor, |
|
|
|
|
_customBackgroundImageUrl: backgroundImageUrl, |
|
|
|
|
_displayScreenSharingPlaceholder: isLocalScreenshareOnLargeVideo && !seeWhatIsBeingShared && !isOnSpot, |
|
|
|
|
_isChatOpen: isChatOpen, |
|
|
|
|
_isScreenSharing: isLocalScreenshareOnLargeVideo, |
|
|
|
|
_largeVideoParticipantId: largeVideoParticipant?.id, |
|
|
|
|
_noAutoPlayVideo: testingConfig?.noAutoPlayVideo, |
|
|
|
|
_resizableFilmstrip: isFilmstripResizable(state), |
|
|
|
|
_seeWhatIsBeingShared: state['features/large-video'].seeWhatIsBeingShared, |
|
|
|
|
_seeWhatIsBeingShared: seeWhatIsBeingShared, |
|
|
|
|
_showDominantSpeakerBadge: !hideDominantSpeakerBadge, |
|
|
|
|
_verticalFilmstripWidth: verticalFilmstripWidth.current, |
|
|
|
|
_verticalViewMaxWidth: getVerticalViewMaxWidth(state), |
|
|
|
|