-
Notifications
You must be signed in to change notification settings - Fork 168
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #207 from opentok/dev
v2.9.0
- Loading branch information
Showing
7 changed files
with
684 additions
and
459 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,6 +4,9 @@ node_js: | |
- 5 | ||
- 6 | ||
- 7 | ||
- 8 | ||
- 9 | ||
- 10 | ||
before_script: | ||
- npm install -g grunt-cli | ||
notifications: | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -288,8 +288,8 @@ OpenTok = function (apiKey, apiSecret, env) { | |
* </li> | ||
* | ||
* <li> | ||
* <code>sessionId</code> — Specify the id of a session in order to retrieve archives | ||
* specifically for that session. This property is optional. When no sessionId is specified, | ||
* <code>sessionId</code> — Specify the ID of a session in order to retrieve archives | ||
* specifically for that session. This property is optional. When no session ID is specified, | ||
* then the method will return archives from any session created with your API key. | ||
* </li> | ||
* | ||
|
@@ -418,7 +418,7 @@ OpenTok = function (apiKey, apiSecret, env) { | |
* <code>startBroadcast()</code> method and the | ||
* {@link OpenTok#getBroadcast OpenTok.getBroadcast()} method. OpenTok streams | ||
* the session to each RTMP URL you specify. Note that OpenTok live streaming | ||
* does not support RTMPS. | ||
* supports RTMP and RTMPS. | ||
* </p> | ||
* <p> | ||
* For HLS, include a single <code>hls</code> property of the <code>outputs</code> object. | ||
|
@@ -542,6 +542,81 @@ OpenTok = function (apiKey, apiSecret, env) { | |
}); | ||
}; | ||
|
||
/** | ||
* Retrieves a List of {@link Broadcast} objects, representing broadcasts that are both | ||
* completed and in-progress, for your API key. | ||
* | ||
* @param options {Object} An options parameter with three properties: | ||
* | ||
* <ul> | ||
* | ||
* <li> | ||
* <code>count</code> — The maximum number of broadcasts to return. The default number of | ||
* broadcasts returned is 50 (or fewer, if there are fewer than 50 broadcasts). | ||
* The method returns a maximum of 1000 broadcasts. | ||
* </li> | ||
* | ||
* <li> | ||
* <code>offset</code> — The offset for the first broadcast to list (starting with the | ||
* first broadcast recorded as offset 0). 1 is the offset of the broadcast that started prior | ||
* to the most recent broadcast. This property is optional; the default is 0. | ||
* </li> | ||
* | ||
* <li> | ||
* <code>sessionId</code> — Specify the ID of a session in order to retrieve broadcasts | ||
* specifically for that session. This property is optional. When no session ID is specified, | ||
* then the method will return broadcasts from any session created with your API key. | ||
* </li> | ||
* | ||
* </ul> | ||
* | ||
* <p>If you don't pass in an <code>options</code> argument, | ||
* the method returns up to 1000 broadcasts starting with the first broadcast recorded. | ||
* | ||
* @param callback {Function} The function to call upon completing the operation. Two arguments | ||
* are passed to the function: | ||
* | ||
* <ul> | ||
* | ||
* <li> | ||
* <code>error</code> — An error object (if the call to the method fails). | ||
* </li> | ||
* | ||
* <li> | ||
* <code>broadcasts</code> — An array of {@link Broadcast} objects. | ||
* </li> | ||
* | ||
* </ul> | ||
* | ||
* @method #listBroadcasts | ||
* @memberof OpenTok | ||
*/ | ||
this.listBroadcasts = function listBroadcasts(options, callback) { | ||
var query = []; | ||
var queryString = null; | ||
if (typeof options === 'function') { | ||
callback = options; | ||
options = {}; | ||
} | ||
if (typeof callback !== 'function') { | ||
throw (new errors.ArgumentError('No callback given to listBroadcasts')); | ||
} | ||
if (options.offset) { | ||
query.push('offset=' + parseInt(options.offset, 10)); | ||
} | ||
if (options.count) { | ||
query.push('count=' + parseInt(options.count, 10)); | ||
} | ||
if (options.sessionId) { | ||
query.push('sessionId=' + options.sessionId); | ||
} | ||
queryString = query.join('&'); | ||
return this.client.listBroadcasts(queryString, function cb(err, json, totalCount) { | ||
if (err) { return callback(err); } | ||
return callback(null, json, totalCount); | ||
}); | ||
}; | ||
|
||
/** | ||
* Sets (or updates) the layout of the broadcast. See | ||
* <a href="https://tokbox.com/developer/guides/broadcast/live-streaming/#configuring-video-layout-for-opentok-live-streaming-broadcasts"> | ||
|
@@ -819,7 +894,8 @@ OpenTok = function (apiKey, apiSecret, env) { | |
* | ||
* @param sipUri The sip URI the SIP Interconnect feature will dial. | ||
* | ||
* @param options {Object} An optional options object with the following properties (all of which are optional): | ||
* @param options {Object} An optional options object with the following properties | ||
* (all of which are optional): | ||
* <p> | ||
* <ul> | ||
* <li> | ||
|
@@ -840,10 +916,15 @@ OpenTok = function (apiKey, apiSecret, env) { | |
* encrypted or not. | ||
* </li> | ||
* <li> | ||
* <code>from</code> (String) — The number or string that will be sent to the final SIP number as the caller. It must be a string in the form of | ||
* <code>[email protected]</code>, where <code>from</code> can be a string or a number. | ||
* If <code>from</code> is set to a number (for example, <code>"[email protected]"</code>), it will show up as the incoming number on PSTN phones. | ||
* If <code>from</code> is undefined or set to a string (for example, <code>"[email protected]"</code>), <code>+00000000</code> will show up as the incoming number on PSTN phones. | ||
* <code>from</code> (String) — The number or string that will be sent | ||
* to the final SIP number as the caller. It must be a string in the form of | ||
* <code>[email protected]</code>, where <code>from</code> can be a string or a number. | ||
* If <code>from</code> is set to a number (for example, | ||
* <code>"[email protected]"</code>), | ||
* it will show up as the incoming number on PSTN phones. | ||
* If <code>from</code> is undefined or set to a string (for example, | ||
* <code>"[email protected]"</code>), | ||
* <code>+00000000</code> will show up as the incoming number on PSTN phones. | ||
* </li> | ||
* </ul> | ||
* | ||
|
Oops, something went wrong.