@@ -34,7 +34,6 @@ export default class MakeCall extends React.Component {
3434 this . meetingLink = null ;
3535 this . meetingId = null ;
3636 this . passcode = null ;
37- this . roomPstnDialOutEnabled = true ;
3837 this . presenterUserIds = null ;
3938 this . collaboratorUserIds = null ;
4039 this . attendeeUserIds = null ;
@@ -67,6 +66,7 @@ export default class MakeCall extends React.Component {
6766 showPreCallDiagnostcisResults : false ,
6867 showCustomContext : false ,
6968 roomId : undefined ,
69+ roomPstnDialOutEnabled : true ,
7070 showManageRoomsPanel : false ,
7171 xHeadersCount : 1 ,
7272 xHeadersMaxCount : 5 ,
@@ -379,7 +379,7 @@ export default class MakeCall extends React.Component {
379379
380380 createRoom = async ( ) => {
381381 try {
382- const roomId = await utils . createRoom ( this . roomPstnDialOutEnabled , this . presenterUserIds . value , this . collaboratorUserIds . value , this . attendeeUserIds . value , this . consumerUserIds . value ) ;
382+ const roomId = await utils . createRoom ( this . state . roomPstnDialOutEnabled , this . presenterUserIds . value , this . collaboratorUserIds . value , this . attendeeUserIds . value , this . consumerUserIds . value ) ;
383383 console . log ( 'Room id created: ' , roomId ) ;
384384 this . setState ( { roomId } ) ;
385385 } catch ( e ) {
@@ -1208,7 +1208,6 @@ this.callAgent.on('incomingCall', async (args) => {
12081208 < PrimaryButton className = "primary-button"
12091209 iconProps = { { iconName : 'Group' , style : { verticalAlign : 'middle' , fontSize : 'large' } } }
12101210 text = "Manage Rooms"
1211- disabled = { this . state . call || ! this . state . loggedIn }
12121211 onClick = { ( ) => this . setState ( { showManageRoomsPanel : ! this . state . showManageRoomsPanel } ) } >
12131212 </ PrimaryButton >
12141213 </ div >
@@ -1220,76 +1219,68 @@ this.callAgent.on('incomingCall', async (args) => {
12201219 < div className = "ms-Grid-row" >
12211220 < div className = "md-Grid-col ml-2 ms-sm11 ms-md11 ms-lg9 ms-xl9 ms-xxl11" >
12221221 < Toggle className = "mb-3 mt-0"
1223- disabled = { this . state . call || ! this . state . loggedIn }
1224- checked = { this . roomPstnDialOutEnabled }
1222+ checked = { this . state . roomPstnDialOutEnabled }
12251223 label = "PSTN Dial Out Enabled"
1226- inlineLabel = "True"
12271224 onText = "True"
12281225 offText = "False"
1229- onChange = { ( ) => { this . roomPstnDialOutEnabled = ! this . roomPstnDialOutEnabled } } />
1226+ onClick = { ( ) => {
1227+ console . log ( this . state . roomPstnDialOutEnabled ) ;
1228+ this . setState ( { roomPstnDialOutEnabled : ! this . state . roomPstnDialOutEnabled } )
1229+ } } />
12301230 </ div >
12311231 < div className = "md-Grid-col ml-2 ms-sm11 ms-md11 ms-lg9 ms-xl9 ms-xxl11" >
12321232 < TextField className = "mb-3 mt-0"
1233- disabled = { this . state . call || ! this . state . loggedIn }
12341233 label = "Presenter user ids (comma delimited)"
12351234 placeholder = "8:acs:<ACS resource ID>_<GUID>"
12361235 componentRef = { ( val ) => this . presenterUserIds = val } />
12371236 </ div >
12381237 < div className = "md-Grid-col ml-2 ms-sm11 ms-md11 ms-lg9 ms-xl9 ms-xxl11" >
12391238 < TextField className = "mb-3 mt-0"
1240- disabled = { this . state . call || ! this . state . loggedIn }
12411239 label = "Collaborator user ids (comma delimited)"
12421240 placeholder = "8:acs:<ACS resource ID>_<GUID>"
12431241 componentRef = { ( val ) => this . collaboratorUserIds = val } />
12441242 </ div >
12451243 < div className = "md-Grid-col ml-2 ms-sm11 ms-md11 ms-lg9 ms-xl9 ms-xxl11" >
12461244 < TextField className = "mb-3 mt-0"
1247- disabled = { this . state . call || ! this . state . loggedIn }
12481245 label = "Attendee user ids (comma delimited)"
12491246 placeholder = "8:acs:<ACS resource ID>_<GUID>"
12501247 componentRef = { ( val ) => this . attendeeUserIds = val } />
12511248 </ div >
12521249 < div className = "md-Grid-col ml-2 ms-sm11 ms-md11 ms-lg9 ms-xl9 ms-xxl11" >
12531250 < TextField className = "mb-3 mt-0"
1254- disabled = { this . state . call || ! this . state . loggedIn }
12551251 label = "Consumer user ids (comma delimited)"
12561252 placeholder = "8:acs:<ACS resource ID>_<GUID>"
12571253 componentRef = { ( val ) => this . consumerUserIds = val } />
12581254 </ div >
12591255 < PrimaryButton className = "primary-button"
12601256 iconProps = { { iconName : 'Video' , style : { verticalAlign : 'middle' , fontSize : 'large' } } }
12611257 text = "Create room"
1262- disabled = { this . state . call || ! this . state . loggedIn }
12631258 onClick = { ( ) => this . createRoom ( ) } >
12641259 </ PrimaryButton >
12651260 </ div >
12661261 < h3 className = "mb-0" > Update a Participant</ h3 >
12671262 < div className = "ms-Grid-row" >
12681263 < div className = "md-Grid-col ml-2 ms-sm11 ms-md11 ms-lg9 ms-xl9 ms-xxl11" >
12691264 < TextField className = "mb-3 mt-0"
1270- disabled = { this . state . call || ! this . state . loggedIn }
12711265 label = "Room ID"
12721266 placeholder = "Room ID (9xxxxxx)"
12731267 componentRef = { ( val ) => this . patchRoomId = val } />
12741268 </ div >
12751269 < div className = "md-Grid-col ml-2 ms-sm11 ms-md11 ms-lg9 ms-xl9 ms-xxl11" >
12761270 < TextField className = "mb-3 mt-0"
1277- disabled = { this . state . call || ! this . state . loggedIn }
12781271 label = "Participant user ID"
12791272 placeholder = "8:acs:<ACS resource ID>_<GUID>"
12801273 componentRef = { ( val ) => this . patchParticipantId = val } />
12811274 </ div >
12821275 < div className = "md-Grid-col ml-2 ms-sm11 ms-md11 ms-lg9 ms-xl9 ms-xxl11" >
12831276 < TextField className = "mb-3 mt-0"
1284- disabled = { this . state . call || ! this . state . loggedIn }
12851277 label = "Role"
12861278 placeholder = "Presenter, Collaborator, Attendee, Consumer"
12871279 componentRef = { ( val ) => this . patchParticipantRole = val } />
12881280 </ div >
12891281 < PrimaryButton className = "primary-button"
12901282 iconProps = { { iconName : 'Video' , style : { verticalAlign : 'middle' , fontSize : 'large' } } }
12911283 text = "Update participant role"
1292- disabled = { this . state . call || ! this . state . loggedIn }
12931284 onClick = { ( ) => this . updateParticipant ( ) } >
12941285 </ PrimaryButton >
12951286 </ div >
0 commit comments