def _disconnect_participant(participant): """ Disconnect a participant to the current conference. """ logger.info("Disconnecting participant %s..." % participant['name']) api.participant_disconnect(participant['name']) # sleep to give time to MCU to connect the participant time.sleep(5)
def _connect_participant(participant): """ Connect a participant to the current conference. """ logger.info("Participant %s not connected. Connecting..." % participant['name']) api.participant_connect(participant['name']) # sleep to give time to MCU to connect the participant time.sleep(5) # restore the layout of this participant in the conference logger.info("Restoring layout of participant %s with index %s" % (participant['name'], participant['layout_index'])) api.restore_layout(participant['name'], participant['layout_index'])