Skip to content

Commit 245faed

Browse files
committed
Docs edits
1 parent bedeeaf commit 245faed

File tree

1 file changed

+12
-16
lines changed

1 file changed

+12
-16
lines changed

opentok/opentok.py

Lines changed: 12 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1648,20 +1648,17 @@ def mute_all(self,
16481648
options: dict = {}) -> requests.Response:
16491649

16501650
"""
1651-
Use this method so the moderator can mute all streams for OpenTok.
1651+
Mutes all streams in an OpenTok session.
16521652
1653-
A moderator can exclude streams Id's from being muted. Please note that a
1654-
client is able to unmute themselves.
1653+
You can include an optional list of streams IDs to exclude from being muted.
16551654
1656-
This function stays in the OpenTok class and inherits from the Client class.
1655+
:param session_id The session ID
16571656
1658-
:param session_id gets the session id
1659-
1660-
:param excludedStreamIds is a list of the stream IDs for streams that should not be muted.
1657+
:param excludedStreamIds A list of stream IDs for streams that should not be muted.
16611658
This is an optional property. If you omit this property, all streams in the session will be muted.
16621659
1663-
:param active is a required boolean that determines whether streams published after the
1664-
call, in addition to the current streams in the session, should be muted (True) or not (False).
1660+
:param active Whether streams published after the call, in addition to the current streams
1661+
in the session, should be muted (True) or not (False).
16651662
16661663
:param options is an empty dictonary representing the payload of the request,
16671664
whose contents will get populated inside the function
@@ -1684,9 +1681,9 @@ def mute_all(self,
16841681
elif response.status_code == 400:
16851682
raise GetStreamError("Invalid request. This response may indicate that data in your request data is invalid JSON. Or it may indicate that you do not pass in a session ID or you passed in an invalid stream ID.")
16861683
elif response.status_code == 403:
1687-
raise AuthError("Failed to create session, invalid credentials")
1684+
raise AuthError("Failed to mute, invalid credentials.")
16881685
elif response.status_code == 404:
1689-
raise NotFoundError("Mute not found")
1686+
raise NotFoundError("The session or a stream is not found.")
16901687
except Exception as e:
16911688
raise OpenTokException(
16921689
("There was an error thrown by the OpenTok SDK, please check that your session_id {0} and excludedStreamIds (if exists) {1} are valid").format(
@@ -1696,12 +1693,11 @@ def mute_all(self,
16961693

16971694
def mute_stream(self, session_id: str, stream_id: str, options: dict = {}) -> requests.Response:
16981695
"""
1699-
Use this method so the moderator can mute a single stream for OpenTok.
1700-
This function stays in the OpenTok class and inherits from the Client class.
1696+
Mutes a single stream in an OpenTok session.
17011697
1702-
:param session_id gets the session id from another function called get_session()
1698+
:param session_id The session ID.
17031699
1704-
:param stream_id gets a single stream id
1700+
:param stream_id The stream iD.
17051701
17061702
:param options is an empty dictonary representing the payload of the request,
17071703
whose contents will get populated inside the function
@@ -1718,7 +1714,7 @@ def mute_stream(self, session_id: str, stream_id: str, options: dict = {}) -> re
17181714
elif response.status_code == 400:
17191715
raise GetStreamError("Invalid request. This response may indicate that data in your request data is invalid JSON. Or it may indicate that you do not pass in a session ID or you passed in an invalid stream ID.")
17201716
elif response.status_code == 403:
1721-
raise AuthError("Failed to create session, invalid credentials")
1717+
raise AuthError("Failed to mute, invalid credentials.")
17221718
elif response.status_code == 404:
17231719
raise NotFoundError("Mute not found")
17241720
except Exception as e:

0 commit comments

Comments
 (0)