@ -4,16 +4,26 @@ import React, { Component } from 'react';
import { Watermarks } from '../../base/react' ;
import { Captions } from '../../subtitles/' ;
import { connect } from '../../base/redux' ;
declare var interfaceConfig : Object ;
type Props = {
/ * *
* Used to determine the value of the autoplay attribute of the underlying
* video element .
* /
_noAutoPlayVideo : boolean
}
/ * *
* Implements a React { @ link Component } which represents the large video ( a . k . a .
* the conference participant who is on the local stage ) on Web / React .
*
* @ extends Component
* /
export default class LargeVideo extends Component < { } > {
class LargeVideo extends Component < Props > {
/ * *
* Implements React ' s { @ link Component # render ( ) } .
*
@ -51,7 +61,7 @@ export default class LargeVideo extends Component<{}> {
* / }
< div id = 'largeVideoWrapper' >
< video
autoPlay = { true }
autoPlay = { ! this . props . _noAutoPlayVideo }
id = 'largeVideo'
muted = { true } / >
< / d i v >
@ -63,3 +73,24 @@ export default class LargeVideo extends Component<{}> {
) ;
}
}
/ * *
* Maps ( parts of ) the Redux state to the associated LargeVideo props .
*
* @ param { Object } state - The Redux state .
* @ private
* @ returns { {
* _noAutoPlayVideo : boolean
* } }
* /
function _mapStateToProps ( state ) {
const testingConfig = state [ 'features/base/config' ] . testing ;
return {
_noAutoPlayVideo : testingConfig ? . noAutoPlayVideo
} ;
}
export default connect ( _mapStateToProps ) ( LargeVideo ) ;