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
<p>Add the <ttclass="docutils literal"><spanclass="pre">opentok</span></tt> package as a dependency in your project. The most common way is to add it to your
<h3>Manually:<aclass="headerlink" href="#manually" title="Permalink to this headline">¶</a></h3>
69
-
<p>Download the latest package zip from the <aclass="reference external" href="https://github.com/opentok/Opentok-Python-SDK/releases">Releases page</a></p>
70
-
</div>
71
-
</div>
72
70
<divclass="section" id="usage">
73
71
<h2>Usage<aclass="headerlink" href="#usage" title="Permalink to this headline">¶</a></h2>
74
72
<divclass="section" id="initializing">
@@ -85,12 +83,14 @@ <h3>Initializing<a class="headerlink" href="#initializing" title="Permalink to t
85
83
<h3>Creating Sessions<aclass="headerlink" href="#creating-sessions" title="Permalink to this headline">¶</a></h3>
86
84
<p>The create an OpenTok Session, use the <ttclass="docutils literal"><spanclass="pre">opentok.create_session()</span></tt> method. There are two optional
87
85
keyword parameters for this method: <ttclass="docutils literal"><spanclass="pre">location</span></tt> which can be set to a string containing an IP
88
-
address, and <ttclass="docutils literal"><spanclass="pre">p2p</span></tt> which is a boolean. This method returns a <ttclass="docutils literal"><spanclass="pre">Session</span></tt> object. Its
89
-
<ttclass="docutils literal"><spanclass="pre">session_id</span></tt> attribute is useful when saving to a persistent store (e.g. database).</p>
90
-
<divclass="code python highlight-python"><divclass="highlight"><pre><spanclass="c"># Just a plain Session</span>
86
+
address, and <ttclass="docutils literal"><spanclass="pre">media_mode</span></tt> which is a String (defined by the MediaModes class). This method returns
87
+
a <ttclass="docutils literal"><spanclass="pre">Session</span></tt> object. Its <ttclass="docutils literal"><spanclass="pre">session_id</span></tt> attribute is useful when saving to a persistent store (such
88
+
as a database).</p>
89
+
<divclass="code python highlight-python"><divclass="highlight"><pre><spanclass="c"># Just a plain Session:</span>
<h2>Documentation<aclass="headerlink" href="#documentation" title="Permalink to this headline">¶</a></h2>
176
-
<p>Reference documentation is available at <<aclass="reference external" href="http://www.tokbox.com//opentok/libraries/server/python/reference/index.html">http://www.tokbox.com//opentok/libraries/server/python/reference/index.html</a>> and in the
185
+
<p>Reference documentation is available at <<aclass="reference external" href="http://www.tokbox.com/opentok/libraries/server/python/reference/index.html">http://www.tokbox.com/opentok/libraries/server/python/reference/index.html</a>> and in the
177
186
docs directory of the SDK.</p>
178
187
</div>
179
188
<divclass="section" id="requirements">
@@ -185,18 +194,19 @@ <h2>Requirements<a class="headerlink" href="#requirements" title="Permalink to t
185
194
<h2>Release Notes<aclass="headerlink" href="#release-notes" title="Permalink to this headline">¶</a></h2>
186
195
<p>See the <aclass="reference external" href="https://github.com/opentok/Opentok-Python-SDK/releases">Releases</a> page for details about
Copy file name to clipboardExpand all lines: docs/docs/opentok.html
+8-8Lines changed: 8 additions & 8 deletions
Original file line number
Diff line number
Diff line change
@@ -124,7 +124,7 @@ <h2>Submodules<a class="headerlink" href="#submodules" title="Permalink to this
124
124
125
125
<dlclass="class">
126
126
<dtid="opentok.archives.ArchiveList">
127
-
<emclass="property">class </em><ttclass="descclassname">opentok.archives.</tt><ttclass="descname">ArchiveList</tt><big>(</big><em>values</em><big>)</big><aclass="headerlink" href="#opentok.archives.ArchiveList" title="Permalink to this definition">¶</a></dt>
127
+
<emclass="property">class </em><ttclass="descclassname">opentok.archives.</tt><ttclass="descname">ArchiveList</tt><big>(</big><em>sdk</em>, <em>values</em><big>)</big><aclass="headerlink" href="#opentok.archives.ArchiveList" title="Permalink to this definition">¶</a></dt>
<li><strong>mediaMode</strong> (<em>String</em>) – <p>Determines whether the session will transmit streams using the
257
-
OpenTok Media Router (MediaMode.ROUTED) or not (MediaMode.RELAYED). By default,
258
-
sessions use the OpenTok Media Router.</p>
257
+
OpenTok Media Router (MediaMode.routed) or not (MediaMode.relayed). By default,
258
+
the setting is MediaMode.relayed.</p>
259
+
<p>With the mediaMode property set to MediaMode.relayed, the session
260
+
will attempt to transmit streams directly between clients. If clients cannot connect
261
+
due to firewall restrictions, the session uses the OpenTok TURN server to relay
262
+
audio-video streams.</p>
259
263
<p>The OpenTok Media Router (see <aclass="reference external" href="http://www.tokbox.com/#multiparty">http://www.tokbox.com/#multiparty</a>)
260
264
provides the following benefits:</p>
261
265
<blockquote>
262
266
<div><ul>
263
267
<li><dlclass="first docutils">
264
268
<dt>The OpenTok Media Router can decrease bandwidth usage in multiparty sessions.</dt>
265
-
<dd>(When the mediaMode property is set to MediaMode.RELAYED, each client must send
269
+
<dd>(When the mediaMode property is set to MediaMode.relayed, each client must send
266
270
a separate audio-video stream to each client subscribing to it.)</dd>
267
271
</dl>
268
272
</li>
@@ -276,10 +280,6 @@ <h2>Submodules<a class="headerlink" href="#submodules" title="Permalink to this
276
280
you record, save, and retrieve OpenTok sessions (see <aclass="reference external" href="http://tokbox.com/platform/archiving">http://tokbox.com/platform/archiving</a>).</li>
277
281
</ul>
278
282
</div></blockquote>
279
-
<p>With the mediaMode property set to MediaMode.RELAYED, the session
280
-
will attempt to transmit streams directly between clients. If clients cannot connect
281
-
due to firewall restrictions, the session uses the OpenTok TURN server to relay
282
-
audio-video streams.</p>
283
283
<p>You will be billed for streamed minutes if you use the OpenTok Media Router or if the
284
284
session uses the OpenTok TURN server to relay streams. For information on pricing, see
285
285
the OpenTok pricing page (<aclass="reference external" href="http://www.tokbox.com/pricing">http://www.tokbox.com/pricing</a>).</p>
0 commit comments