You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.rst
+10-10Lines changed: 10 additions & 10 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -39,13 +39,13 @@ Initializing
39
39
~~~~~~~~~~~~
40
40
41
41
Import the package at the top of any file where you will use it. At the very least you will need the
42
-
``OpenTok`` class. Then initialize an OpenTok instance with your own API Key and API Secret.
42
+
``Client`` class from the opentok module. Then initialize an opentok Client instance with your own API Key and API Secret.
43
43
44
44
.. code:: python
45
45
46
-
from opentok importOpenTok
46
+
from opentok importClient
47
47
48
-
opentok =OpenTok(api_key, api_secret)
48
+
opentok =Client(api_key, api_secret)
49
49
50
50
Creating Sessions
51
51
~~~~~~~~~~~~~~~~~
@@ -238,7 +238,7 @@ For more information on archiving, see the
238
238
Sending Signals
239
239
~~~~~~~~~~~~~~~~~~~~~
240
240
241
-
Once a Session is created, you can send signals to everyone in the session or to a specific connection. You can send a signal by calling the ``signal(session_id, payload)`` method of the ``OpenTok`` class. The ``payload`` parameter is a dictionary used to set the ``type``, ``data`` fields. Ỳou can also call the method with the parameter ``connection_id`` to send a signal to a specific connection ``signal(session_id, data, connection_id)``.
241
+
Once a Session is created, you can send signals to everyone in the session or to a specific connection. You can send a signal by calling the ``signal(session_id, payload)`` method of the ``Client`` class. The ``payload`` parameter is a dictionary used to set the ``type``, ``data`` fields. Ỳou can also call the method with the parameter ``connection_id`` to send a signal to a specific connection ``signal(session_id, data, connection_id)``.
242
242
243
243
.. code:: python
244
244
@@ -259,7 +259,7 @@ Once a Session is created, you can send signals to everyone in the session or to
259
259
Working with Streams
260
260
~~~~~~~~~~~~~~~~~~~~~
261
261
262
-
You can get information about a stream by calling the `get_stream(session_id, stream_id)` method of the `OpenTok` class.
262
+
You can get information about a stream by calling the `get_stream(session_id, stream_id)` method of the `Client` class.
263
263
264
264
The method returns a Stream object that contains information of an OpenTok stream:
265
265
@@ -282,7 +282,7 @@ The method returns a Stream object that contains information of an OpenTok strea
282
282
print stream.name #stream name
283
283
print stream.layoutClassList #['full']
284
284
285
-
Also, you can get information about all the streams in a session by calling the `list_streams(session_id)` method of the `OpenTok` class.
285
+
Also, you can get information about all the streams in a session by calling the `list_streams(session_id)` method of the `Client` class.
286
286
287
287
The method returns a StreamList object that contains a list of all the streams
288
288
@@ -324,7 +324,7 @@ For more information see
324
324
Force Disconnect
325
325
~~~~~~~~~~~~~~~~~~~~~
326
326
327
-
Your application server can disconnect a client from an OpenTok session by calling the force_disconnect(session_id, connection_id) method of the OpenTok class, or the force_disconnect(connection_id) method of the Session class.
327
+
Your application server can disconnect a client from an OpenTok session by calling the force_disconnect(session_id, connection_id) method of the Client class, or the force_disconnect(connection_id) method of the Session class.
328
328
329
329
.. code:: python
330
330
@@ -473,13 +473,13 @@ For more information about OpenTok live streaming broadcasts, see the
473
473
474
474
Configuring Timeout
475
475
-------
476
-
Timeout is passed in the OpenTok constructor:
476
+
Timeout is passed in the Client constructor:
477
477
478
478
``self.timeout = timeout``
479
479
480
480
In order to configure timeout, first create an instance:
481
481
482
-
``opentok = OpenTok(...., timeout=value)``
482
+
``opentok = Client(...., timeout=value)``
483
483
484
484
And then proceed to change the value with
485
485
@@ -527,7 +527,7 @@ session uses the OpenTok TURN server to relay audio-video streams.
527
527
528
528
This version of the SDK includes support for working with OpenTok archives.
529
529
530
-
The OpenTok.create_session() method now includes a media_mode parameter, instead of a p2p parameter.
530
+
The Client.create_session() method now includes a media_mode parameter, instead of a p2p parameter.
0 commit comments