Skip to content

Commit 2ce970e

Browse files
committed
adds archive mode to readme
1 parent f03370a commit 2ce970e

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

README.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,7 @@ method. The `properties` parameter is optional and it is used to specify two thi
7272

7373
* Whether the session uses the OpenTok Media Router
7474
* A location hint for the OpenTok server.
75+
* Whether the session is automatically archived.
7576

7677
An instance can be initialized using the `com.opentok.SessionProperties.Builder` class.
7778
The `sessionId` property of the returned `com.opentok.Session` instance, which you can read using
@@ -80,6 +81,7 @@ the `getSessionId()` method, is useful to get an identifier that can be saved to
8081

8182
```java
8283
import com.opentok.MediaMode;
84+
import com.opentok.ArchiveMode;
8385
import com.opentok.Session;
8486
import com.opentok.SessionProperties;
8587

@@ -96,6 +98,12 @@ Session session = opentok.createSession(new SessionProperties.Builder()
9698
.location("12.34.56.78")
9799
.build());
98100

101+
// A session that is automatically archived (it must used the routed media mode)
102+
Session session = opentok.createSession(new SessionProperties.Builder()
103+
.mediaMode(MediaMode.ROUTED)
104+
.archiveMode(ArchiveMode.ALWAYS)
105+
.build());
106+
99107
// Store this sessionId in the database for later use:
100108
String sessionId = session.getSessionId();
101109
```

0 commit comments

Comments
 (0)