File tree Expand file tree Collapse file tree 1 file changed +8
-0
lines changed Expand file tree Collapse file tree 1 file changed +8
-0
lines changed Original file line number Diff line number Diff line change @@ -72,6 +72,7 @@ method. The `properties` parameter is optional and it is used to specify two thi
72
72
73
73
* Whether the session uses the OpenTok Media Router
74
74
* A location hint for the OpenTok server.
75
+ * Whether the session is automatically archived.
75
76
76
77
An instance can be initialized using the ` com.opentok.SessionProperties.Builder ` class.
77
78
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
80
81
81
82
``` java
82
83
import com.opentok.MediaMode ;
84
+ import com.opentok.ArchiveMode ;
83
85
import com.opentok.Session ;
84
86
import com.opentok.SessionProperties ;
85
87
@@ -96,6 +98,12 @@ Session session = opentok.createSession(new SessionProperties.Builder()
96
98
.location(" 12.34.56.78" )
97
99
.build());
98
100
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
+
99
107
// Store this sessionId in the database for later use:
100
108
String sessionId = session. getSessionId();
101
109
```
You can’t perform that action at this time.
0 commit comments