Skip to content

Commit 4218d6d

Browse files
committed
Adding docs for the MediaMode enum and setting.
1 parent 68a917b commit 4218d6d

34 files changed

+534
-138
lines changed

README.md

Lines changed: 13 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -64,22 +64,28 @@ OpenTok opentok = new OpenTok(apiKey, apiSecret)
6464
## Creating Sessions
6565

6666
To create an OpenTok Session, use the `OpenTok` instance's `createSession(SessionProperties properties)`
67-
method. The `properties` parameter is optional and it is used to specify whether you are creating a
68-
p2p Session and specifying a location hint. An instance can be initialized using the
69-
`com.opentok.SessionProperties.Builder` class. The `sessionId` property of the returned `com.opentok.Session`
70-
instance, which you can read using the `getSessionId()` method, is useful to get a sessionId that can
71-
be saved to a persistent store (e.g. database).
67+
method. The `properties` parameter is optional and it is used to specify two things:
68+
69+
* Whether the session uses the OpenTok Media Server
70+
* A location hint for the OpenTok server.
71+
72+
An instance can be initialized using the `com.opentok.SessionProperties.Builder` class.
73+
The `sessionId` property of the returned `com.opentok.Session` instance, which you can read using
74+
the `getSessionId()` method, is useful to get a sessionId that can be saved to a persistent store
75+
(e.g. database).
7276

