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
53
<p>Pip helps manage dependencies for Python projects using the PyPI index. Find more info here:
@@ -80,16 +76,19 @@ <h3>Initializing<a class="headerlink" href="#initializing" title="Permalink to t
80
76
</div>
81
77
<divclass="section" id="creating-sessions">
82
78
<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
79
+
<p>The create an OpenTok Session, use the <ttclass="docutils literal"><spanclass="pre">opentok.create_session()</span></tt> method. There are three optional
84
80
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>
81
+
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
82
+
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>).
83
+
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
84
+
store (such as a database).</p>
88
85
<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
86
<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
140
+
streams in the session to individual files (instead of a single composed file) by setting the
141
+
<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
188
+
<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
189
+
<ttclass="docutils literal"><spanclass="pre">opentok.create_session()</span></tt> method (see “Creating Sessions,” above).</p>
0 commit comments