Skip to content

Commit 20dab4b

Browse files
committed
Merge pull request #72 from jeffswartz/archiving-updates-docs-2
Archiving docs updates
2 parents 0efe4eb + eabaf12 commit 20dab4b

39 files changed

+1792
-178
lines changed

README.md

Lines changed: 34 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,6 @@ The OpenTok Java SDK lets you generate
88
applications that run on the JVM. The SDK also includes support for working with
99
[OpenTok archives](http://tokbox.com/opentok/tutorials/archiving).
1010

11-
If you are updating from a previous version of this SDK, see
12-
[Important changes since v2.2.0](#important-changes-since-v220).
13-
1411

1512
# Installation
1613

@@ -151,19 +148,41 @@ Archive archive = opentok.startArchive(sessionId, null);
151148
String archiveId = archive.getId();
152149
```
153150

154-
You can also disable audio or video recording by setting the `hasAudio` or `hasVideo` parameters of
155-
the `startArchive(String sessionId, String name, boolean hasVideo, boolean hasAudio` method to `false`:
151+
You can also disable audio or video recording by calling the `hasAudio(false)` or `hasVideo(false)`
152+
methods of an `AchiveProperties` object you pass into the `OpenTok.startArchive(String sessionId,
153+
ArchiveProperties properties)` method:
156154

157155
```java
158156
import com.opentok.Archive;
157+
import com.opentok.ArchiveProperties;
159158

160159
// Start an audio-only archive
161-
Archive archive = opentok.startArchive(sessionId, null, false, true);
160+
Archive archive = opentok.startArchive(sessionId, new ArchiveProperties.Builder()
161+
.hasVideo(false)
162+
.build()););
163+
164+
// Store this archiveId in the database for later use
165+
String archiveId = archive.getId();
166+
```
167+
168+
Setting the output mode to `Archive.OutputMode.INDIVIDUAL` setting causes each stream in the archive
169+
to be recorded to its own individual file:
170+
171+
```java
172+
import com.opentok.Archive;
173+
import com.opentok.ArchiveProperties;
174+
175+
Archive archive = opentok.startArchive(sessionId, new ArchiveProperties.Builder()
176+
.archiveMode(Archive.OutputMode.INDIVIDUAL)
177+
.build()););
162178

163179
// Store this archiveId in the database for later use
164180
String archiveId = archive.getId();
165181
```
166182

183+
The `Archive.OutputMode.COMPOSED` setting (the default) causes all streams in the archive to be
184+
recorded to a single (composed) file.
185+
167186
You can stop the recording of a started Archive using a `com.opentok.Archive` instance's
168187
`stopArchive(String archiveId)` method.
169188

@@ -203,6 +222,15 @@ List<Archive> archives = opentok.listArchives(0, 50);
203222
List<Archive> archives = opentok.listArchives(50, 50);
204223
```
205224

225+
Note that you can also create an automatically archived session, by passing `ArchiveMode.ALWAYS`
226+
into the `archiveMode()` method of the SessionPropertiesBuilder object you use to build the
227+
`sessionProperties` parameter passed into the `OpenTok->createSession()` method (see "Creating
228+
Sessions," above).
229+
230+
For more information on archiving, see the
231+
[OpenTok archiving](https://tokbox.com/opentok/tutorials/archiving/) programming guide.
232+
233+
206234
# Samples
207235

208236
There are two sample applications included with the SDK. To get going as fast as possible, clone the whole

docs/allclasses-frame.html

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,18 +2,22 @@
22
<!-- NewPage -->
33
<html lang="en">
44
<head>
5-
<!-- Generated by javadoc (version 1.7.0_40) on Wed Feb 25 17:35:04 PST 2015 -->
5+
<!-- Generated by javadoc (version 1.7.0_71) on Fri May 22 13:27:06 PDT 2015 -->
66
<title>All Classes (OpenTok Java SDK Reference)</title>
7-
<meta name="date" content="2015-02-25">
7+
<meta name="date" content="2015-05-22">
88
<link rel="stylesheet" type="text/css" href="stylesheet.css" title="Style">
99
</head>
1010
<body>
1111
<h1 class="bar">All Classes</h1>
1212
<div class="indexContainer">
1313
<ul>
1414
<li><a href="com/opentok/Archive.html" title="class in com.opentok" target="classFrame">Archive</a></li>
15+
<li><a href="com/opentok/Archive.OutputMode.html" title="enum in com.opentok" target="classFrame">Archive.OutputMode</a></li>
1516
<li><a href="com/opentok/Archive.Status.html" title="enum in com.opentok" target="classFrame">Archive.Status</a></li>
1617
<li><a href="com/opentok/ArchiveList.html" title="class in com.opentok" target="classFrame">ArchiveList</a></li>
18+
<li><a href="com/opentok/ArchiveMode.html" title="enum in com.opentok" target="classFrame">ArchiveMode</a></li>
19+
<li><a href="com/opentok/ArchiveProperties.html" title="class in com.opentok" target="classFrame">ArchiveProperties</a></li>
20+
<li><a href="com/opentok/ArchiveProperties.Builder.html" title="class in com.opentok" target="classFrame">ArchiveProperties.Builder</a></li>
1721
<li><a href="com/opentok/exception/InvalidArgumentException.html" title="class in com.opentok.exception" target="classFrame">InvalidArgumentException</a></li>
1822
<li><a href="com/opentok/MediaMode.html" title="enum in com.opentok" target="classFrame">MediaMode</a></li>
1923
<li><a href="com/opentok/OpenTok.html" title="class in com.opentok" target="classFrame">OpenTok</a></li>

docs/allclasses-noframe.html

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,18 +2,22 @@
22
<!-- NewPage -->
33
<html lang="en">
44
<head>
5-
<!-- Generated by javadoc (version 1.7.0_40) on Wed Feb 25 17:35:04 PST 2015 -->
5+
<!-- Generated by javadoc (version 1.7.0_71) on Fri May 22 13:27:06 PDT 2015 -->
66
<title>All Classes (OpenTok Java SDK Reference)</title>
7-
<meta name="date" content="2015-02-25">
7+
<meta name="date" content="2015-05-22">
88
<link rel="stylesheet" type="text/css" href="stylesheet.css" title="Style">
99
</head>
1010
<body>
1111
<h1 class="bar">All Classes</h1>
1212
<div class="indexContainer">
1313
<ul>
1414
<li><a href="com/opentok/Archive.html" title="class in com.opentok">Archive</a></li>
15+
<li><a href="com/opentok/Archive.OutputMode.html" title="enum in com.opentok">Archive.OutputMode</a></li>
1516
<li><a href="com/opentok/Archive.Status.html" title="enum in com.opentok">Archive.Status</a></li>
1617
<li><a href="com/opentok/ArchiveList.html" title="class in com.opentok">ArchiveList</a></li>
18+
<li><a href="com/opentok/ArchiveMode.html" title="enum in com.opentok">ArchiveMode</a></li>
19+
<li><a href="com/opentok/ArchiveProperties.html" title="class in com.opentok">ArchiveProperties</a></li>
20+
<li><a href="com/opentok/ArchiveProperties.Builder.html" title="class in com.opentok">ArchiveProperties.Builder</a></li>
1721
<li><a href="com/opentok/exception/InvalidArgumentException.html" title="class in com.opentok.exception">InvalidArgumentException</a></li>
1822
<li><a href="com/opentok/MediaMode.html" title="enum in com.opentok">MediaMode</a></li>
1923
<li><a href="com/opentok/OpenTok.html" title="class in com.opentok">OpenTok</a></li>

0 commit comments

Comments
 (0)