mirror of https://github.com/OpenVidu/openvidu.git
openvidu-node-client lib folder update with buffer and axios dependencies
parent
9eae6974af
commit
615b4fb2e4
|
@ -10,6 +10,7 @@ export declare class OpenVidu {
|
||||||
private hostname;
|
private hostname;
|
||||||
private port;
|
private port;
|
||||||
private basicAuth;
|
private basicAuth;
|
||||||
|
private Buffer;
|
||||||
/**
|
/**
|
||||||
* @param urlOpenViduServer Public accessible IP where your instance of OpenVidu Server is up an running
|
* @param urlOpenViduServer Public accessible IP where your instance of OpenVidu Server is up an running
|
||||||
* @param secret Secret used on OpenVidu Server initialization
|
* @param secret Secret used on OpenVidu Server initialization
|
||||||
|
@ -59,6 +60,6 @@ export declare class OpenVidu {
|
||||||
* - `409`: the recording has `started` status. Stop it before deletion
|
* - `409`: the recording has `started` status. Stop it before deletion
|
||||||
*/
|
*/
|
||||||
deleteRecording(recordingId: string): Promise<Error>;
|
deleteRecording(recordingId: string): Promise<Error>;
|
||||||
private getBasicAuth(secret);
|
private getBasicAuth;
|
||||||
private setHostnameAndPort();
|
private setHostnameAndPort;
|
||||||
}
|
}
|
||||||
|
|
|
@ -18,10 +18,7 @@
|
||||||
Object.defineProperty(exports, "__esModule", { value: true });
|
Object.defineProperty(exports, "__esModule", { value: true });
|
||||||
var Session_1 = require("./Session");
|
var Session_1 = require("./Session");
|
||||||
var Recording_1 = require("./Recording");
|
var Recording_1 = require("./Recording");
|
||||||
/**
|
var axios_1 = require("axios");
|
||||||
* @hidden
|
|
||||||
*/
|
|
||||||
var https = require('https');
|
|
||||||
var OpenVidu = /** @class */ (function () {
|
var OpenVidu = /** @class */ (function () {
|
||||||
/**
|
/**
|
||||||
* @param urlOpenViduServer Public accessible IP where your instance of OpenVidu Server is up an running
|
* @param urlOpenViduServer Public accessible IP where your instance of OpenVidu Server is up an running
|
||||||
|
@ -29,6 +26,7 @@ var OpenVidu = /** @class */ (function () {
|
||||||
*/
|
*/
|
||||||
function OpenVidu(urlOpenViduServer, secret) {
|
function OpenVidu(urlOpenViduServer, secret) {
|
||||||
this.urlOpenViduServer = urlOpenViduServer;
|
this.urlOpenViduServer = urlOpenViduServer;
|
||||||
|
this.Buffer = require('buffer/').Buffer;
|
||||||
this.setHostnameAndPort();
|
this.setHostnameAndPort();
|
||||||
this.basicAuth = this.getBasicAuth(secret);
|
this.basicAuth = this.getBasicAuth(secret);
|
||||||
}
|
}
|
||||||
|
@ -65,11 +63,11 @@ var OpenVidu = /** @class */ (function () {
|
||||||
OpenVidu.prototype.startRecording = function (sessionId, param2) {
|
OpenVidu.prototype.startRecording = function (sessionId, param2) {
|
||||||
var _this = this;
|
var _this = this;
|
||||||
return new Promise(function (resolve, reject) {
|
return new Promise(function (resolve, reject) {
|
||||||
var requestBody;
|
var data;
|
||||||
if (!!param2) {
|
if (!!param2) {
|
||||||
if (!(typeof param2 === 'string')) {
|
if (!(typeof param2 === 'string')) {
|
||||||
var properties = param2;
|
var properties = param2;
|
||||||
requestBody = JSON.stringify({
|
data = JSON.stringify({
|
||||||
session: sessionId,
|
session: sessionId,
|
||||||
name: !!properties.name ? properties.name : '',
|
name: !!properties.name ? properties.name : '',
|
||||||
recordingLayout: !!properties.recordingLayout ? properties.recordingLayout : '',
|
recordingLayout: !!properties.recordingLayout ? properties.recordingLayout : '',
|
||||||
|
@ -77,7 +75,7 @@ var OpenVidu = /** @class */ (function () {
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
requestBody = JSON.stringify({
|
data = JSON.stringify({
|
||||||
session: sessionId,
|
session: sessionId,
|
||||||
name: param2,
|
name: param2,
|
||||||
recordingLayout: '',
|
recordingLayout: '',
|
||||||
|
@ -86,47 +84,45 @@ var OpenVidu = /** @class */ (function () {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
requestBody = JSON.stringify({
|
data = JSON.stringify({
|
||||||
session: sessionId,
|
session: sessionId,
|
||||||
name: '',
|
name: '',
|
||||||
recordingLayout: '',
|
recordingLayout: '',
|
||||||
customLayout: ''
|
customLayout: ''
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
var options = {
|
axios_1.default.post('https://' + _this.hostname + ':' + _this.port + OpenVidu.API_RECORDINGS + OpenVidu.API_RECORDINGS_START, data, {
|
||||||
hostname: _this.hostname,
|
|
||||||
port: _this.port,
|
|
||||||
path: OpenVidu.API_RECORDINGS + OpenVidu.API_RECORDINGS_START,
|
|
||||||
method: 'POST',
|
|
||||||
headers: {
|
headers: {
|
||||||
'Authorization': _this.basicAuth,
|
'Authorization': _this.basicAuth,
|
||||||
'Content-Type': 'application/json',
|
'Content-Type': 'application/json'
|
||||||
'Content-Length': Buffer.byteLength(requestBody)
|
|
||||||
}
|
}
|
||||||
};
|
})
|
||||||
var req = https.request(options, function (res) {
|
.then(function (res) {
|
||||||
var body = '';
|
if (res.status === 200) {
|
||||||
res.on('data', function (d) {
|
|
||||||
// Continuously update stream with data
|
|
||||||
body += d;
|
|
||||||
});
|
|
||||||
res.on('end', function () {
|
|
||||||
if (res.statusCode === 200) {
|
|
||||||
// SUCCESS response from openvidu-server (Recording in JSON format). Resolve new Recording
|
// SUCCESS response from openvidu-server (Recording in JSON format). Resolve new Recording
|
||||||
resolve(new Recording_1.Recording(JSON.parse(body)));
|
resolve(new Recording_1.Recording(res.data));
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
// ERROR response from openvidu-server. Resolve HTTP status
|
// ERROR response from openvidu-server. Resolve HTTP status
|
||||||
reject(new Error(res.statusCode));
|
reject(new Error(res.status.toString()));
|
||||||
|
}
|
||||||
|
}).catch(function (error) {
|
||||||
|
if (error.response) {
|
||||||
|
// The request was made and the server responded with a status code (not 2xx)
|
||||||
|
reject(new Error(error.response.status.toString()));
|
||||||
|
}
|
||||||
|
else if (error.request) {
|
||||||
|
// The request was made but no response was received
|
||||||
|
// `error.request` is an instance of XMLHttpRequest in the browser and an instance of
|
||||||
|
// http.ClientRequest in node.js
|
||||||
|
console.error(error.request);
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
// Something happened in setting up the request that triggered an Error
|
||||||
|
console.error('Error', error.message);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
req.on('error', function (e) {
|
|
||||||
reject(new Error(e));
|
|
||||||
});
|
|
||||||
req.write(requestBody);
|
|
||||||
req.end();
|
|
||||||
});
|
|
||||||
};
|
};
|
||||||
/**
|
/**
|
||||||
* Stops the recording of a [[Session]]
|
* Stops the recording of a [[Session]]
|
||||||
|
@ -140,39 +136,38 @@ var OpenVidu = /** @class */ (function () {
|
||||||
OpenVidu.prototype.stopRecording = function (recordingId) {
|
OpenVidu.prototype.stopRecording = function (recordingId) {
|
||||||
var _this = this;
|
var _this = this;
|
||||||
return new Promise(function (resolve, reject) {
|
return new Promise(function (resolve, reject) {
|
||||||
var options = {
|
axios_1.default.post('https://' + _this.hostname + ':' + _this.port + OpenVidu.API_RECORDINGS + OpenVidu.API_RECORDINGS_STOP + '/' + recordingId, undefined, {
|
||||||
hostname: _this.hostname,
|
|
||||||
port: _this.port,
|
|
||||||
path: OpenVidu.API_RECORDINGS + OpenVidu.API_RECORDINGS_STOP + '/' + recordingId,
|
|
||||||
method: 'POST',
|
|
||||||
headers: {
|
headers: {
|
||||||
'Authorization': _this.basicAuth,
|
'Authorization': _this.basicAuth,
|
||||||
'Content-Type': 'application/x-www-form-urlencoded'
|
'Content-Type': 'application/x-www-form-urlencoded'
|
||||||
}
|
}
|
||||||
};
|
})
|
||||||
var req = https.request(options, function (res) {
|
.then(function (res) {
|
||||||
var body = '';
|
if (res.status === 200) {
|
||||||
res.on('data', function (d) {
|
|
||||||
// Continuously update stream with data
|
|
||||||
body += d;
|
|
||||||
});
|
|
||||||
res.on('end', function () {
|
|
||||||
if (res.statusCode === 200) {
|
|
||||||
// SUCCESS response from openvidu-server (Recording in JSON format). Resolve new Recording
|
// SUCCESS response from openvidu-server (Recording in JSON format). Resolve new Recording
|
||||||
resolve(new Recording_1.Recording(JSON.parse(body)));
|
resolve(new Recording_1.Recording(res.data));
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
// ERROR response from openvidu-server. Resolve HTTP status
|
// ERROR response from openvidu-server. Resolve HTTP status
|
||||||
reject(new Error(res.statusCode));
|
reject(new Error(res.status.toString()));
|
||||||
|
}
|
||||||
|
}).catch(function (error) {
|
||||||
|
if (error.response) {
|
||||||
|
// The request was made and the server responded with a status code (not 2xx)
|
||||||
|
reject(new Error(error.response.status.toString()));
|
||||||
|
}
|
||||||
|
else if (error.request) {
|
||||||
|
// The request was made but no response was received
|
||||||
|
// `error.request` is an instance of XMLHttpRequest in the browser and an instance of
|
||||||
|
// http.ClientRequest in node.js
|
||||||
|
console.error(error.request);
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
// Something happened in setting up the request that triggered an Error
|
||||||
|
console.error('Error', error.message);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
req.on('error', function (e) {
|
|
||||||
reject(new Error(e));
|
|
||||||
});
|
|
||||||
// req.write();
|
|
||||||
req.end();
|
|
||||||
});
|
|
||||||
};
|
};
|
||||||
/**
|
/**
|
||||||
* Gets an existing [[Recording]]
|
* Gets an existing [[Recording]]
|
||||||
|
@ -185,39 +180,38 @@ var OpenVidu = /** @class */ (function () {
|
||||||
OpenVidu.prototype.getRecording = function (recordingId) {
|
OpenVidu.prototype.getRecording = function (recordingId) {
|
||||||
var _this = this;
|
var _this = this;
|
||||||
return new Promise(function (resolve, reject) {
|
return new Promise(function (resolve, reject) {
|
||||||
var options = {
|
axios_1.default.get('https://' + _this.hostname + ':' + _this.port + OpenVidu.API_RECORDINGS + '/' + recordingId, {
|
||||||
hostname: _this.hostname,
|
|
||||||
port: _this.port,
|
|
||||||
path: OpenVidu.API_RECORDINGS + '/' + recordingId,
|
|
||||||
method: 'GET',
|
|
||||||
headers: {
|
headers: {
|
||||||
'Authorization': _this.basicAuth,
|
'Authorization': _this.basicAuth,
|
||||||
'Content-Type': 'application/x-www-form-urlencoded'
|
'Content-Type': 'application/x-www-form-urlencoded'
|
||||||
}
|
}
|
||||||
};
|
})
|
||||||
var req = https.request(options, function (res) {
|
.then(function (res) {
|
||||||
var body = '';
|
if (res.status === 200) {
|
||||||
res.on('data', function (d) {
|
|
||||||
// Continuously update stream with data
|
|
||||||
body += d;
|
|
||||||
});
|
|
||||||
res.on('end', function () {
|
|
||||||
if (res.statusCode === 200) {
|
|
||||||
// SUCCESS response from openvidu-server (Recording in JSON format). Resolve new Recording
|
// SUCCESS response from openvidu-server (Recording in JSON format). Resolve new Recording
|
||||||
resolve(new Recording_1.Recording(JSON.parse(body)));
|
resolve(new Recording_1.Recording(res.data));
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
// ERROR response from openvidu-server. Resolve HTTP status
|
// ERROR response from openvidu-server. Resolve HTTP status
|
||||||
reject(new Error(res.statusCode));
|
reject(new Error(res.status.toString()));
|
||||||
|
}
|
||||||
|
}).catch(function (error) {
|
||||||
|
if (error.response) {
|
||||||
|
// The request was made and the server responded with a status code (not 2xx)
|
||||||
|
reject(new Error(error.response.status.toString()));
|
||||||
|
}
|
||||||
|
else if (error.request) {
|
||||||
|
// The request was made but no response was received
|
||||||
|
// `error.request` is an instance of XMLHttpRequest in the browser and an instance of
|
||||||
|
// http.ClientRequest in node.js
|
||||||
|
console.error(error.request);
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
// Something happened in setting up the request that triggered an Error
|
||||||
|
console.error('Error', error.message);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
req.on('error', function (e) {
|
|
||||||
reject(new Error(e));
|
|
||||||
});
|
|
||||||
// req.write();
|
|
||||||
req.end();
|
|
||||||
});
|
|
||||||
};
|
};
|
||||||
/**
|
/**
|
||||||
* Lists all existing recordings
|
* Lists all existing recordings
|
||||||
|
@ -227,27 +221,17 @@ var OpenVidu = /** @class */ (function () {
|
||||||
OpenVidu.prototype.listRecordings = function () {
|
OpenVidu.prototype.listRecordings = function () {
|
||||||
var _this = this;
|
var _this = this;
|
||||||
return new Promise(function (resolve, reject) {
|
return new Promise(function (resolve, reject) {
|
||||||
var options = {
|
axios_1.default.get('https://' + _this.hostname + ':' + _this.port + OpenVidu.API_RECORDINGS, {
|
||||||
hostname: _this.hostname,
|
|
||||||
port: _this.port,
|
|
||||||
path: OpenVidu.API_RECORDINGS,
|
|
||||||
method: 'GET',
|
|
||||||
headers: {
|
headers: {
|
||||||
'Authorization': _this.basicAuth,
|
'Authorization': _this.basicAuth,
|
||||||
'Content-Type': 'application/x-www-form-urlencoded'
|
'Content-Type': 'application/x-www-form-urlencoded'
|
||||||
}
|
}
|
||||||
};
|
})
|
||||||
var req = https.request(options, function (res) {
|
.then(function (res) {
|
||||||
var body = '';
|
if (res.status === 200) {
|
||||||
res.on('data', function (d) {
|
|
||||||
// Continuously update stream with data
|
|
||||||
body += d;
|
|
||||||
});
|
|
||||||
res.on('end', function () {
|
|
||||||
if (res.statusCode === 200) {
|
|
||||||
// SUCCESS response from openvidu-server (JSON arrays of recordings in JSON format). Resolve list of new recordings
|
// SUCCESS response from openvidu-server (JSON arrays of recordings in JSON format). Resolve list of new recordings
|
||||||
var recordingArray = [];
|
var recordingArray = [];
|
||||||
var responseItems = JSON.parse(body).items;
|
var responseItems = res.data.items;
|
||||||
for (var _i = 0, responseItems_1 = responseItems; _i < responseItems_1.length; _i++) {
|
for (var _i = 0, responseItems_1 = responseItems; _i < responseItems_1.length; _i++) {
|
||||||
var item = responseItems_1[_i];
|
var item = responseItems_1[_i];
|
||||||
recordingArray.push(new Recording_1.Recording(item));
|
recordingArray.push(new Recording_1.Recording(item));
|
||||||
|
@ -256,16 +240,25 @@ var OpenVidu = /** @class */ (function () {
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
// ERROR response from openvidu-server. Resolve HTTP status
|
// ERROR response from openvidu-server. Resolve HTTP status
|
||||||
reject(new Error(res.statusCode));
|
reject(new Error(res.status.toString()));
|
||||||
|
}
|
||||||
|
}).catch(function (error) {
|
||||||
|
if (error.response) {
|
||||||
|
// The request was made and the server responded with a status code (not 2xx)
|
||||||
|
reject(new Error(error.response.status.toString()));
|
||||||
|
}
|
||||||
|
else if (error.request) {
|
||||||
|
// The request was made but no response was received
|
||||||
|
// `error.request` is an instance of XMLHttpRequest in the browser and an instance of
|
||||||
|
// http.ClientRequest in node.js
|
||||||
|
console.error(error.request);
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
// Something happened in setting up the request that triggered an Error
|
||||||
|
console.error('Error', error.message);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
req.on('error', function (e) {
|
|
||||||
reject(new Error(e));
|
|
||||||
});
|
|
||||||
// req.write();
|
|
||||||
req.end();
|
|
||||||
});
|
|
||||||
};
|
};
|
||||||
/**
|
/**
|
||||||
* Deletes a [[Recording]]. The recording must have status `stopped` or `available`
|
* Deletes a [[Recording]]. The recording must have status `stopped` or `available`
|
||||||
|
@ -279,42 +272,41 @@ var OpenVidu = /** @class */ (function () {
|
||||||
OpenVidu.prototype.deleteRecording = function (recordingId) {
|
OpenVidu.prototype.deleteRecording = function (recordingId) {
|
||||||
var _this = this;
|
var _this = this;
|
||||||
return new Promise(function (resolve, reject) {
|
return new Promise(function (resolve, reject) {
|
||||||
var options = {
|
axios_1.default.delete('https://' + _this.hostname + ':' + _this.port + OpenVidu.API_RECORDINGS + '/' + recordingId, {
|
||||||
hostname: _this.hostname,
|
|
||||||
port: _this.port,
|
|
||||||
path: OpenVidu.API_RECORDINGS + '/' + recordingId,
|
|
||||||
method: 'DELETE',
|
|
||||||
headers: {
|
headers: {
|
||||||
'Authorization': _this.basicAuth,
|
'Authorization': _this.basicAuth,
|
||||||
'Content-Type': 'application/x-www-form-urlencoded'
|
'Content-Type': 'application/x-www-form-urlencoded'
|
||||||
}
|
}
|
||||||
};
|
})
|
||||||
var req = https.request(options, function (res) {
|
.then(function (res) {
|
||||||
var body = '';
|
if (res.status === 204) {
|
||||||
res.on('data', function (d) {
|
|
||||||
// Continuously update stream with data
|
|
||||||
body += d;
|
|
||||||
});
|
|
||||||
res.on('end', function () {
|
|
||||||
if (res.statusCode === 204) {
|
|
||||||
// SUCCESS response from openvidu-server. Resolve undefined
|
// SUCCESS response from openvidu-server. Resolve undefined
|
||||||
resolve(undefined);
|
resolve(undefined);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
// ERROR response from openvidu-server. Resolve HTTP status
|
// ERROR response from openvidu-server. Resolve HTTP status
|
||||||
reject(new Error(res.statusCode));
|
reject(new Error(res.status.toString()));
|
||||||
|
}
|
||||||
|
}).catch(function (error) {
|
||||||
|
if (error.response) {
|
||||||
|
// The request was made and the server responded with a status code (not 2xx)
|
||||||
|
reject(new Error(error.response.status.toString()));
|
||||||
|
}
|
||||||
|
else if (error.request) {
|
||||||
|
// The request was made but no response was received
|
||||||
|
// `error.request` is an instance of XMLHttpRequest in the browser and an instance of
|
||||||
|
// http.ClientRequest in node.js
|
||||||
|
console.error(error.request);
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
// Something happened in setting up the request that triggered an Error
|
||||||
|
console.error('Error', error.message);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
req.on('error', function (e) {
|
|
||||||
reject(new Error(e));
|
|
||||||
});
|
|
||||||
// req.write();
|
|
||||||
req.end();
|
|
||||||
});
|
|
||||||
};
|
};
|
||||||
OpenVidu.prototype.getBasicAuth = function (secret) {
|
OpenVidu.prototype.getBasicAuth = function (secret) {
|
||||||
return 'Basic ' + (new Buffer('OPENVIDUAPP:' + secret).toString('base64'));
|
return 'Basic ' + this.Buffer('OPENVIDUAPP:' + secret).toString('base64');
|
||||||
};
|
};
|
||||||
OpenVidu.prototype.setHostnameAndPort = function () {
|
OpenVidu.prototype.setHostnameAndPort = function () {
|
||||||
var urlSplitted = this.urlOpenViduServer.split(':');
|
var urlSplitted = this.urlOpenViduServer.split(':');
|
||||||
|
|
File diff suppressed because one or more lines are too long
|
@ -10,5 +10,5 @@ export declare enum OpenViduRole {
|
||||||
/**
|
/**
|
||||||
* _(not available yet)_ SUBSCRIBER + PUBLIHSER permissions + can force `unpublish()` and `disconnect()` over a third-party stream or user
|
* _(not available yet)_ SUBSCRIBER + PUBLIHSER permissions + can force `unpublish()` and `disconnect()` over a third-party stream or user
|
||||||
*/
|
*/
|
||||||
MODERATOR = "MODERATOR",
|
MODERATOR = "MODERATOR"
|
||||||
}
|
}
|
||||||
|
|
|
@ -8,6 +8,7 @@ export declare class Session {
|
||||||
private static readonly API_TOKENS;
|
private static readonly API_TOKENS;
|
||||||
sessionId: string;
|
sessionId: string;
|
||||||
properties: SessionProperties;
|
properties: SessionProperties;
|
||||||
|
private Buffer;
|
||||||
constructor(hostname: string, port: number, basicAuth: string, properties?: SessionProperties);
|
constructor(hostname: string, port: number, basicAuth: string, properties?: SessionProperties);
|
||||||
/**
|
/**
|
||||||
* Gets the unique identifier of the Session
|
* Gets the unique identifier of the Session
|
||||||
|
|
|
@ -20,15 +20,13 @@ var MediaMode_1 = require("./MediaMode");
|
||||||
var OpenViduRole_1 = require("./OpenViduRole");
|
var OpenViduRole_1 = require("./OpenViduRole");
|
||||||
var RecordingLayout_1 = require("./RecordingLayout");
|
var RecordingLayout_1 = require("./RecordingLayout");
|
||||||
var RecordingMode_1 = require("./RecordingMode");
|
var RecordingMode_1 = require("./RecordingMode");
|
||||||
/**
|
var axios_1 = require("axios");
|
||||||
* @hidden
|
|
||||||
*/
|
|
||||||
var https = require('https');
|
|
||||||
var Session = /** @class */ (function () {
|
var Session = /** @class */ (function () {
|
||||||
function Session(hostname, port, basicAuth, properties) {
|
function Session(hostname, port, basicAuth, properties) {
|
||||||
this.hostname = hostname;
|
this.hostname = hostname;
|
||||||
this.port = port;
|
this.port = port;
|
||||||
this.basicAuth = basicAuth;
|
this.basicAuth = basicAuth;
|
||||||
|
this.Buffer = require('buffer/').Buffer;
|
||||||
if (!properties) {
|
if (!properties) {
|
||||||
this.properties = {};
|
this.properties = {};
|
||||||
}
|
}
|
||||||
|
@ -50,46 +48,43 @@ var Session = /** @class */ (function () {
|
||||||
Session.prototype.generateToken = function (tokenOptions) {
|
Session.prototype.generateToken = function (tokenOptions) {
|
||||||
var _this = this;
|
var _this = this;
|
||||||
return new Promise(function (resolve, reject) {
|
return new Promise(function (resolve, reject) {
|
||||||
var requestBody = JSON.stringify({
|
var data = JSON.stringify({
|
||||||
session: _this.sessionId,
|
session: _this.sessionId,
|
||||||
role: (!!tokenOptions && !!tokenOptions.role) ? tokenOptions.role : OpenViduRole_1.OpenViduRole.PUBLISHER,
|
role: (!!tokenOptions && !!tokenOptions.role) ? tokenOptions.role : OpenViduRole_1.OpenViduRole.PUBLISHER,
|
||||||
data: (!!tokenOptions && !!tokenOptions.data) ? tokenOptions.data : ''
|
data: (!!tokenOptions && !!tokenOptions.data) ? tokenOptions.data : ''
|
||||||
});
|
});
|
||||||
var options = {
|
axios_1.default.post('https://' + _this.hostname + ':' + _this.port + Session.API_TOKENS, data, {
|
||||||
hostname: _this.hostname,
|
|
||||||
port: _this.port,
|
|
||||||
path: Session.API_TOKENS,
|
|
||||||
method: 'POST',
|
|
||||||
headers: {
|
headers: {
|
||||||
'Authorization': _this.basicAuth,
|
'Authorization': _this.basicAuth,
|
||||||
'Content-Type': 'application/json',
|
'Content-Type': 'application/json'
|
||||||
'Content-Length': Buffer.byteLength(requestBody)
|
|
||||||
}
|
}
|
||||||
};
|
})
|
||||||
var req = https.request(options, function (res) {
|
.then(function (res) {
|
||||||
var body = '';
|
if (res.status === 200) {
|
||||||
res.on('data', function (d) {
|
|
||||||
// Continuously update stream with data
|
|
||||||
body += d;
|
|
||||||
});
|
|
||||||
res.on('end', function () {
|
|
||||||
if (res.statusCode === 200) {
|
|
||||||
// SUCCESS response from openvidu-server. Resolve token
|
// SUCCESS response from openvidu-server. Resolve token
|
||||||
var parsed = JSON.parse(body);
|
resolve(res.data.id);
|
||||||
resolve(parsed.id);
|
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
// ERROR response from openvidu-server. Resolve HTTP status
|
// ERROR response from openvidu-server. Resolve HTTP status
|
||||||
reject(new Error(res.statusCode));
|
reject(new Error(res.status.toString()));
|
||||||
|
}
|
||||||
|
}).catch(function (error) {
|
||||||
|
if (error.response) {
|
||||||
|
// The request was made and the server responded with a status code (not 2xx)
|
||||||
|
reject(new Error(error.response.status.toString()));
|
||||||
|
}
|
||||||
|
else if (error.request) {
|
||||||
|
// The request was made but no response was received
|
||||||
|
// `error.request` is an instance of XMLHttpRequest in the browser and an instance of
|
||||||
|
// http.ClientRequest in node.js
|
||||||
|
console.error(error.request);
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
// Something happened in setting up the request that triggered an Error
|
||||||
|
console.error('Error', error.message);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
req.on('error', function (e) {
|
|
||||||
reject(e);
|
|
||||||
});
|
|
||||||
req.write(requestBody);
|
|
||||||
req.end();
|
|
||||||
});
|
|
||||||
};
|
};
|
||||||
/**
|
/**
|
||||||
* @hidden
|
* @hidden
|
||||||
|
@ -100,54 +95,53 @@ var Session = /** @class */ (function () {
|
||||||
if (!!_this.sessionId) {
|
if (!!_this.sessionId) {
|
||||||
resolve(_this.sessionId);
|
resolve(_this.sessionId);
|
||||||
}
|
}
|
||||||
var requestBody = JSON.stringify({
|
var data = JSON.stringify({
|
||||||
mediaMode: !!_this.properties.mediaMode ? _this.properties.mediaMode : MediaMode_1.MediaMode.ROUTED,
|
mediaMode: !!_this.properties.mediaMode ? _this.properties.mediaMode : MediaMode_1.MediaMode.ROUTED,
|
||||||
recordingMode: !!_this.properties.recordingMode ? _this.properties.recordingMode : RecordingMode_1.RecordingMode.MANUAL,
|
recordingMode: !!_this.properties.recordingMode ? _this.properties.recordingMode : RecordingMode_1.RecordingMode.MANUAL,
|
||||||
defaultRecordingLayout: !!_this.properties.defaultRecordingLayout ? _this.properties.defaultRecordingLayout : RecordingLayout_1.RecordingLayout.BEST_FIT,
|
defaultRecordingLayout: !!_this.properties.defaultRecordingLayout ? _this.properties.defaultRecordingLayout : RecordingLayout_1.RecordingLayout.BEST_FIT,
|
||||||
defaultCustomLayout: !!_this.properties.defaultCustomLayout ? _this.properties.defaultCustomLayout : '',
|
defaultCustomLayout: !!_this.properties.defaultCustomLayout ? _this.properties.defaultCustomLayout : '',
|
||||||
customSessionId: !!_this.properties.customSessionId ? _this.properties.customSessionId : ''
|
customSessionId: !!_this.properties.customSessionId ? _this.properties.customSessionId : ''
|
||||||
});
|
});
|
||||||
var options = {
|
axios_1.default.post('https://' + _this.hostname + ':' + _this.port + Session.API_SESSIONS, data, {
|
||||||
hostname: _this.hostname,
|
|
||||||
port: _this.port,
|
|
||||||
path: Session.API_SESSIONS,
|
|
||||||
method: 'POST',
|
|
||||||
headers: {
|
headers: {
|
||||||
'Authorization': _this.basicAuth,
|
'Authorization': _this.basicAuth,
|
||||||
'Content-Type': 'application/json',
|
'Content-Type': 'application/json'
|
||||||
'Content-Length': Buffer.byteLength(requestBody)
|
|
||||||
}
|
}
|
||||||
};
|
})
|
||||||
var req = https.request(options, function (res) {
|
.then(function (res) {
|
||||||
var body = '';
|
if (res.status === 200) {
|
||||||
res.on('data', function (d) {
|
// SUCCESS response from openvidu-server. Resolve token
|
||||||
// Continuously update stream with data
|
_this.sessionId = res.data.id;
|
||||||
body += d;
|
resolve(_this.sessionId);
|
||||||
});
|
|
||||||
res.on('end', function () {
|
|
||||||
if (res.statusCode === 200) {
|
|
||||||
// SUCCESS response from openvidu-server. Resolve sessionId
|
|
||||||
var parsed = JSON.parse(body);
|
|
||||||
_this.sessionId = parsed.id;
|
|
||||||
resolve(parsed.id);
|
|
||||||
}
|
}
|
||||||
else if (res.statusCode === 409) {
|
else {
|
||||||
|
// ERROR response from openvidu-server. Resolve HTTP status
|
||||||
|
reject(new Error(res.status.toString()));
|
||||||
|
}
|
||||||
|
}).catch(function (error) {
|
||||||
|
if (error.response) {
|
||||||
|
// The request was made and the server responded with a status code (not 2xx)
|
||||||
|
if (error.response.status === 409) {
|
||||||
// 'customSessionId' already existed
|
// 'customSessionId' already existed
|
||||||
_this.sessionId = _this.properties.customSessionId;
|
_this.sessionId = _this.properties.customSessionId;
|
||||||
resolve(_this.sessionId);
|
resolve(_this.sessionId);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
// ERROR response from openvidu-server. Resolve HTTP status
|
reject(new Error(error.response.status.toString()));
|
||||||
reject(new Error(res.statusCode));
|
}
|
||||||
|
}
|
||||||
|
else if (error.request) {
|
||||||
|
// The request was made but no response was received
|
||||||
|
// `error.request` is an instance of XMLHttpRequest in the browser and an instance of
|
||||||
|
// http.ClientRequest in node.js
|
||||||
|
console.error(error.request);
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
// Something happened in setting up the request that triggered an Error
|
||||||
|
console.error('Error', error.message);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
req.on('error', function (e) {
|
|
||||||
reject(e);
|
|
||||||
});
|
|
||||||
req.write(requestBody);
|
|
||||||
req.end();
|
|
||||||
});
|
|
||||||
};
|
};
|
||||||
Session.API_SESSIONS = '/api/sessions';
|
Session.API_SESSIONS = '/api/sessions';
|
||||||
Session.API_TOKENS = '/api/tokens';
|
Session.API_TOKENS = '/api/tokens';
|
||||||
|
|
|
@ -1 +1 @@
|
||||||
{"version":3,"file":"Session.js","sourceRoot":"","sources":["../src/Session.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;GAeG;;AAEH,yCAAwC;AACxC,+CAA8C;AAC9C,qDAAoD;AACpD,iDAAgD;AAIhD;;GAEG;AACH,IAAM,KAAK,GAAG,OAAO,CAAC,OAAO,CAAC,CAAC;AAE/B;IAQI,iBAAoB,QAAgB,EAAU,IAAY,EAAU,SAAiB,EAAE,UAA8B;QAAjG,aAAQ,GAAR,QAAQ,CAAQ;QAAU,SAAI,GAAJ,IAAI,CAAQ;QAAU,cAAS,GAAT,SAAS,CAAQ;QACjF,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