7377
```java
7478
import com.opentok.Session;
7579
import com.opentok.SessionProperties;
7680

7781
// Just a plain Session
7882
Session session = opentok.createSession();
79-
// A p2p Session
83+
84+
// A session that attempts to use peer-to-peer streaming
8085
Session session = opentok.createSession(new SessionProperties.Builder()
81-
.p2p(true)
86+
.mediaMode(MediaMode.RELAYED)
8287
.build());
88+
8389
// A Session with a location hint
8490
Session session = opentok.createSession(new SessionProperties.Builder()
8591
.location("12.34.56.78")

docs/allclasses-frame.html

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@
22
<!-- NewPage -->
33
<html lang="en">
44
<head>
5-
<!-- Generated by javadoc (version 1.7.0_55) on Sat May 17 02:11:37 EDT 2014 -->
5+
<!-- Generated by javadoc (version 1.7.0_40) on Mon May 19 16:30:33 PDT 2014 -->
66
<title>All Classes (OpenTok 2.2 Java SDK)</title>
7-
<meta name="date" content="2014-05-17">
7+
<meta name="date" content="2014-05-19">
88
<link rel="stylesheet" type="text/css" href="stylesheet.css" title="Style">
99
</head>
1010
<body>
@@ -14,6 +14,7 @@ <h1 class="bar">All Classes</h1>
1414
<li><a href="com/opentok/Archive.html" title="class in com.opentok" target="classFrame">Archive</a></li>
1515
<li><a href="com/opentok/Archive.Status.html" title="enum in com.opentok" target="classFrame">Archive.Status</a></li>
1616
<li><a href="com/opentok/exception/InvalidArgumentException.html" title="class in com.opentok.exception" target="classFrame">InvalidArgumentException</a></li>
17+
<li><a href="com/opentok/MediaMode.html" title="enum in com.opentok" target="classFrame">MediaMode</a></li>
1718
<li><a href="com/opentok/OpenTok.html" title="class in com.opentok" target="classFrame">OpenTok</a></li>
1819
<li><a href="com/opentok/exception/OpenTokException.html" title="class in com.opentok.exception" target="classFrame">OpenTokException</a></li>
1920
<li><a href="com/opentok/exception/RequestException.html" title="class in com.opentok.exception" target="classFrame">RequestException</a></li>

docs/allclasses-noframe.html

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@
22
<!-- NewPage -->
33
<html lang="en">
44
<head>
5-
<!-- Generated by javadoc (version 1.7.0_55) on Sat May 17 02:11:37 EDT 2014 -->
5+
<!-- Generated by javadoc (version 1.7.0_40) on Mon May 19 16:30:33 PDT 2014 -->
66
<title>All Classes (OpenTok 2.2 Java SDK)</title>
7-
<meta name="date" content="2014-05-17">
7+
<meta name="date" content="2014-05-19">
88
<link rel="stylesheet" type="text/css" href="stylesheet.css" title="Style">
99
</head>
1010
<body>
@@ -14,6 +14,7 @@ <h1 class="bar">All Classes</h1>
1414
<li><a href="com/opentok/Archive.html" title="class in com.opentok">Archive</a></li>
1515
<li><a href="com/opentok/Archive.Status.html" title="enum in com.opentok">Archive.Status</a></li>
1616
<li><a href="com/opentok/exception/InvalidArgumentException.html" title="class in com.opentok.exception">InvalidArgumentException</a></li>
17+
<li><a href="com/opentok/MediaMode.html" title="enum in com.opentok">MediaMode</a></li>
1718
<li><a href="com/opentok/OpenTok.html" title="class in com.opentok">OpenTok</a></li>
1819
<li><a href="com/opentok/exception/OpenTokException.html" title="class in com.opentok.exception">OpenTokException</a></li>
1920
<li><a href="com/opentok/exception/RequestException.html" title="class in com.opentok.exception">RequestException</a></li>

docs/com/opentok/Archive.Status.html

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@
22
<!-- NewPage -->
33
<html lang="en">
44
<head>
5-
<!-- Generated by javadoc (version 1.7.0_55) on Sat May 17 02:11:37 EDT 2014 -->
5+
<!-- Generated by javadoc (version 1.7.0_40) on Mon May 19 16:30:33 PDT 2014 -->
66
<title>Archive.Status (OpenTok 2.2 Java SDK)</title>
7-
<meta name="date" content="2014-05-17">
7+
<meta name="date" content="2014-05-19">
88
<link rel="stylesheet" type="text/css" href="../../stylesheet.css" title="Style">
99
</head>
1010
<body>
@@ -36,7 +36,7 @@
3636
<div class="subNav">
3737
<ul class="navList">
3838
<li><a href="../../com/opentok/Archive.html" title="class in com.opentok"><span class="strong">Prev Class</span></a></li>
39-
<li><a href="../../com/opentok/OpenTok.html" title="class in com.opentok"><span class="strong">Next Class</span></a></li>
39+
<li><a href="../../com/opentok/MediaMode.html" title="enum in com.opentok"><span class="strong">Next Class</span></a></li>
4040
</ul>
4141
<ul class="navList">
4242
<li><a href="../../index.html?com/opentok/Archive.Status.html" target="_top">Frames</a></li>
@@ -366,7 +366,7 @@ <h4>toString</h4>
366366
<div class="subNav">
367367
<ul class="navList">
368368
<li><a href="../../com/opentok/Archive.html" title="class in com.opentok"><span class="strong">Prev Class</span></a></li>
369-
<li><a href="../../com/opentok/OpenTok.html" title="class in com.opentok"><span class="strong">Next Class</span></a></li>
369+
<li><a href="../../com/opentok/MediaMode.html" title="enum in com.opentok"><span class="strong">Next Class</span></a></li>
370370
</ul>
371371
<ul class="navList">
372372
<li><a href="../../index.html?com/opentok/Archive.Status.html" target="_top">Frames</a></li>

docs/com/opentok/Archive.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@
22
<!-- NewPage -->
33
<html lang="en">
44
<head>
5-
<!-- Generated by javadoc (version 1.7.0_55) on Sat May 17 02:11:37 EDT 2014 -->
5+
<!-- Generated by javadoc (version 1.7.0_40) on Mon May 19 16:30:33 PDT 2014 -->
66
<title>Archive (OpenTok 2.2 Java SDK)</title>
7-
<meta name="date" content="2014-05-17">
7+
<meta name="date" content="2014-05-19">
88
<link rel="stylesheet" type="text/css" href="../../stylesheet.css" title="Style">
99
</head>
1010
<body>

0 commit comments

Comments
 (0)