@dolbyio/dolbyio-rest-apis-client 3.4.3 → 3.4.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/authentication.js +49 -33
- package/dist/communications/authentication.js +49 -33
- package/dist/communications/conference.js +306 -181
- package/dist/communications/index.js +11 -29
- package/dist/communications/internal/httpHelpers.js +56 -34
- package/dist/communications/internal/urls.js +8 -4
- package/dist/communications/monitor/conferences.js +322 -194
- package/dist/communications/monitor/index.js +9 -27
- package/dist/communications/monitor/recordings.js +274 -144
- package/dist/communications/monitor/webhooks.js +119 -83
- package/dist/communications/recording.js +74 -43
- package/dist/communications/remix.js +107 -0
- package/dist/communications/streaming.js +145 -77
- package/dist/communications/types/conference.js +4 -2
- package/dist/communications/types/conferences.js +4 -2
- package/dist/communications/types/core.js +4 -2
- package/dist/communications/types/participant.js +1 -3
- package/dist/communications/types/permission.js +18 -27
- package/dist/communications/types/recordings.js +4 -2
- package/dist/communications/types/remixStatus.js +1 -0
- package/dist/communications/types/rtcpMode.js +9 -9
- package/dist/communications/types/spatialAudio.js +4 -2
- package/dist/communications/types/videoCodec.js +8 -5
- package/dist/communications/types/webhooks.js +4 -2
- package/dist/index.d.ts +2 -1
- package/dist/index.js +12 -28
- package/dist/internal/httpHelpers.js +167 -134
- package/dist/internal/urls.js +6 -3
- package/dist/media/analyze.js +55 -21
- package/dist/media/analyzeSpeech.js +55 -21
- package/dist/media/diagnose.js +55 -21
- package/dist/media/enhance.js +55 -21
- package/dist/media/index.js +15 -33
- package/dist/media/internal/httpHelpers.js +27 -42
- package/dist/media/internal/jobsHelpers.js +82 -44
- package/dist/media/internal/urls.js +6 -3
- package/dist/media/io.js +131 -54
- package/dist/media/jobs.js +150 -88
- package/dist/media/mastering.js +101 -29
- package/dist/media/transcode.js +55 -21
- package/dist/media/types/analyze.js +4 -2
- package/dist/media/types/analyzeSpeech.js +4 -2
- package/dist/media/types/diagnose.js +4 -2
- package/dist/media/types/enhance.js +4 -2
- package/dist/media/types/jobResults.js +4 -2
- package/dist/media/types/jobs.js +4 -2
- package/dist/media/types/mastering.js +4 -2
- package/dist/media/types/transcode.js +4 -2
- package/dist/media/types/webhooks.js +4 -2
- package/dist/media/webhooks.js +176 -96
- package/dist/types/jwtToken.js +1 -3
- package/package.json +8 -3
- package/dist/authentication.js.map +0 -1
- package/dist/communications/authentication.js.map +0 -1
- package/dist/communications/conference.js.map +0 -1
- package/dist/communications/index.js.map +0 -1
- package/dist/communications/internal/httpHelpers.js.map +0 -1
- package/dist/communications/internal/urls.js.map +0 -1
- package/dist/communications/monitor/conferences.js.map +0 -1
- package/dist/communications/monitor/index.js.map +0 -1
- package/dist/communications/monitor/recordings.js.map +0 -1
- package/dist/communications/monitor/webhooks.js.map +0 -1
- package/dist/communications/recording.js.map +0 -1
- package/dist/communications/streaming.js.map +0 -1
- package/dist/communications/types/conference.js.map +0 -1
- package/dist/communications/types/conferences.js.map +0 -1
- package/dist/communications/types/core.js.map +0 -1
- package/dist/communications/types/participant.js.map +0 -1
- package/dist/communications/types/permission.js.map +0 -1
- package/dist/communications/types/recordings.js.map +0 -1
- package/dist/communications/types/rtcpMode.js.map +0 -1
- package/dist/communications/types/spatialAudio.js.map +0 -1
- package/dist/communications/types/videoCodec.js.map +0 -1
- package/dist/communications/types/webhooks.js.map +0 -1
- package/dist/index.js.map +0 -1
- package/dist/internal/httpHelpers.js.map +0 -1
- package/dist/internal/urls.js.map +0 -1
- package/dist/internal/version.d.ts +0 -5
- package/dist/internal/version.js +0 -31
- package/dist/internal/version.js.map +0 -1
- package/dist/media/analyze.js.map +0 -1
- package/dist/media/analyzeSpeech.js.map +0 -1
- package/dist/media/diagnose.js.map +0 -1
- package/dist/media/enhance.js.map +0 -1
- package/dist/media/index.js.map +0 -1
- package/dist/media/internal/httpHelpers.js.map +0 -1
- package/dist/media/internal/jobsHelpers.js.map +0 -1
- package/dist/media/internal/urls.js.map +0 -1
- package/dist/media/io.js.map +0 -1
- package/dist/media/jobs.js.map +0 -1
- package/dist/media/mastering.js.map +0 -1
- package/dist/media/transcode.js.map +0 -1
- package/dist/media/types/analyze.js.map +0 -1
- package/dist/media/types/analyzeSpeech.js.map +0 -1
- package/dist/media/types/diagnose.js.map +0 -1
- package/dist/media/types/enhance.js.map +0 -1
- package/dist/media/types/jobResults.js.map +0 -1
- package/dist/media/types/jobs.js.map +0 -1
- package/dist/media/types/mastering.js.map +0 -1
- package/dist/media/types/transcode.js.map +0 -1
- package/dist/media/types/webhooks.js.map +0 -1
- package/dist/media/webhooks.js.map +0 -1
- package/dist/types/jwtToken.js.map +0 -1
|
@@ -1,18 +1,16 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
const urls_1 = require("./internal/urls");
|
|
15
|
-
const rtcpMode_1 = require("./types/rtcpMode");
|
|
2
|
+
|
|
3
|
+
function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
|
|
4
|
+
Object.defineProperty(exports, "__esModule", {
|
|
5
|
+
value: true
|
|
6
|
+
});
|
|
7
|
+
exports.updatePermissions = exports.terminate = exports.setSpatialListenersAudio = exports.sendMessage = exports.kick = exports.invite = exports.createConference = void 0;
|
|
8
|
+
var _httpHelpers = require("../internal/httpHelpers");
|
|
9
|
+
var _urls = require("./internal/urls");
|
|
10
|
+
var _rtcpMode = require("./types/rtcpMode");
|
|
11
|
+
function _regeneratorRuntime() { "use strict"; /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */ _regeneratorRuntime = function _regeneratorRuntime() { return exports; }; var exports = {}, Op = Object.prototype, hasOwn = Op.hasOwnProperty, defineProperty = Object.defineProperty || function (obj, key, desc) { obj[key] = desc.value; }, $Symbol = "function" == typeof Symbol ? Symbol : {}, iteratorSymbol = $Symbol.iterator || "@@iterator", asyncIteratorSymbol = $Symbol.asyncIterator || "@@asyncIterator", toStringTagSymbol = $Symbol.toStringTag || "@@toStringTag"; function define(obj, key, value) { return Object.defineProperty(obj, key, { value: value, enumerable: !0, configurable: !0, writable: !0 }), obj[key]; } try { define({}, ""); } catch (err) { define = function define(obj, key, value) { return obj[key] = value; }; } function wrap(innerFn, outerFn, self, tryLocsList) { var protoGenerator = outerFn && outerFn.prototype instanceof Generator ? outerFn : Generator, generator = Object.create(protoGenerator.prototype), context = new Context(tryLocsList || []); return defineProperty(generator, "_invoke", { value: makeInvokeMethod(innerFn, self, context) }), generator; } function tryCatch(fn, obj, arg) { try { return { type: "normal", arg: fn.call(obj, arg) }; } catch (err) { return { type: "throw", arg: err }; } } exports.wrap = wrap; var ContinueSentinel = {}; function Generator() {} function GeneratorFunction() {} function GeneratorFunctionPrototype() {} var IteratorPrototype = {}; define(IteratorPrototype, iteratorSymbol, function () { return this; }); var getProto = Object.getPrototypeOf, NativeIteratorPrototype = getProto && getProto(getProto(values([]))); NativeIteratorPrototype && NativeIteratorPrototype !== Op && hasOwn.call(NativeIteratorPrototype, iteratorSymbol) && (IteratorPrototype = NativeIteratorPrototype); var Gp = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(IteratorPrototype); function defineIteratorMethods(prototype) { ["next", "throw", "return"].forEach(function (method) { define(prototype, method, function (arg) { return this._invoke(method, arg); }); }); } function AsyncIterator(generator, PromiseImpl) { function invoke(method, arg, resolve, reject) { var record = tryCatch(generator[method], generator, arg); if ("throw" !== record.type) { var result = record.arg, value = result.value; return value && "object" == _typeof(value) && hasOwn.call(value, "__await") ? PromiseImpl.resolve(value.__await).then(function (value) { invoke("next", value, resolve, reject); }, function (err) { invoke("throw", err, resolve, reject); }) : PromiseImpl.resolve(value).then(function (unwrapped) { result.value = unwrapped, resolve(result); }, function (error) { return invoke("throw", error, resolve, reject); }); } reject(record.arg); } var previousPromise; defineProperty(this, "_invoke", { value: function value(method, arg) { function callInvokeWithMethodAndArg() { return new PromiseImpl(function (resolve, reject) { invoke(method, arg, resolve, reject); }); } return previousPromise = previousPromise ? previousPromise.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg(); } }); } function makeInvokeMethod(innerFn, self, context) { var state = "suspendedStart"; return function (method, arg) { if ("executing" === state) throw new Error("Generator is already running"); if ("completed" === state) { if ("throw" === method) throw arg; return doneResult(); } for (context.method = method, context.arg = arg;;) { var delegate = context.delegate; if (delegate) { var delegateResult = maybeInvokeDelegate(delegate, context); if (delegateResult) { if (delegateResult === ContinueSentinel) continue; return delegateResult; } } if ("next" === context.method) context.sent = context._sent = context.arg;else if ("throw" === context.method) { if ("suspendedStart" === state) throw state = "completed", context.arg; context.dispatchException(context.arg); } else "return" === context.method && context.abrupt("return", context.arg); state = "executing"; var record = tryCatch(innerFn, self, context); if ("normal" === record.type) { if (state = context.done ? "completed" : "suspendedYield", record.arg === ContinueSentinel) continue; return { value: record.arg, done: context.done }; } "throw" === record.type && (state = "completed", context.method = "throw", context.arg = record.arg); } }; } function maybeInvokeDelegate(delegate, context) { var method = delegate.iterator[context.method]; if (undefined === method) { if (context.delegate = null, "throw" === context.method) { if (delegate.iterator["return"] && (context.method = "return", context.arg = undefined, maybeInvokeDelegate(delegate, context), "throw" === context.method)) return ContinueSentinel; context.method = "throw", context.arg = new TypeError("The iterator does not provide a 'throw' method"); } return ContinueSentinel; } var record = tryCatch(method, delegate.iterator, context.arg); if ("throw" === record.type) return context.method = "throw", context.arg = record.arg, context.delegate = null, ContinueSentinel; var info = record.arg; return info ? info.done ? (context[delegate.resultName] = info.value, context.next = delegate.nextLoc, "return" !== context.method && (context.method = "next", context.arg = undefined), context.delegate = null, ContinueSentinel) : info : (context.method = "throw", context.arg = new TypeError("iterator result is not an object"), context.delegate = null, ContinueSentinel); } function pushTryEntry(locs) { var entry = { tryLoc: locs[0] }; 1 in locs && (entry.catchLoc = locs[1]), 2 in locs && (entry.finallyLoc = locs[2], entry.afterLoc = locs[3]), this.tryEntries.push(entry); } function resetTryEntry(entry) { var record = entry.completion || {}; record.type = "normal", delete record.arg, entry.completion = record; } function Context(tryLocsList) { this.tryEntries = [{ tryLoc: "root" }], tryLocsList.forEach(pushTryEntry, this), this.reset(!0); } function values(iterable) { if (iterable) { var iteratorMethod = iterable[iteratorSymbol]; if (iteratorMethod) return iteratorMethod.call(iterable); if ("function" == typeof iterable.next) return iterable; if (!isNaN(iterable.length)) { var i = -1, next = function next() { for (; ++i < iterable.length;) { if (hasOwn.call(iterable, i)) return next.value = iterable[i], next.done = !1, next; } return next.value = undefined, next.done = !0, next; }; return next.next = next; } } return { next: doneResult }; } function doneResult() { return { value: undefined, done: !0 }; } return GeneratorFunction.prototype = GeneratorFunctionPrototype, defineProperty(Gp, "constructor", { value: GeneratorFunctionPrototype, configurable: !0 }), defineProperty(GeneratorFunctionPrototype, "constructor", { value: GeneratorFunction, configurable: !0 }), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, toStringTagSymbol, "GeneratorFunction"), exports.isGeneratorFunction = function (genFun) { var ctor = "function" == typeof genFun && genFun.constructor; return !!ctor && (ctor === GeneratorFunction || "GeneratorFunction" === (ctor.displayName || ctor.name)); }, exports.mark = function (genFun) { return Object.setPrototypeOf ? Object.setPrototypeOf(genFun, GeneratorFunctionPrototype) : (genFun.__proto__ = GeneratorFunctionPrototype, define(genFun, toStringTagSymbol, "GeneratorFunction")), genFun.prototype = Object.create(Gp), genFun; }, exports.awrap = function (arg) { return { __await: arg }; }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, asyncIteratorSymbol, function () { return this; }), exports.AsyncIterator = AsyncIterator, exports.async = function (innerFn, outerFn, self, tryLocsList, PromiseImpl) { void 0 === PromiseImpl && (PromiseImpl = Promise); var iter = new AsyncIterator(wrap(innerFn, outerFn, self, tryLocsList), PromiseImpl); return exports.isGeneratorFunction(outerFn) ? iter : iter.next().then(function (result) { return result.done ? result.value : iter.next(); }); }, defineIteratorMethods(Gp), define(Gp, toStringTagSymbol, "Generator"), define(Gp, iteratorSymbol, function () { return this; }), define(Gp, "toString", function () { return "[object Generator]"; }), exports.keys = function (val) { var object = Object(val), keys = []; for (var key in object) { keys.push(key); } return keys.reverse(), function next() { for (; keys.length;) { var key = keys.pop(); if (key in object) return next.value = key, next.done = !1, next; } return next.done = !0, next; }; }, exports.values = values, Context.prototype = { constructor: Context, reset: function reset(skipTempReset) { if (this.prev = 0, this.next = 0, this.sent = this._sent = undefined, this.done = !1, this.delegate = null, this.method = "next", this.arg = undefined, this.tryEntries.forEach(resetTryEntry), !skipTempReset) for (var name in this) { "t" === name.charAt(0) && hasOwn.call(this, name) && !isNaN(+name.slice(1)) && (this[name] = undefined); } }, stop: function stop() { this.done = !0; var rootRecord = this.tryEntries[0].completion; if ("throw" === rootRecord.type) throw rootRecord.arg; return this.rval; }, dispatchException: function dispatchException(exception) { if (this.done) throw exception; var context = this; function handle(loc, caught) { return record.type = "throw", record.arg = exception, context.next = loc, caught && (context.method = "next", context.arg = undefined), !!caught; } for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i], record = entry.completion; if ("root" === entry.tryLoc) return handle("end"); if (entry.tryLoc <= this.prev) { var hasCatch = hasOwn.call(entry, "catchLoc"), hasFinally = hasOwn.call(entry, "finallyLoc"); if (hasCatch && hasFinally) { if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0); if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc); } else if (hasCatch) { if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0); } else { if (!hasFinally) throw new Error("try statement without catch or finally"); if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc); } } } }, abrupt: function abrupt(type, arg) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.tryLoc <= this.prev && hasOwn.call(entry, "finallyLoc") && this.prev < entry.finallyLoc) { var finallyEntry = entry; break; } } finallyEntry && ("break" === type || "continue" === type) && finallyEntry.tryLoc <= arg && arg <= finallyEntry.finallyLoc && (finallyEntry = null); var record = finallyEntry ? finallyEntry.completion : {}; return record.type = type, record.arg = arg, finallyEntry ? (this.method = "next", this.next = finallyEntry.finallyLoc, ContinueSentinel) : this.complete(record); }, complete: function complete(record, afterLoc) { if ("throw" === record.type) throw record.arg; return "break" === record.type || "continue" === record.type ? this.next = record.arg : "return" === record.type ? (this.rval = this.arg = record.arg, this.method = "return", this.next = "end") : "normal" === record.type && afterLoc && (this.next = afterLoc), ContinueSentinel; }, finish: function finish(finallyLoc) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.finallyLoc === finallyLoc) return this.complete(entry.completion, entry.afterLoc), resetTryEntry(entry), ContinueSentinel; } }, "catch": function _catch(tryLoc) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.tryLoc === tryLoc) { var record = entry.completion; if ("throw" === record.type) { var thrown = record.arg; resetTryEntry(entry); } return thrown; } } throw new Error("illegal catch attempt"); }, delegateYield: function delegateYield(iterable, resultName, nextLoc) { return this.delegate = { iterator: values(iterable), resultName: resultName, nextLoc: nextLoc }, "next" === this.method && (this.arg = undefined), ContinueSentinel; } }, exports; }
|
|
12
|
+
function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { Promise.resolve(value).then(_next, _throw); } }
|
|
13
|
+
function _asyncToGenerator(fn) { return function () { var self = this, args = arguments; return new Promise(function (resolve, reject) { var gen = fn.apply(self, args); function _next(value) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value); } function _throw(err) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err); } _next(undefined); }); }; }
|
|
16
14
|
/**
|
|
17
15
|
* Creates a conference.
|
|
18
16
|
*
|
|
@@ -23,52 +21,68 @@ const rtcpMode_1 = require("./types/rtcpMode");
|
|
|
23
21
|
*
|
|
24
22
|
* @returns A `Conference` object through a `Promise`.
|
|
25
23
|
*/
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
24
|
+
var createConference = /*#__PURE__*/function () {
|
|
25
|
+
var _ref = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(accessToken, options) {
|
|
26
|
+
var parameters, body, obj_participants, index, participant, requestOptions, response;
|
|
27
|
+
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
28
|
+
while (1) {
|
|
29
|
+
switch (_context.prev = _context.next) {
|
|
30
|
+
case 0:
|
|
31
|
+
parameters = {
|
|
32
|
+
dolbyVoice: options.dolbyVoice ? options.dolbyVoice : true,
|
|
33
|
+
liveRecording: options.liveRecording ? options.liveRecording : false,
|
|
34
|
+
audioOnly: options.audioOnly ? options.audioOnly : false,
|
|
35
|
+
rtcpMode: options.rtcpMode ? options.rtcpMode : _rtcpMode.RTCPMode.Average
|
|
36
|
+
};
|
|
37
|
+
if (options.pinCode) parameters['pincode'] = options.pinCode;
|
|
38
|
+
if (options.ttl) parameters['ttl'] = options.ttl;
|
|
39
|
+
if (options.videoCodec) parameters['videoCodec'] = options.videoCodec;
|
|
40
|
+
if (options.recordingFormats) parameters['recording'] = {
|
|
41
|
+
format: options.recordingFormats
|
|
42
|
+
};
|
|
43
|
+
body = {
|
|
44
|
+
ownerExternalId: options.ownerExternalId,
|
|
45
|
+
parameters: parameters
|
|
46
|
+
};
|
|
47
|
+
if (options.alias) body['alias'] = options.alias;
|
|
48
|
+
if (options.participants) {
|
|
49
|
+
obj_participants = {};
|
|
50
|
+
for (index = 0; index < options.participants.length; index++) {
|
|
51
|
+
participant = options.participants[index];
|
|
52
|
+
obj_participants[participant.externalId] = {
|
|
53
|
+
permissions: participant.permissions,
|
|
54
|
+
notification: participant.notify
|
|
55
|
+
};
|
|
56
|
+
}
|
|
57
|
+
body['participants'] = obj_participants;
|
|
58
|
+
}
|
|
59
|
+
requestOptions = {
|
|
60
|
+
hostname: _urls.COMMS_HOSTNAME,
|
|
61
|
+
path: '/v2/conferences/create',
|
|
62
|
+
headers: {
|
|
63
|
+
Accept: 'application/json',
|
|
64
|
+
'Content-Type': 'application/json',
|
|
65
|
+
Authorization: "".concat(accessToken.token_type, " ").concat(accessToken.access_token)
|
|
66
|
+
},
|
|
67
|
+
body: JSON.stringify(body)
|
|
54
68
|
};
|
|
69
|
+
_context.next = 11;
|
|
70
|
+
return (0, _httpHelpers.sendPost)(requestOptions);
|
|
71
|
+
case 11:
|
|
72
|
+
response = _context.sent;
|
|
73
|
+
return _context.abrupt("return", response);
|
|
74
|
+
case 13:
|
|
75
|
+
case "end":
|
|
76
|
+
return _context.stop();
|
|
55
77
|
}
|
|
56
|
-
|
|
57
|
-
}
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
Authorization: `${accessToken.token_type} ${accessToken.access_token}`,
|
|
65
|
-
},
|
|
66
|
-
body: JSON.stringify(body),
|
|
67
|
-
};
|
|
68
|
-
const response = yield (0, httpHelpers_1.sendPost)(requestOptions);
|
|
69
|
-
return response;
|
|
70
|
-
});
|
|
71
|
-
exports.createConference = createConference;
|
|
78
|
+
}
|
|
79
|
+
}, _callee);
|
|
80
|
+
}));
|
|
81
|
+
return function createConference(_x, _x2) {
|
|
82
|
+
return _ref.apply(this, arguments);
|
|
83
|
+
};
|
|
84
|
+
}();
|
|
85
|
+
|
|
72
86
|
/**
|
|
73
87
|
* Invites participants to an ongoing conference. This API can also be used to generate new conference access tokens for an ongoing conference. If the invite request includes participants that are already in the conference, a new conference access token is not generated and an invitation is not sent.
|
|
74
88
|
*
|
|
@@ -80,32 +94,52 @@ exports.createConference = createConference;
|
|
|
80
94
|
*
|
|
81
95
|
* @returns The list of user tokens for each participants.
|
|
82
96
|
*/
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
97
|
+
exports.createConference = createConference;
|
|
98
|
+
var invite = /*#__PURE__*/function () {
|
|
99
|
+
var _ref2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2(accessToken, conferenceId, participants) {
|
|
100
|
+
var obj_participants, index, participant, body, options, response;
|
|
101
|
+
return _regeneratorRuntime().wrap(function _callee2$(_context2) {
|
|
102
|
+
while (1) {
|
|
103
|
+
switch (_context2.prev = _context2.next) {
|
|
104
|
+
case 0:
|
|
105
|
+
obj_participants = {};
|
|
106
|
+
for (index = 0; index < participants.length; index++) {
|
|
107
|
+
participant = participants[index];
|
|
108
|
+
obj_participants[participant.externalId] = {
|
|
109
|
+
permissions: participant.permissions,
|
|
110
|
+
notification: participant.notify
|
|
111
|
+
};
|
|
112
|
+
}
|
|
113
|
+
body = JSON.stringify({
|
|
114
|
+
participants: obj_participants
|
|
115
|
+
});
|
|
116
|
+
options = {
|
|
117
|
+
hostname: _urls.COMMS_HOSTNAME,
|
|
118
|
+
path: "/v2/conferences/".concat(conferenceId, "/invite"),
|
|
119
|
+
headers: {
|
|
120
|
+
Accept: 'application/json',
|
|
121
|
+
'Content-Type': 'application/json',
|
|
122
|
+
Authorization: "".concat(accessToken.token_type, " ").concat(accessToken.access_token)
|
|
123
|
+
},
|
|
124
|
+
body: body
|
|
125
|
+
};
|
|
126
|
+
_context2.next = 6;
|
|
127
|
+
return (0, _httpHelpers.sendPost)(options);
|
|
128
|
+
case 6:
|
|
129
|
+
response = _context2.sent;
|
|
130
|
+
return _context2.abrupt("return", response);
|
|
131
|
+
case 8:
|
|
132
|
+
case "end":
|
|
133
|
+
return _context2.stop();
|
|
134
|
+
}
|
|
135
|
+
}
|
|
136
|
+
}, _callee2);
|
|
137
|
+
}));
|
|
138
|
+
return function invite(_x3, _x4, _x5) {
|
|
139
|
+
return _ref2.apply(this, arguments);
|
|
140
|
+
};
|
|
141
|
+
}();
|
|
142
|
+
|
|
109
143
|
/**
|
|
110
144
|
* Kicks participants from an ongoing conference.
|
|
111
145
|
*
|
|
@@ -115,23 +149,41 @@ exports.invite = invite;
|
|
|
115
149
|
* @param conferenceId Identifier of the conference.
|
|
116
150
|
* @param externalIds External identifiers of the participants to kick our of the conference.
|
|
117
151
|
*/
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
152
|
+
exports.invite = invite;
|
|
153
|
+
var kick = /*#__PURE__*/function () {
|
|
154
|
+
var _ref3 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee3(accessToken, conferenceId, externalIds) {
|
|
155
|
+
var body, options;
|
|
156
|
+
return _regeneratorRuntime().wrap(function _callee3$(_context3) {
|
|
157
|
+
while (1) {
|
|
158
|
+
switch (_context3.prev = _context3.next) {
|
|
159
|
+
case 0:
|
|
160
|
+
body = JSON.stringify({
|
|
161
|
+
externalIds: externalIds
|
|
162
|
+
});
|
|
163
|
+
options = {
|
|
164
|
+
hostname: _urls.COMMS_HOSTNAME,
|
|
165
|
+
path: "/v2/conferences/".concat(conferenceId, "/kick"),
|
|
166
|
+
headers: {
|
|
167
|
+
Accept: 'application/json',
|
|
168
|
+
'Content-Type': 'application/json',
|
|
169
|
+
Authorization: "".concat(accessToken.token_type, " ").concat(accessToken.access_token)
|
|
170
|
+
},
|
|
171
|
+
body: body
|
|
172
|
+
};
|
|
173
|
+
_context3.next = 4;
|
|
174
|
+
return (0, _httpHelpers.sendPost)(options);
|
|
175
|
+
case 4:
|
|
176
|
+
case "end":
|
|
177
|
+
return _context3.stop();
|
|
178
|
+
}
|
|
179
|
+
}
|
|
180
|
+
}, _callee3);
|
|
181
|
+
}));
|
|
182
|
+
return function kick(_x6, _x7, _x8) {
|
|
183
|
+
return _ref3.apply(this, arguments);
|
|
184
|
+
};
|
|
185
|
+
}();
|
|
186
|
+
|
|
135
187
|
/**
|
|
136
188
|
* Sends a message to some or all participants in a conference.
|
|
137
189
|
*
|
|
@@ -143,27 +195,45 @@ exports.kick = kick;
|
|
|
143
195
|
* @param toExternalIds A list of external IDs that will receive the message. If empty, the message will be broadcasted to all participants in the conference.
|
|
144
196
|
* @param message The message to send.
|
|
145
197
|
*/
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
198
|
+
exports.kick = kick;
|
|
199
|
+
var sendMessage = /*#__PURE__*/function () {
|
|
200
|
+
var _ref4 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee4(accessToken, conferenceId, fromExternalId, toExternalIds, message) {
|
|
201
|
+
var body, options;
|
|
202
|
+
return _regeneratorRuntime().wrap(function _callee4$(_context4) {
|
|
203
|
+
while (1) {
|
|
204
|
+
switch (_context4.prev = _context4.next) {
|
|
205
|
+
case 0:
|
|
206
|
+
body = {
|
|
207
|
+
from: fromExternalId,
|
|
208
|
+
message: message
|
|
209
|
+
};
|
|
210
|
+
if (toExternalIds && toExternalIds.length > 0) {
|
|
211
|
+
body['to'] = toExternalIds;
|
|
212
|
+
}
|
|
213
|
+
options = {
|
|
214
|
+
hostname: _urls.COMMS_HOSTNAME,
|
|
215
|
+
path: "/v2/conferences/".concat(conferenceId, "/message"),
|
|
216
|
+
headers: {
|
|
217
|
+
Accept: 'application/json',
|
|
218
|
+
'Content-Type': 'application/json',
|
|
219
|
+
Authorization: "".concat(accessToken.token_type, " ").concat(accessToken.access_token)
|
|
220
|
+
},
|
|
221
|
+
body: JSON.stringify(body)
|
|
222
|
+
};
|
|
223
|
+
_context4.next = 5;
|
|
224
|
+
return (0, _httpHelpers.sendPost)(options);
|
|
225
|
+
case 5:
|
|
226
|
+
case "end":
|
|
227
|
+
return _context4.stop();
|
|
228
|
+
}
|
|
229
|
+
}
|
|
230
|
+
}, _callee4);
|
|
231
|
+
}));
|
|
232
|
+
return function sendMessage(_x9, _x10, _x11, _x12, _x13) {
|
|
233
|
+
return _ref4.apply(this, arguments);
|
|
234
|
+
};
|
|
235
|
+
}();
|
|
236
|
+
|
|
167
237
|
/**
|
|
168
238
|
* Sets the spatial audio scene for all listeners in an ongoing conference. This sets the spatial audio environment, the position and direction for all listeners with the spatialAudio flag enabled. The calls are not cumulative, and each call sets all the spatial listener values. Participants who do not have a position set are muted.
|
|
169
239
|
*
|
|
@@ -175,25 +245,43 @@ exports.sendMessage = sendMessage;
|
|
|
175
245
|
* @param listener The listener's audio position and direction, defined using Cartesian coordinates.
|
|
176
246
|
* @param users The users' audio positions, defined using Cartesian coordinates.
|
|
177
247
|
*/
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
248
|
+
exports.sendMessage = sendMessage;
|
|
249
|
+
var setSpatialListenersAudio = /*#__PURE__*/function () {
|
|
250
|
+
var _ref5 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee5(accessToken, conferenceId, environment, listener, users) {
|
|
251
|
+
var body, options;
|
|
252
|
+
return _regeneratorRuntime().wrap(function _callee5$(_context5) {
|
|
253
|
+
while (1) {
|
|
254
|
+
switch (_context5.prev = _context5.next) {
|
|
255
|
+
case 0:
|
|
256
|
+
body = JSON.stringify({
|
|
257
|
+
environment: environment,
|
|
258
|
+
listener: listener,
|
|
259
|
+
users: users
|
|
260
|
+
});
|
|
261
|
+
options = {
|
|
262
|
+
hostname: _urls.COMMS_HOSTNAME,
|
|
263
|
+
path: "/v2/conferences/".concat(conferenceId, "/spatial-listeners-audio"),
|
|
264
|
+
headers: {
|
|
265
|
+
Accept: 'application/json',
|
|
266
|
+
'Content-Type': 'application/json',
|
|
267
|
+
Authorization: "".concat(accessToken.token_type, " ").concat(accessToken.access_token)
|
|
268
|
+
},
|
|
269
|
+
body: body
|
|
270
|
+
};
|
|
271
|
+
_context5.next = 4;
|
|
272
|
+
return (0, _httpHelpers.sendPut)(options);
|
|
273
|
+
case 4:
|
|
274
|
+
case "end":
|
|
275
|
+
return _context5.stop();
|
|
276
|
+
}
|
|
277
|
+
}
|
|
278
|
+
}, _callee5);
|
|
279
|
+
}));
|
|
280
|
+
return function setSpatialListenersAudio(_x14, _x15, _x16, _x17, _x18) {
|
|
281
|
+
return _ref5.apply(this, arguments);
|
|
282
|
+
};
|
|
283
|
+
}();
|
|
284
|
+
|
|
197
285
|
/**
|
|
198
286
|
* Update permissions for participants in a conference. When a participant's permissions are updated, the new token is sent directly to the SDK. The SDK automatically receives, stores, and manages the new token and a `permissionsUpdated` event is sent.
|
|
199
287
|
*
|
|
@@ -205,32 +293,52 @@ exports.setSpatialListenersAudio = setSpatialListenersAudio;
|
|
|
205
293
|
*
|
|
206
294
|
* @returns The list of user tokens for each participants.
|
|
207
295
|
*/
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
296
|
+
exports.setSpatialListenersAudio = setSpatialListenersAudio;
|
|
297
|
+
var updatePermissions = /*#__PURE__*/function () {
|
|
298
|
+
var _ref6 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee6(accessToken, conferenceId, participants) {
|
|
299
|
+
var obj_participants, index, participant, body, options, response;
|
|
300
|
+
return _regeneratorRuntime().wrap(function _callee6$(_context6) {
|
|
301
|
+
while (1) {
|
|
302
|
+
switch (_context6.prev = _context6.next) {
|
|
303
|
+
case 0:
|
|
304
|
+
obj_participants = {};
|
|
305
|
+
for (index = 0; index < participants.length; index++) {
|
|
306
|
+
participant = participants[index];
|
|
307
|
+
obj_participants[participant.externalId] = {
|
|
308
|
+
permissions: participant.permissions,
|
|
309
|
+
notification: participant.notify
|
|
310
|
+
};
|
|
311
|
+
}
|
|
312
|
+
body = JSON.stringify({
|
|
313
|
+
participants: obj_participants
|
|
314
|
+
});
|
|
315
|
+
options = {
|
|
316
|
+
hostname: _urls.COMMS_HOSTNAME,
|
|
317
|
+
path: "/v2/conferences/".concat(conferenceId, "/permissions"),
|
|
318
|
+
headers: {
|
|
319
|
+
Accept: 'application/json',
|
|
320
|
+
'Content-Type': 'application/json',
|
|
321
|
+
Authorization: "".concat(accessToken.token_type, " ").concat(accessToken.access_token)
|
|
322
|
+
},
|
|
323
|
+
body: body
|
|
324
|
+
};
|
|
325
|
+
_context6.next = 6;
|
|
326
|
+
return (0, _httpHelpers.sendPost)(options);
|
|
327
|
+
case 6:
|
|
328
|
+
response = _context6.sent;
|
|
329
|
+
return _context6.abrupt("return", response);
|
|
330
|
+
case 8:
|
|
331
|
+
case "end":
|
|
332
|
+
return _context6.stop();
|
|
333
|
+
}
|
|
334
|
+
}
|
|
335
|
+
}, _callee6);
|
|
336
|
+
}));
|
|
337
|
+
return function updatePermissions(_x19, _x20, _x21) {
|
|
338
|
+
return _ref6.apply(this, arguments);
|
|
339
|
+
};
|
|
340
|
+
}();
|
|
341
|
+
|
|
234
342
|
/**
|
|
235
343
|
* Terminates an ongoing conference and removes all remaining participants from the conference.
|
|
236
344
|
*
|
|
@@ -239,17 +347,34 @@ exports.updatePermissions = updatePermissions;
|
|
|
239
347
|
* @param accessToken Access token to use for authentication.
|
|
240
348
|
* @param conferenceId Identifier of the conference.
|
|
241
349
|
*/
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
350
|
+
exports.updatePermissions = updatePermissions;
|
|
351
|
+
var terminate = /*#__PURE__*/function () {
|
|
352
|
+
var _ref7 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee7(accessToken, conferenceId) {
|
|
353
|
+
var options;
|
|
354
|
+
return _regeneratorRuntime().wrap(function _callee7$(_context7) {
|
|
355
|
+
while (1) {
|
|
356
|
+
switch (_context7.prev = _context7.next) {
|
|
357
|
+
case 0:
|
|
358
|
+
options = {
|
|
359
|
+
hostname: _urls.COMMS_HOSTNAME,
|
|
360
|
+
path: "/v2/conferences/".concat(conferenceId),
|
|
361
|
+
headers: {
|
|
362
|
+
Accept: 'application/json',
|
|
363
|
+
'Content-Type': 'application/json',
|
|
364
|
+
Authorization: "".concat(accessToken.token_type, " ").concat(accessToken.access_token)
|
|
365
|
+
}
|
|
366
|
+
};
|
|
367
|
+
_context7.next = 3;
|
|
368
|
+
return (0, _httpHelpers.sendDelete)(options);
|
|
369
|
+
case 3:
|
|
370
|
+
case "end":
|
|
371
|
+
return _context7.stop();
|
|
372
|
+
}
|
|
373
|
+
}
|
|
374
|
+
}, _callee7);
|
|
375
|
+
}));
|
|
376
|
+
return function terminate(_x22, _x23) {
|
|
377
|
+
return _ref7.apply(this, arguments);
|
|
378
|
+
};
|
|
379
|
+
}();
|
|
380
|
+
exports.terminate = terminate;
|
|
@@ -1,37 +1,19 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
-
}
|
|
8
|
-
Object.defineProperty(o, k2, desc);
|
|
9
|
-
}) : (function(o, m, k, k2) {
|
|
10
|
-
if (k2 === undefined) k2 = k;
|
|
11
|
-
o[k2] = m[k];
|
|
12
|
-
}));
|
|
13
|
-
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
-
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
-
}) : function(o, v) {
|
|
16
|
-
o["default"] = v;
|
|
2
|
+
|
|
3
|
+
function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
|
|
4
|
+
Object.defineProperty(exports, "__esModule", {
|
|
5
|
+
value: true
|
|
17
6
|
});
|
|
18
|
-
var __importStar = (this && this.__importStar) || function (mod) {
|
|
19
|
-
if (mod && mod.__esModule) return mod;
|
|
20
|
-
var result = {};
|
|
21
|
-
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
22
|
-
__setModuleDefault(result, mod);
|
|
23
|
-
return result;
|
|
24
|
-
};
|
|
25
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
26
7
|
exports.streaming = exports.recording = exports.monitor = exports.conference = exports.authentication = void 0;
|
|
27
|
-
|
|
8
|
+
var authentication = _interopRequireWildcard(require("./authentication"));
|
|
28
9
|
exports.authentication = authentication;
|
|
29
|
-
|
|
10
|
+
var conference = _interopRequireWildcard(require("./conference"));
|
|
30
11
|
exports.conference = conference;
|
|
31
|
-
|
|
12
|
+
var monitor = _interopRequireWildcard(require("./monitor"));
|
|
32
13
|
exports.monitor = monitor;
|
|
33
|
-
|
|
14
|
+
var recording = _interopRequireWildcard(require("./recording"));
|
|
34
15
|
exports.recording = recording;
|
|
35
|
-
|
|
16
|
+
var streaming = _interopRequireWildcard(require("./streaming"));
|
|
36
17
|
exports.streaming = streaming;
|
|
37
|
-
|
|
18
|
+
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
19
|
+
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|