Skip to content

Commit f6c20a1

Browse files
committed
Generated reference docs.
1 parent 0f9db37 commit f6c20a1

File tree

5 files changed

+39
-11
lines changed

5 files changed

+39
-11
lines changed

docs/README.html

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -125,6 +125,14 @@ <h3>Working with Archives<a class="headerlink" href="#working-with-archives" tit
125125
a Session that has clients connection.</p>
126126
<div class="code python highlight-python"><div class="highlight"><pre><span class="n">archive</span> <span class="o">=</span> <span class="n">opentok</span><span class="o">.</span><span class="n">start_archive</span><span class="p">(</span><span class="n">session_id</span><span class="p">,</span> <span class="n">name</span><span class="o">=</span><span class="s">u&#39;Important Presentation&#39;</span><span class="p">)</span>
127127

128+
<span class="c"># Store this archive_id in the database</span>
129+
<span class="n">archive_id</span> <span class="o">=</span> <span class="n">archive</span><span class="o">.</span><span class="n">id</span>
130+
</pre></div>
131+
</div>
132+
<p>You can also disable audio or video recording by setting the <cite>hasAudio</cite> or <cite>hasVideo</cite> property of
133+
the <cite>options</cite> parameter to <cite>false</cite>:</p>
134+
<div class="code python highlight-python"><div class="highlight"><pre><span class="n">archive</span> <span class="o">=</span> <span class="n">opentok</span><span class="o">.</span><span class="n">start_archive</span><span class="p">(</span><span class="n">session_id</span><span class="p">,</span> <span class="n">name</span><span class="o">=</span><span class="s">u&#39;Important Presentation&#39;</span><span class="p">,</span> <span class="n">hasVideo</span><span class="o">=</span><span class="bp">False</span><span class="p">)</span>
135+
128136
<span class="c"># Store this archive_id in the database</span>
129137
<span class="n">archive_id</span> <span class="o">=</span> <span class="n">archive</span><span class="o">.</span><span class="n">id</span>
130138
</pre></div>

docs/_sources/README.txt

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -101,6 +101,16 @@ a Session that has clients connection.
101101
# Store this archive_id in the database
102102
archive_id = archive.id
103103

104+
You can also disable audio or video recording by setting the `hasAudio` or `hasVideo` property of
105+
the `options` parameter to `false`:
106+
107+
.. code:: python
108+
109+
archive = opentok.start_archive(session_id, name=u'Important Presentation', hasVideo=False)
110+
111+
# Store this archive_id in the database
112+
archive_id = archive.id
113+
104114
You can stop the recording of a started Archive using the ``opentok.stop_archive(archive_id)``
105115
method. You can also do this using the ``archive.stop()`` method of an ``Archive`` instance.
106116

docs/docs/opentok.html

Lines changed: 20 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,10 @@ <h2>Submodules<a class="headerlink" href="#submodules" title="Permalink to this
6363
<tr class="field-odd field"><th class="field-name">Variables:</th><td class="field-body"><ul class="first last simple">
6464
<li><strong>created_at</strong> &#8211; The time at which the archive was created, in milliseconds since the UNIX epoch.</li>
6565
<li><strong>duration</strong> &#8211; The duration of the archive, in milliseconds.</li>
66+
<li><strong>hasAudio</strong> &#8211; Boolean value set to true when the archive contains an audio track,
67+
and set to false otherwise.</li>
68+
<li><strong>hasVideo</strong> &#8211; Boolean value set to true when the archive contains a video track,
69+
and set to false otherwise.</li>
6670
<li><strong>id</strong> &#8211; The archive ID.</li>
6771
<li><strong>name</strong> &#8211; The name of the archive. If no name was provided when the archive was created, this is set
6872
to null.</li>
@@ -192,20 +196,20 @@ <h2>Submodules<a class="headerlink" href="#submodules" title="Permalink to this
192196
<span id="opentok-opentok-module"></span><h2>opentok.opentok module<a class="headerlink" href="#module-opentok.opentok" title="Permalink to this headline"></a></h2>
193197
<dl class="class">
194198
<dt id="opentok.opentok.MediaModes">
195-
<em class="property">class </em><tt class="descclassname">opentok.opentok.</tt><tt class="descname">MediaModes</tt><big>(</big><em>*keys</em>, <em>**kwargs</em><big>)</big><a class="headerlink" href="#opentok.opentok.MediaModes" title="Permalink to this definition"></a></dt>
199+
<em class="property">class </em><tt class="descclassname">opentok.opentok.</tt><tt class="descname">MediaModes</tt><a class="headerlink" href="#opentok.opentok.MediaModes" title="Permalink to this definition"></a></dt>
196200
<dd><p>Bases: <tt class="xref py py-class docutils literal"><span class="pre">enum.Enum</span></tt></p>
197201
<p>List of valid settings for the mediaMode parameter of the OpenTok.createSession() method.</p>
198202
<dl class="attribute">
199203
<dt id="opentok.opentok.MediaModes.relayed">
200-
<tt class="descname">relayed</tt><em class="property"> = u'enabled'</em><a class="headerlink" href="#opentok.opentok.MediaModes.relayed" title="Permalink to this definition"></a></dt>
204+
<tt class="descname">relayed</tt><em class="property"> = None</em><a class="headerlink" href="#opentok.opentok.MediaModes.relayed" title="Permalink to this definition"></a></dt>
201205
<dd><p>The session will attempt to transmit streams directly between clients. If two clients
202206
cannot send and receive each others&#8217; streams, due to firewalls on the clients&#8217; networks,
203207
their streams will be relayed using the OpenTok TURN Server.</p>
204208
</dd></dl>
205209

206210
<dl class="attribute">
207211
<dt id="opentok.opentok.MediaModes.routed">
208-
<tt class="descname">routed</tt><em class="property"> = u'disabled'</em><a class="headerlink" href="#opentok.opentok.MediaModes.routed" title="Permalink to this definition"></a></dt>
212+
<tt class="descname">routed</tt><em class="property"> = None</em><a class="headerlink" href="#opentok.opentok.MediaModes.routed" title="Permalink to this definition"></a></dt>
209213
<dd><p>The session will transmit streams using the OpenTok Media Server.</p>
210214
</dd></dl>
211215

@@ -237,7 +241,7 @@ <h2>Submodules<a class="headerlink" href="#submodules" title="Permalink to this
237241

238242
<dl class="method">
239243
<dt id="opentok.opentok.OpenTok.create_session">
240-
<tt class="descname">create_session</tt><big>(</big><em>location=None</em>, <em>media_mode=u'enabled'</em><big>)</big><a class="headerlink" href="#opentok.opentok.OpenTok.create_session" title="Permalink to this definition"></a></dt>
244+
<tt class="descname">create_session</tt><big>(</big><em>location=None</em>, <em>media_mode=&lt;MediaModes.relayed: u'enabled'&gt;</em><big>)</big><a class="headerlink" href="#opentok.opentok.OpenTok.create_session" title="Permalink to this definition"></a></dt>
241245
<dd><p>Creates a new OpenTok session and returns the session ID, which uniquely identifies
242246
the session.</p>
243247
<p>For example, when using the OpenTok JavaScript library, use the session ID when calling the
@@ -315,7 +319,7 @@ <h2>Submodules<a class="headerlink" href="#submodules" title="Permalink to this
315319

316320
<dl class="method">
317321
<dt id="opentok.opentok.OpenTok.generate_token">
318-
<tt class="descname">generate_token</tt><big>(</big><em>session_id</em>, <em>role=u'publisher'</em>, <em>expire_time=None</em>, <em>data=None</em><big>)</big><a class="headerlink" href="#opentok.opentok.OpenTok.generate_token" title="Permalink to this definition"></a></dt>
322+
<tt class="descname">generate_token</tt><big>(</big><em>session_id</em>, <em>role=&lt;Roles.publisher: u'publisher'&gt;</em>, <em>expire_time=None</em>, <em>data=None</em><big>)</big><a class="headerlink" href="#opentok.opentok.OpenTok.generate_token" title="Permalink to this definition"></a></dt>
319323
<dd><p>Generates a token for a given session.</p>
320324
<table class="docutils field-list" frame="void" rules="none">
321325
<col class="field-name" />
@@ -408,7 +412,7 @@ <h2>Submodules<a class="headerlink" href="#submodules" title="Permalink to this
408412

409413
<dl class="method">
410414
<dt id="opentok.opentok.OpenTok.start_archive">
411-
<tt class="descname">start_archive</tt><big>(</big><em>session_id</em>, <em>**kwargs</em><big>)</big><a class="headerlink" href="#opentok.opentok.OpenTok.start_archive" title="Permalink to this definition"></a></dt>
415+
<tt class="descname">start_archive</tt><big>(</big><em>session_id</em>, <em>hasAudio=True</em>, <em>hasVideo=True</em>, <em>name=None</em><big>)</big><a class="headerlink" href="#opentok.opentok.OpenTok.start_archive" title="Permalink to this definition"></a></dt>
412416
<dd><p>Starts archiving an OpenTok 2.0 session.</p>
413417
<p>Clients must be actively connected to the OpenTok session for you to successfully start
414418
recording an archive.</p>
@@ -424,6 +428,12 @@ <h2>Submodules<a class="headerlink" href="#submodules" title="Permalink to this
424428
<li><strong>name</strong> (<em>String</em>) &#8211; This is the name of the archive. You can use this name
425429
to identify the archive. It is a property of the Archive object, and it is a property
426430
of archive-related events in the OpenTok.js library.</li>
431+
<li><strong>hasAudio</strong> (<em>Boolean</em>) &#8211; if set to True, an audio track will be inserted to the archive.
432+
hasAudio is an optional parameter that is set to True by default. If you set both
433+
hasAudio and hasVideo to False, the call to the start_archive() method results in
434+
an error.</li>
435+
<li><strong>hasVideo</strong> (<em>Boolean</em>) &#8211; if set to True, a video track will be inserted to the archive.
436+
hasVideo is an optional parameter that is set to True by default.</li>
427437
</ul>
428438
</td>
429439
</tr>
@@ -456,26 +466,26 @@ <h2>Submodules<a class="headerlink" href="#submodules" title="Permalink to this
456466

457467
<dl class="class">
458468
<dt id="opentok.opentok.Roles">
459-
<em class="property">class </em><tt class="descclassname">opentok.opentok.</tt><tt class="descname">Roles</tt><big>(</big><em>*keys</em>, <em>**kwargs</em><big>)</big><a class="headerlink" href="#opentok.opentok.Roles" title="Permalink to this definition"></a></dt>
469+
<em class="property">class </em><tt class="descclassname">opentok.opentok.</tt><tt class="descname">Roles</tt><a class="headerlink" href="#opentok.opentok.Roles" title="Permalink to this definition"></a></dt>
460470
<dd><p>Bases: <tt class="xref py py-class docutils literal"><span class="pre">enum.Enum</span></tt></p>
461471
<p>List of valid roles for a token.</p>
462472
<dl class="attribute">
463473
<dt id="opentok.opentok.Roles.moderator">
464-
<tt class="descname">moderator</tt><em class="property"> = u'moderator'</em><a class="headerlink" href="#opentok.opentok.Roles.moderator" title="Permalink to this definition"></a></dt>
474+
<tt class="descname">moderator</tt><em class="property"> = None</em><a class="headerlink" href="#opentok.opentok.Roles.moderator" title="Permalink to this definition"></a></dt>
465475
<dd><p>In addition to the privileges granted to a publisher, in clients using the OpenTok.js 2.2
466476
library, a moderator can call the <cite>forceUnpublish()</cite> and <cite>forceDisconnect()</cite> method of the
467477
Session object.</p>
468478
</dd></dl>
469479

470480
<dl class="attribute">
471481
<dt id="opentok.opentok.Roles.publisher">
472-
<tt class="descname">publisher</tt><em class="property"> = u'publisher'</em><a class="headerlink" href="#opentok.opentok.Roles.publisher" title="Permalink to this definition"></a></dt>
482+
<tt class="descname">publisher</tt><em class="property"> = None</em><a class="headerlink" href="#opentok.opentok.Roles.publisher" title="Permalink to this definition"></a></dt>
473483
<dd><p>A publisher can publish streams, subscribe to streams, and signal</p>
474484
</dd></dl>
475485

476486
<dl class="attribute">
477487
<dt id="opentok.opentok.Roles.subscriber">
478-
<tt class="descname">subscriber</tt><em class="property"> = u'subscriber'</em><a class="headerlink" href="#opentok.opentok.Roles.subscriber" title="Permalink to this definition"></a></dt>
488+
<tt class="descname">subscriber</tt><em class="property"> = None</em><a class="headerlink" href="#opentok.opentok.Roles.subscriber" title="Permalink to this definition"></a></dt>
479489
<dd><p>A subscriber can only subscribe to streams.</p>
480490
</dd></dl>
481491

docs/objects.inv

0 Bytes
Binary file not shown.

0 commit comments

Comments
 (0)