File tree Expand file tree Collapse file tree 1 file changed +9
-1
lines changed
Expand file tree Collapse file tree 1 file changed +9
-1
lines changed Original file line number Diff line number Diff line change @@ -150,6 +150,12 @@ export default class TwilioVideo extends Component {
150150 * @param {{ participant, room } } dominant participant
151151 */
152152 onDominantSpeakerDidChange : PropTypes . func ,
153+ /**
154+ * Whether or not video should be automatically initialized upon mounting
155+ * of this component. Defaults to true. If set to false, any use of the
156+ * camera will require calling `_startLocalVideo`.
157+ */
158+ autoInitializeCamera : PropTypes . bool ,
153159 ...View . propTypes
154160 }
155161
@@ -162,7 +168,9 @@ export default class TwilioVideo extends Component {
162168
163169 componentDidMount ( ) {
164170 this . _registerEvents ( )
165- this . _startLocalVideo ( )
171+ if ( this . props . autoInitializeCamera !== false ) {
172+ this . _startLocalVideo ( )
173+ }
166174 this . _startLocalAudio ( )
167175 }
168176
You can’t perform that action at this time.
0 commit comments