...
13. Выход участника из комнаты
Room.leave() code
Code Block | ||||
---|---|---|---|---|
| ||||
onJoinClick = () => { let app = this; ... let room = this.state.room; let participants = this.state.participants; if (!room) { ... } else { this.setState({joinButtonDisabled: true}, () => { participants.forEach((participant) => { // Stop all the playing participants streams app.stopParticipantStream(participant.stream); }); room.leave().then(() => {app.onLeft();}, () => {app.onLeft();}); }); } }; |