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
<h2>Installation using Pip (recommended):<aclass="headerlink" href="#installation-using-pip-recommended" title="Permalink to this headline">¶</a></h2>
57
56
<p>Pip helps manage dependencies for Python projects using the PyPI index. Find more info here:
@@ -80,16 +79,19 @@ <h3>Initializing<a class="headerlink" href="#initializing" title="Permalink to t
80
79
</div>
81
80
<divclass="section" id="creating-sessions">
82
81
<h3>Creating Sessions<aclass="headerlink" href="#creating-sessions" title="Permalink to this headline">¶</a></h3>
83
-
<p>The create an OpenTok Session, use the <ttclass="docutils literal"><spanclass="pre">opentok.create_session()</span></tt> method. There are two optional
82
+
<p>The create an OpenTok Session, use the <ttclass="docutils literal"><spanclass="pre">opentok.create_session()</span></tt> method. There are three optional
84
83
keyword parameters for this method: <ttclass="docutils literal"><spanclass="pre">location</span></tt> which can be set to a string containing an IP
85
-
address, and <ttclass="docutils literal"><spanclass="pre">media_mode</span></tt> which is a String (defined by the MediaModes class). This method returns
86
-
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
87
-
as a database).</p>
84
+
address, <ttclass="docutils literal"><spanclass="pre">media_mode</span></tt> which is a String (defined by the MediaModes class) and <ttclass="docutils literal"><spanclass="pre">archive_mode</span></tt> which
85
+
specifies whether the session will be automatically archived (<ttclass="docutils literal"><spanclass="pre">always</span></tt>) or not (<ttclass="docutils literal"><spanclass="pre">manual</span></tt>).
86
+
This method returns 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
87
+
store (such as a database).</p>
88
88
<divclass="code python highlight-python"><divclass="highlight"><pre><spanclass="c"># Create a session that attempts to send streams directly between clients (falling back</span>
89
89
<spanclass="c"># to use the OpenTok TURN server to relay streams if the clients cannot connect):</span>
<p>By default, all streams are recorded to a single (composed) file. You can record the different
143
+
streams in the session to individual files (instead of a single composed file) by setting the
144
+
<ttclass="docutils literal"><spanclass="pre">output_mode</span></tt> parameter of the <ttclass="docutils literal"><spanclass="pre">opentok.start_archive()</span></tt> method <cite>OutputModes.individual</cite>.</p>
<p>Note that you can also create an automatically archived session, by passing in
191
+
<ttclass="docutils literal"><spanclass="pre">ArchiveModes.always</span></tt> as the <ttclass="docutils literal"><spanclass="pre">archive_mode</span></tt> parameter when you call the
192
+
<ttclass="docutils literal"><spanclass="pre">opentok.create_session()</span></tt> method (see “Creating Sessions,” above).</p>
0 commit comments