Skip to content

Commit

Permalink
fixup! Allow to prepare virtual participants without immediately join…
Browse files Browse the repository at this point in the history
…ing the call

Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
  • Loading branch information
danxuliu committed Oct 16, 2023
1 parent 7fbc870 commit c581ff4
Showing 1 changed file with 26 additions and 15 deletions.
41 changes: 26 additions & 15 deletions docs/Talkbuchet-cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -1351,7 +1351,7 @@ def switchToVirtualParticipantMode():
Note that adding a new participant does not remove the previous ones. That
should be explicitly done by calling "removeVirtualParticipants()" (or
"removeVirtualParticipant(INDEX)" to remove just a specific participant).
"removeVirtualParticipant(INDEX)" to remove just a specific participant).
Therefore, it is possible to add several participants with different
parameters (like several guests and then several users, or participants with
and without media) by setting the parameters, calling
Expand All @@ -1360,8 +1360,8 @@ def switchToVirtualParticipantMode():
In case joining/leaving a call should be tested, it makes sense to use
"prepareVirtualParticipant()" / "prepareVirtualParticipants(NUMBER)" and
then start them with "startVirtualParticipants()" and stop them with
"stopVirtualParticipants()". In case joining/leaving should be done in
then start them with "startVirtualParticipants()" and stop them with
"stopVirtualParticipants()". In case joining/leaving should be done in
parallel one can use "startVirtualParticipantsParallel()" and
"stopVirtualParticipantsParallel()".
Expand Down Expand Up @@ -1449,20 +1449,27 @@ def startVirtualParticipants():
"""
Starts all virtual participants which are prepared.
Note that there's no check if a virtual participant was
already started before.
Note that there is no check if a virtual participant was already started
before. The result of starting again a virtual participant before
stopping it first is undefined, no matter if the virtual participant was
started with any of the "startVirtualParticipants" or
"addVirtualParticipant" variants.
See :py:func:`prepareVirtualParticipant`.
"""
"""
for virtualParticipant in virtualParticipants:
virtualParticipant.startVirtualParticipant()
virtualParticipant.startVirtualParticipant()

def startVirtualParticipantsParallel():
"""
Stops all virtual participants.
Starts all virtual participants.
Same as :py:func:`startVirtualParticipants`, but starting each
virtual participant in parallel.
Same as :py:func:`startVirtualParticipants`, but starting each virtual
participant in parallel.
This method returns before the virtual participants were fully started,
so it should be ensured that starting them finished before starting more
virtual participants or stopping them.
"""

for virtualParticipant in virtualParticipants:
Expand All @@ -1476,8 +1483,8 @@ def stopVirtualParticipants():
The participants are not removed and can be started again.
See :py:func:`prepareVirtualParticipant`.
Note that there's no check if a virtual participant was
started/stopped before.
Note that there is no check if a virtual participant was started/stopped
before.
See :py:func:`prepareVirtualParticipant`.
"""
Expand All @@ -1489,8 +1496,12 @@ def stopVirtualParticipantsParallel():
"""
Stops all virtual participants.
Same as :py:func:`stopVirtualParticipants` but stopping each
virtual participant in parallel.
Same as :py:func:`stopVirtualParticipants`, but stopping each virtual
participant in parallel.
This method returns before the virtual participants were fully stopped,
so it should be ensured that stopping them finished before starting or
stopping them again.
"""

for virtualParticipant in virtualParticipants:
Expand All @@ -1511,7 +1522,7 @@ def addVirtualParticipant():
existing virtual participant, the updated value will be used only by
virtual participants added after they were changed.
This method prepares a participant and immediately starts it.
This method prepares a participant and immediately starts it.
"""

if not _isValidConfiguration():
Expand Down

0 comments on commit c581ff4

Please sign in to comment.