Comparing version 2.15.2 to 2.16.0
@@ -32,3 +32,4 @@ var requestRoot = require('request'); | ||
'/v2/project/<%apiKey%>/broadcast/<%broadcastId%>/layout', | ||
listBroadcasts: '/v2/project/<%apiKey%>/broadcast' | ||
listBroadcasts: '/v2/project/<%apiKey%>/broadcast', | ||
audioStreamer: '/v2/project/<%apiKey%>/connect' | ||
}, | ||
@@ -413,2 +414,26 @@ request: { | ||
Client.prototype.websocketConnect = function websocketConnect(opts, cb) { | ||
var url = | ||
this.c.apiUrl + | ||
this.c.endpoints.audioStreamer | ||
.replace(/<%apiKey%>/g, this.c.apiKey); | ||
request.post( | ||
{ | ||
url: url, | ||
headers: this.generateHeaders(), | ||
json: opts | ||
}, | ||
function requestCallback(err, resp, body) { | ||
if (err) { | ||
return cb(new Error('The request failed: ' + err)); | ||
} | ||
if (resp.statusCode === 200) { | ||
return cb(null, body); | ||
} | ||
return cb(new Error('(' + resp.statusCode + ') ' + body.message)); | ||
} | ||
); | ||
}; | ||
Client.prototype.setStreamClassLists = function setStreamClassLists( | ||
@@ -415,0 +440,0 @@ sessionId, |
{ | ||
"name": "opentok", | ||
"description": "OpenTok server-side SDK", | ||
"version": "2.15.2", | ||
"version": "2.16.0", | ||
"homepage": "https://github.com/opentok/opentok-node", | ||
@@ -6,0 +6,0 @@ "repository": { |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
541537
8835