fcr-core 3.8.1 → 3.9.0-alpha

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.
Files changed (199) hide show
  1. package/lib/chat-connector/type.d.ts +40 -0
  2. package/lib/{chat-connection → chat-connector}/type.js +1 -1
  3. package/lib/engine/index.d.ts +10 -11
  4. package/lib/engine/index.js +63 -72
  5. package/lib/engine/type.d.ts +96 -0
  6. package/lib/engine/type.js +5 -0
  7. package/lib/imports.d.ts +7 -4
  8. package/lib/imports.js +30 -4
  9. package/lib/index.d.ts +3 -2
  10. package/lib/index.js +21 -2
  11. package/lib/media-control/desktop.js +12 -12
  12. package/lib/media-control/mobile.js +4 -0
  13. package/lib/media-control/type.d.ts +32 -33
  14. package/lib/monitor-control/index.js +3 -3
  15. package/lib/peer-session/index.js +14 -14
  16. package/lib/peer-session/type.d.ts +1 -1
  17. package/lib/plugins/chat/chatroom.js +417 -0
  18. package/lib/{chat-connection → plugins/chat}/config.d.ts +1 -0
  19. package/lib/{room-control/chatroom-control → plugins/chat}/config.js +2 -1
  20. package/lib/plugins/chat/connector.d.ts +38 -0
  21. package/lib/{chat-connection/index.js → plugins/chat/connector.js} +181 -61
  22. package/lib/room-control/ability-control/index.js +5 -4
  23. package/lib/room-control/ability-control/type.d.ts +5 -1
  24. package/lib/room-control/ability-control/type.js +4 -0
  25. package/lib/room-control/chatroom-control/type.d.ts +44 -35
  26. package/lib/room-control/group-control/index.js +9 -9
  27. package/lib/room-control/index.js +37 -22
  28. package/lib/room-control/interpreter-control/index.js +7 -4
  29. package/lib/room-control/interpreter-control/room.js +3 -3
  30. package/lib/room-control/interpreter-control/types.d.ts +2 -2
  31. package/lib/room-control/join-before-host-waitingroom-control/index.js +3 -3
  32. package/lib/room-control/mainroom-control/index.js +15 -13
  33. package/lib/room-control/privilege-control/index.js +39 -24
  34. package/lib/room-control/privilege-control/type.d.ts +15 -15
  35. package/lib/room-control/room-connector-control/index.js +7 -5
  36. package/lib/room-control/room-connector-control/type.d.ts +1 -1
  37. package/lib/room-control/room-control-factory.d.ts +3 -3
  38. package/lib/room-control/room-control-factory.js +7 -7
  39. package/lib/room-control/room-session/index.js +17 -15
  40. package/lib/room-control/room-session/type.d.ts +3 -3
  41. package/lib/room-control/sharing-control/index.js +13 -7
  42. package/lib/room-control/stream-control/index.js +18 -16
  43. package/lib/room-control/stream-control/type.d.ts +5 -5
  44. package/lib/room-control/stt-control/index.js +38 -31
  45. package/lib/room-control/type.d.ts +19 -19
  46. package/lib/room-control/user-control/index.js +20 -22
  47. package/lib/room-control/user-control/type.d.ts +1 -1
  48. package/lib/room-control/waitingroom-control/index.js +11 -11
  49. package/lib/room-control/whiteboard-control-v1/board-window.d.ts +21 -20
  50. package/lib/room-control/whiteboard-control-v1/board-window.js +27 -8
  51. package/lib/room-control/whiteboard-control-v1/factory.js +1 -1
  52. package/lib/room-control/whiteboard-control-v1/index.js +26 -18
  53. package/lib/room-control/whiteboard-control-v1/type.d.ts +26 -25
  54. package/lib/room-control/whiteboard-control-v1/type.js +1 -0
  55. package/lib/room-control/whiteboard-control-v2/annotation-control/control.d.ts +15 -6
  56. package/lib/room-control/whiteboard-control-v2/annotation-control/control.js +39 -5
  57. package/lib/room-control/whiteboard-control-v2/annotation-control/factory.d.ts +4 -5
  58. package/lib/room-control/whiteboard-control-v2/annotation-control/factory.js +6 -5
  59. package/lib/room-control/whiteboard-control-v2/annotation-control/type.d.ts +7 -1
  60. package/lib/room-control/whiteboard-control-v2/base/index.d.ts +9 -8
  61. package/lib/room-control/whiteboard-control-v2/base/index.js +84 -42
  62. package/lib/room-control/whiteboard-control-v2/base/main-window.d.ts +16 -15
  63. package/lib/room-control/whiteboard-control-v2/base/main-window.js +23 -4
  64. package/lib/room-control/whiteboard-control-v2/type.d.ts +17 -17
  65. package/lib/room-control/whiteboard-control-v2/whiteboard-control/control.d.ts +12 -6
  66. package/lib/room-control/whiteboard-control-v2/whiteboard-control/control.js +64 -18
  67. package/lib/room-control/whiteboard-control-v2/whiteboard-control/factory.d.ts +2 -2
  68. package/lib/room-control/whiteboard-control-v2/whiteboard-control/factory.js +10 -10
  69. package/lib/room-control/whiteboard-control-v2/whiteboard-control/type.d.ts +1 -1
  70. package/lib/room-router/index.js +10 -7
  71. package/lib/room-router/type.d.ts +1 -1
  72. package/lib/schema.d.ts +24 -46
  73. package/lib/schema.js +1 -2
  74. package/lib/service/api.d.ts +5 -3
  75. package/lib/service/api.js +17 -12
  76. package/lib/type.d.ts +64 -45
  77. package/lib/type.js +76 -11
  78. package/lib/utilities/abortable-retry.d.ts +38 -0
  79. package/lib/utilities/abortable-retry.js +61 -0
  80. package/lib/utilities/dual-video-stream-config.d.ts +6 -0
  81. package/lib/utilities/dual-video-stream-config.js +25 -0
  82. package/lib/utilities/error-helpers.d.ts +10 -9
  83. package/lib/utilities/error-helpers.js +12 -11
  84. package/lib/utilities/error.d.ts +4 -40
  85. package/lib/utilities/error.js +20 -77
  86. package/lib/utilities/join-helper.js +2 -2
  87. package/lib/utilities/logger.d.ts +2 -2
  88. package/lib/utilities/logger.js +6 -25
  89. package/lib/utilities/package-info.d.ts +1 -2
  90. package/lib/utilities/package-info.js +4 -8
  91. package/lib/utilities/parameters.js +88 -15
  92. package/lib/utilities/validate-params.js +1 -1
  93. package/lib/utilities/video-encoder-config.d.ts +9 -0
  94. package/lib/utilities/video-encoder-config.js +109 -0
  95. package/lib-es/base-session.js +1 -0
  96. package/lib-es/chat-connector/type.js +6 -0
  97. package/lib-es/engine/index.js +412 -0
  98. package/lib-es/engine/type.js +1 -0
  99. package/lib-es/imports.js +59 -0
  100. package/lib-es/index.js +8 -0
  101. package/lib-es/media-control/desktop.js +172 -0
  102. package/lib-es/media-control/mobile.js +198 -0
  103. package/lib-es/media-control/type.js +6 -0
  104. package/lib-es/monitor-control/index.js +46 -0
  105. package/lib-es/monitor-control/type.js +1 -0
  106. package/lib-es/peer-session/index.js +279 -0
  107. package/lib-es/peer-session/type.js +1 -0
  108. package/lib-es/plugins/chat/chatroom.js +409 -0
  109. package/{lib/chat-connection → lib-es/plugins/chat}/config.js +5 -9
  110. package/lib-es/plugins/chat/connector.js +269 -0
  111. package/lib-es/plugins/electron-rtc-plugin.js +1 -0
  112. package/lib-es/plugins/rtm-plugin.js +1 -0
  113. package/lib-es/plugins/web-rtc-plugin.js +1 -0
  114. package/lib-es/room-control/ability-control/index.js +58 -0
  115. package/lib-es/room-control/ability-control/type.js +15 -0
  116. package/lib-es/room-control/chatroom-control/type.js +12 -0
  117. package/lib-es/room-control/group-control/index.js +256 -0
  118. package/lib-es/room-control/helpers/constants.js +92 -0
  119. package/lib-es/room-control/helpers/index.js +20 -0
  120. package/lib-es/room-control/helpers/validation-helper.js +46 -0
  121. package/lib-es/room-control/index.js +623 -0
  122. package/lib-es/room-control/interpreter-control/index.js +172 -0
  123. package/lib-es/room-control/interpreter-control/room.js +28 -0
  124. package/lib-es/room-control/interpreter-control/types.js +26 -0
  125. package/lib-es/room-control/join-before-host-waitingroom-control/index.js +29 -0
  126. package/lib-es/room-control/mainroom-control/index.js +248 -0
  127. package/lib-es/room-control/privilege-control/helper.js +97 -0
  128. package/lib-es/room-control/privilege-control/index.js +339 -0
  129. package/lib-es/room-control/privilege-control/type.js +159 -0
  130. package/lib-es/room-control/room-connector-control/index.js +182 -0
  131. package/lib-es/room-control/room-connector-control/type.js +28 -0
  132. package/lib-es/room-control/room-control-factory.js +77 -0
  133. package/lib-es/room-control/room-session/index.js +292 -0
  134. package/lib-es/room-control/room-session/type.js +1 -0
  135. package/lib-es/room-control/shared-cache.js +47 -0
  136. package/lib-es/room-control/sharing-control/index.js +307 -0
  137. package/lib-es/room-control/sharing-control/type.js +16 -0
  138. package/lib-es/room-control/stream-control/index.js +536 -0
  139. package/lib-es/room-control/stream-control/type.js +1 -0
  140. package/lib-es/room-control/stt-control/de-compress-gzip.js +33 -0
  141. package/lib-es/room-control/stt-control/index.js +350 -0
  142. package/lib-es/room-control/stt-control/type.js +10 -0
  143. package/lib-es/room-control/type.js +30 -0
  144. package/lib-es/room-control/user-control/index.js +344 -0
  145. package/lib-es/room-control/user-control/type.js +21 -0
  146. package/lib-es/room-control/waitingroom-control/index.js +68 -0
  147. package/lib-es/room-control/whiteboard-control/enum.js +18 -0
  148. package/lib-es/room-control/whiteboard-control/type.js +10 -0
  149. package/lib-es/room-control/whiteboard-control/utils.js +13 -0
  150. package/lib-es/room-control/whiteboard-control-v1/board-subwindow.js +18 -0
  151. package/lib-es/room-control/whiteboard-control-v1/board-window.js +573 -0
  152. package/lib-es/room-control/whiteboard-control-v1/enum.js +157 -0
  153. package/lib-es/room-control/whiteboard-control-v1/factory.js +12 -0
  154. package/lib-es/room-control/whiteboard-control-v1/index.js +427 -0
  155. package/lib-es/room-control/whiteboard-control-v1/mount-manager.js +6 -0
  156. package/lib-es/room-control/whiteboard-control-v1/type.js +8 -0
  157. package/lib-es/room-control/whiteboard-control-v1/utils.js +273 -0
  158. package/lib-es/room-control/whiteboard-control-v2/annotation-control/control.js +76 -0
  159. package/lib-es/room-control/whiteboard-control-v2/annotation-control/factory.js +37 -0
  160. package/lib-es/room-control/whiteboard-control-v2/annotation-control/type.js +1 -0
  161. package/lib-es/room-control/whiteboard-control-v2/base/index.js +347 -0
  162. package/lib-es/room-control/whiteboard-control-v2/base/main-window.js +269 -0
  163. package/lib-es/room-control/whiteboard-control-v2/constant.js +9 -0
  164. package/lib-es/room-control/whiteboard-control-v2/enum.js +28 -0
  165. package/lib-es/room-control/whiteboard-control-v2/type.js +1 -0
  166. package/lib-es/room-control/whiteboard-control-v2/utils.js +92 -0
  167. package/lib-es/room-control/whiteboard-control-v2/whiteboard-control/control.js +204 -0
  168. package/lib-es/room-control/whiteboard-control-v2/whiteboard-control/factory.js +61 -0
  169. package/lib-es/room-control/whiteboard-control-v2/whiteboard-control/type.js +1 -0
  170. package/lib-es/room-router/index.js +263 -0
  171. package/lib-es/room-router/type.js +5 -0
  172. package/lib-es/schema.js +231 -0
  173. package/lib-es/service/api.js +1211 -0
  174. package/lib-es/service/type.js +1 -0
  175. package/lib-es/type.js +222 -0
  176. package/lib-es/utilities/abortable-retry.js +54 -0
  177. package/lib-es/utilities/cmd.js +1 -0
  178. package/lib-es/utilities/collection.js +64 -0
  179. package/lib-es/utilities/dual-video-stream-config.js +19 -0
  180. package/lib-es/utilities/error-helpers.js +224 -0
  181. package/lib-es/utilities/error.js +43 -0
  182. package/lib-es/utilities/join-helper.js +219 -0
  183. package/lib-es/utilities/logger.js +7 -0
  184. package/lib-es/utilities/package-info.js +5 -0
  185. package/lib-es/utilities/parameters.js +106 -0
  186. package/lib-es/utilities/retry-helpers.js +66 -0
  187. package/lib-es/utilities/shared-storage.js +31 -0
  188. package/lib-es/utilities/stream.js +18 -0
  189. package/lib-es/utilities/user.js +30 -0
  190. package/lib-es/utilities/validate-params.js +8 -0
  191. package/lib-es/utilities/video-encoder-config.js +103 -0
  192. package/package.json +11 -10
  193. package/lib/chat-connection/index.d.ts +0 -24
  194. package/lib/chat-connection/type.d.ts +0 -17
  195. package/lib/plugins/chatroom.js +0 -454
  196. package/lib/room-control/chatroom-control/config.d.ts +0 -51
  197. package/lib/utilities/storage.d.ts +0 -8
  198. package/lib/utilities/storage.js +0 -33
  199. /package/lib/plugins/{chatroom.d.ts → chat/chatroom.d.ts} +0 -0
@@ -0,0 +1,172 @@
1
+ import "core-js/modules/es.array.push.js";
2
+ import "core-js/modules/esnext.function.metadata.js";
3
+ import "core-js/modules/esnext.map.delete-all.js";
4
+ import "core-js/modules/esnext.map.emplace.js";
5
+ import "core-js/modules/esnext.map.every.js";
6
+ import "core-js/modules/esnext.map.filter.js";
7
+ import "core-js/modules/esnext.map.find.js";
8
+ import "core-js/modules/esnext.map.find-key.js";
9
+ import "core-js/modules/esnext.map.includes.js";
10
+ import "core-js/modules/esnext.map.key-of.js";
11
+ import "core-js/modules/esnext.map.map-keys.js";
12
+ import "core-js/modules/esnext.map.map-values.js";
13
+ import "core-js/modules/esnext.map.merge.js";
14
+ import "core-js/modules/esnext.map.reduce.js";
15
+ import "core-js/modules/esnext.map.some.js";
16
+ import "core-js/modules/esnext.map.update.js";
17
+ import "core-js/modules/esnext.symbol.metadata.js";
18
+ let _initProto, _getCameraTrackDecs, _getMicrophoneTrackDecs, _getScreenTrackDecs, _getLoopbackTrackDecs, _setSelectedSpeakerDecs, _startSelectedSpeakerTestDecs, _stopSelectedSpeakerTestDecs, _isCapabilitySupportedDecs, _adjustOutputVolumeDecs, _setSelectedSpeakerVolumeDecs, _observeSystemSelectedSpeakerChangedDecs, _observeSystemSelectedMicrophoneChangedDecs, _disableAGCDecs, _enableAGCDecs;
19
+ import "core-js/modules/esnext.iterator.constructor.js";
20
+ import "core-js/modules/esnext.iterator.for-each.js";
21
+ function _applyDecs(e, t, r, n, o, a) { function i(e, t, r) { return function (n, o) { return r && r(n), e[t].call(n, o); }; } function c(e, t) { for (var r = 0; r < e.length; r++) e[r].call(t); return t; } function s(e, t, r, n) { if ("function" != typeof e && (n || void 0 !== e)) throw new TypeError(t + " must " + (r || "be") + " a function" + (n ? "" : " or undefined")); return e; } function applyDec(e, t, r, n, o, a, c, u, l, f, p, d, h) { function m(e) { if (!h(e)) throw new TypeError("Attempted to access private element on non-instance"); } var y, v = t[0], g = t[3], b = !u; if (!b) { r || Array.isArray(v) || (v = [v]); var w = {}, S = [], A = 3 === o ? "get" : 4 === o || d ? "set" : "value"; f ? (p || d ? w = { get: _setFunctionName(function () { return g(this); }, n, "get"), set: function (e) { t[4](this, e); } } : w[A] = g, p || _setFunctionName(w[A], n, 2 === o ? "" : A)) : p || (w = Object.getOwnPropertyDescriptor(e, n)); } for (var P = e, j = v.length - 1; j >= 0; j -= r ? 2 : 1) { var D = v[j], E = r ? v[j - 1] : void 0, I = {}, O = { kind: ["field", "accessor", "method", "getter", "setter", "class"][o], name: n, metadata: a, addInitializer: function (e, t) { if (e.v) throw Error("attempted to call addInitializer after decoration was finished"); s(t, "An initializer", "be", !0), c.push(t); }.bind(null, I) }; try { if (b) (y = s(D.call(E, P, O), "class decorators", "return")) && (P = y);else { var k, F; O.static = l, O.private = f, f ? 2 === o ? k = function (e) { return m(e), w.value; } : (o < 4 && (k = i(w, "get", m)), 3 !== o && (F = i(w, "set", m))) : (k = function (e) { return e[n]; }, (o < 2 || 4 === o) && (F = function (e, t) { e[n] = t; })); var N = O.access = { has: f ? h.bind() : function (e) { return n in e; } }; if (k && (N.get = k), F && (N.set = F), P = D.call(E, d ? { get: w.get, set: w.set } : w[A], O), d) { if ("object" == typeof P && P) (y = s(P.get, "accessor.get")) && (w.get = y), (y = s(P.set, "accessor.set")) && (w.set = y), (y = s(P.init, "accessor.init")) && S.push(y);else if (void 0 !== P) throw new TypeError("accessor decorators must return an object with get, set, or init properties or void 0"); } else s(P, (p ? "field" : "method") + " decorators", "return") && (p ? S.push(P) : w[A] = P); } } finally { I.v = !0; } } return (p || d) && u.push(function (e, t) { for (var r = S.length - 1; r >= 0; r--) t = S[r].call(e, t); return t; }), p || b || (f ? d ? u.push(i(w, "get"), i(w, "set")) : u.push(2 === o ? w[A] : i.call.bind(w[A])) : Object.defineProperty(e, n, w)), P; } function u(e, t) { return Object.defineProperty(e, Symbol.metadata || Symbol.for("Symbol.metadata"), { configurable: !0, enumerable: !0, value: t }); } if (arguments.length >= 6) var l = a[Symbol.metadata || Symbol.for("Symbol.metadata")]; var f = Object.create(null == l ? null : l), p = function (e, t, r, n) { var o, a, i = [], s = function (t) { return _checkInRHS(t) === e; }, u = new Map(); function l(e) { e && i.push(c.bind(null, e)); } for (var f = 0; f < t.length; f++) { var p = t[f]; if (Array.isArray(p)) { var d = p[1], h = p[2], m = p.length > 3, y = 16 & d, v = !!(8 & d), g = 0 == (d &= 7), b = h + "/" + v; if (!g && !m) { var w = u.get(b); if (!0 === w || 3 === w && 4 !== d || 4 === w && 3 !== d) throw Error("Attempted to decorate a public method/accessor that has the same name as a previously decorated public method/accessor. This is not currently supported by the decorators plugin. Property name was: " + h); u.set(b, !(d > 2) || d); } applyDec(v ? e : e.prototype, p, y, m ? "#" + h : _toPropertyKey(h), d, n, v ? a = a || [] : o = o || [], i, v, m, g, 1 === d, v && m ? s : r); } } return l(o), l(a), i; }(e, t, o, f); return r.length || u(e, f), { e: p, get c() { var t = []; return r.length && [u(applyDec(e, [r], n, e.name, 5, f, t), f), c.bind(null, t, e)]; } }; }
22
+ function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : i + ""; }
23
+ function _toPrimitive(t, r) { if ("object" != typeof t || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != typeof i) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
24
+ function _setFunctionName(e, t, n) { "symbol" == typeof t && (t = (t = t.description) ? "[" + t + "]" : ""); try { Object.defineProperty(e, "name", { configurable: !0, value: n ? n + " " + t : t }); } catch (e) {} return e; }
25
+ function _checkInRHS(e) { if (Object(e) !== e) throw TypeError("right-hand side of 'in' should be an object, got " + (null !== e ? typeof e : "null")); return e; }
26
+ import { AgoraObservable, trace } from '../imports';
27
+ import { fcrCapabilitySchema, numberSchema, stringSchema } from '../schema';
28
+ import validateParams from '../utilities/validate-params';
29
+ import { createLogger, generateLogObserver } from '../utilities/logger';
30
+ /**
31
+ * @internal
32
+ */
33
+ export class FcrDesktopMediaControlImpl {
34
+ static {
35
+ [_initProto] = _applyDecs(this, [[trace, 2, "getLoopbackList"], [trace, 2, "getCameraList"], [trace, 2, "getMicrophoneList"], [trace, 2, "getSpeakerList"], [trace, 2, "getSystemSelectedMicrophone"], [trace, 2, "getSystemSelectedSpeaker"], [trace, 2, "getWindowList"], [trace, 2, "getDisplayList"], [_getCameraTrackDecs, 2, "getCameraTrack"], [_getMicrophoneTrackDecs, 2, "getMicrophoneTrack"], [_getScreenTrackDecs, 2, "getScreenTrack"], [_getLoopbackTrackDecs, 2, "getLoopbackTrack"], [_setSelectedSpeakerDecs, 2, "setSelectedSpeaker"], [_startSelectedSpeakerTestDecs, 2, "startSelectedSpeakerTest"], [_stopSelectedSpeakerTestDecs, 2, "stopSelectedSpeakerTest"], [_isCapabilitySupportedDecs, 2, "isCapabilitySupported"], [_adjustOutputVolumeDecs, 2, "adjustOutputVolume"], [_setSelectedSpeakerVolumeDecs, 2, "setSelectedSpeakerVolume"], [trace, 2, "getSelectedSpeakerVolume"], [_observeSystemSelectedSpeakerChangedDecs, 2, "observeSystemSelectedSpeakerChanged"], [_observeSystemSelectedMicrophoneChangedDecs, 2, "observeSystemSelectedMicrophoneChanged"], [_disableAGCDecs, 2, "disableAGC"], [_enableAGCDecs, 2, "enableAGC"]], []).e;
36
+ }
37
+ [(_getCameraTrackDecs = [trace(['deviceId']), validateParams(stringSchema)], _getMicrophoneTrackDecs = [trace(['deviceId']), validateParams(stringSchema)], _getScreenTrackDecs = [trace(['sourceId']), validateParams(stringSchema)], _getLoopbackTrackDecs = [trace(['sourceId']), validateParams(stringSchema)], _setSelectedSpeakerDecs = [trace(['deviceId'], true), validateParams(stringSchema)], _startSelectedSpeakerTestDecs = [trace(['url'], true), validateParams(stringSchema)], _stopSelectedSpeakerTestDecs = trace(true), _isCapabilitySupportedDecs = [trace(['capability']), validateParams(fcrCapabilitySchema)], _adjustOutputVolumeDecs = [trace(['volume'], true), validateParams(numberSchema)], _setSelectedSpeakerVolumeDecs = [trace(['volume'], true), validateParams(numberSchema)], _observeSystemSelectedSpeakerChangedDecs = trace(true), _observeSystemSelectedMicrophoneChangedDecs = trace(true), _disableAGCDecs = trace(true), _enableAGCDecs = trace(true), "logger")] = (_initProto(this), createLogger({
38
+ prefix: 'FcrDesktopMediaControlImpl'
39
+ }));
40
+ _observable = new AgoraObservable();
41
+ _cameraLogObserver = generateLogObserver(this.logger, [['onCameraStateUpdated', ['deviceId', 'state']]]);
42
+ _microphoneLogObserver = generateLogObserver(this.logger, [['onMicrophoneStateUpdated', ['deviceId', 'state']]]);
43
+ _screenLogObserver = generateLogObserver(this.logger, [['onScreenCaptureStateUpdated', ['sourceId', 'state']]]);
44
+ _loopbackLogObserver = generateLogObserver(this.logger, [['onLoopbackRecordingStateUpdated', ['deviceId', 'state']]]);
45
+ constructor(mediaControl) {
46
+ this._mediaControl = mediaControl;
47
+ this._mediaControl.addObserver({
48
+ onAutoPlayFailed: () => {
49
+ this._observable.notifyObservers('onAutoPlayFailed');
50
+ },
51
+ onCameraAdded: device => {
52
+ this._observable.notifyObservers('onCameraAdded', device);
53
+ },
54
+ onCameraRemoved: device => {
55
+ this._observable.notifyObservers('onCameraRemoved', device);
56
+ },
57
+ onMicrophoneAdded: device => {
58
+ this._observable.notifyObservers('onMicrophoneAdded', device);
59
+ },
60
+ onMicrophoneRemoved: device => {
61
+ this._observable.notifyObservers('onMicrophoneRemoved', device);
62
+ },
63
+ onAudioOutputRoutingUpdated: routing => {},
64
+ onOutputVolumeIndicationUpdated: volume => {},
65
+ onSpeakerListAdded: devices => {
66
+ devices.forEach(device => {
67
+ this._observable.notifyObservers('onSpeakerAdded', device);
68
+ });
69
+ },
70
+ onSpeakerListRemoved: devices => {
71
+ devices.forEach(device => {
72
+ this._observable.notifyObservers('onSpeakerRemoved', device);
73
+ });
74
+ },
75
+ onSpeakerTestVolumeIndicationUpdated: volume => {
76
+ this._observable.notifyObservers('onSpeakerTestVolumeIndicationUpdated', volume);
77
+ },
78
+ onSelectedSpeakerVolumeUpdated: (volume, muted) => {
79
+ this._observable.notifyObservers('onSelectedSpeakerVolumeUpdated', volume, muted);
80
+ },
81
+ onSystemSelectedSpeakerChanged: speaker => {
82
+ this._observable.notifyObservers('onSystemSelectedSpeakerChanged', speaker);
83
+ },
84
+ onSystemSelectedMicrophoneChanged: microphone => {
85
+ this._observable.notifyObservers('onSystemSelectedMicrophoneChanged', microphone);
86
+ }
87
+ });
88
+ }
89
+ getLoopbackList() {
90
+ return this._mediaControl.getLoopbackList();
91
+ }
92
+ getCameraList() {
93
+ return this._mediaControl.getCameraList();
94
+ }
95
+ getMicrophoneList() {
96
+ return this._mediaControl.getMicrophoneList();
97
+ }
98
+ getSpeakerList() {
99
+ return this._mediaControl.getSpeakerList();
100
+ }
101
+ getSystemSelectedMicrophone() {
102
+ return this._mediaControl.getSystemSelectedMicrophone();
103
+ }
104
+ getSystemSelectedSpeaker() {
105
+ return this._mediaControl.getSystemSelectedSpeaker();
106
+ }
107
+ getWindowList() {
108
+ return this._mediaControl.getWindowList();
109
+ }
110
+ getDisplayList() {
111
+ return this._mediaControl.getDisplayList();
112
+ }
113
+ getCameraTrack(deviceId) {
114
+ const track = this._mediaControl.getCameraTrack(deviceId);
115
+ track.addObserver(this._cameraLogObserver);
116
+ return track;
117
+ }
118
+ getMicrophoneTrack(deviceId) {
119
+ const track = this._mediaControl.getMicrophoneTrack(deviceId);
120
+ track.addObserver(this._microphoneLogObserver);
121
+ return track;
122
+ }
123
+ getScreenTrack(sourceId) {
124
+ const track = this._mediaControl.getScreenTrack(sourceId);
125
+ track.addObserver(this._screenLogObserver);
126
+ return track;
127
+ }
128
+ getLoopbackTrack(sourceId) {
129
+ const track = this._mediaControl.getLoopbackTrack(sourceId);
130
+ track.addObserver(this._loopbackLogObserver);
131
+ return track;
132
+ }
133
+ setSelectedSpeaker(deviceId) {
134
+ return this._mediaControl.setSelectedSpeaker(deviceId);
135
+ }
136
+ startSelectedSpeakerTest(url) {
137
+ return this._mediaControl.startSpeakerTest(url);
138
+ }
139
+ stopSelectedSpeakerTest() {
140
+ return this._mediaControl.stopSpeakerTest();
141
+ }
142
+ isCapabilitySupported(capability) {
143
+ return this._mediaControl.isCapabilitySupported(capability);
144
+ }
145
+ adjustOutputVolume(volume) {
146
+ return this._mediaControl.adjustAudioOutputVolume(volume);
147
+ }
148
+ setSelectedSpeakerVolume(volume) {
149
+ return this._mediaControl.setSelectedSpeakerVolume(volume);
150
+ }
151
+ getSelectedSpeakerVolume() {
152
+ return this._mediaControl.getSelectedSpeakerVolume();
153
+ }
154
+ addObserver(observer) {
155
+ this._observable.addObserver(observer);
156
+ }
157
+ removeObserver(observer) {
158
+ this._observable.removeObserver(observer);
159
+ }
160
+ observeSystemSelectedSpeakerChanged(follow) {
161
+ return this._mediaControl.observeSystemSelectedSpeakerChanged(follow);
162
+ }
163
+ observeSystemSelectedMicrophoneChanged(follow) {
164
+ return this._mediaControl.observeSystemSelectedMicrophoneChanged(follow);
165
+ }
166
+ disableAGC() {
167
+ return this._mediaControl.disableAGC();
168
+ }
169
+ enableAGC() {
170
+ return this._mediaControl.enableAGC();
171
+ }
172
+ }
@@ -0,0 +1,198 @@
1
+ import "core-js/modules/es.array.push.js";
2
+ import "core-js/modules/esnext.function.metadata.js";
3
+ import "core-js/modules/esnext.map.delete-all.js";
4
+ import "core-js/modules/esnext.map.emplace.js";
5
+ import "core-js/modules/esnext.map.every.js";
6
+ import "core-js/modules/esnext.map.filter.js";
7
+ import "core-js/modules/esnext.map.find.js";
8
+ import "core-js/modules/esnext.map.find-key.js";
9
+ import "core-js/modules/esnext.map.includes.js";
10
+ import "core-js/modules/esnext.map.key-of.js";
11
+ import "core-js/modules/esnext.map.map-keys.js";
12
+ import "core-js/modules/esnext.map.map-values.js";
13
+ import "core-js/modules/esnext.map.merge.js";
14
+ import "core-js/modules/esnext.map.reduce.js";
15
+ import "core-js/modules/esnext.map.some.js";
16
+ import "core-js/modules/esnext.map.update.js";
17
+ import "core-js/modules/esnext.symbol.metadata.js";
18
+ let _initProto, _getDeviceIdDecs, _getDeviceStateDecs, _startCameraPreviewDecs, _stopCameraPreviewDecs, _openDeviceDecs, _closeDeviceDecs, _getCameraTrackDecs, _getMicrophoneTrackDecs, _isCapabilitySupportedDecs, _adjustOutputVolumeDecs;
19
+ function _applyDecs(e, t, r, n, o, a) { function i(e, t, r) { return function (n, o) { return r && r(n), e[t].call(n, o); }; } function c(e, t) { for (var r = 0; r < e.length; r++) e[r].call(t); return t; } function s(e, t, r, n) { if ("function" != typeof e && (n || void 0 !== e)) throw new TypeError(t + " must " + (r || "be") + " a function" + (n ? "" : " or undefined")); return e; } function applyDec(e, t, r, n, o, a, c, u, l, f, p, d, h) { function m(e) { if (!h(e)) throw new TypeError("Attempted to access private element on non-instance"); } var y, v = t[0], g = t[3], b = !u; if (!b) { r || Array.isArray(v) || (v = [v]); var w = {}, S = [], A = 3 === o ? "get" : 4 === o || d ? "set" : "value"; f ? (p || d ? w = { get: _setFunctionName(function () { return g(this); }, n, "get"), set: function (e) { t[4](this, e); } } : w[A] = g, p || _setFunctionName(w[A], n, 2 === o ? "" : A)) : p || (w = Object.getOwnPropertyDescriptor(e, n)); } for (var P = e, j = v.length - 1; j >= 0; j -= r ? 2 : 1) { var D = v[j], E = r ? v[j - 1] : void 0, I = {}, O = { kind: ["field", "accessor", "method", "getter", "setter", "class"][o], name: n, metadata: a, addInitializer: function (e, t) { if (e.v) throw Error("attempted to call addInitializer after decoration was finished"); s(t, "An initializer", "be", !0), c.push(t); }.bind(null, I) }; try { if (b) (y = s(D.call(E, P, O), "class decorators", "return")) && (P = y);else { var k, F; O.static = l, O.private = f, f ? 2 === o ? k = function (e) { return m(e), w.value; } : (o < 4 && (k = i(w, "get", m)), 3 !== o && (F = i(w, "set", m))) : (k = function (e) { return e[n]; }, (o < 2 || 4 === o) && (F = function (e, t) { e[n] = t; })); var N = O.access = { has: f ? h.bind() : function (e) { return n in e; } }; if (k && (N.get = k), F && (N.set = F), P = D.call(E, d ? { get: w.get, set: w.set } : w[A], O), d) { if ("object" == typeof P && P) (y = s(P.get, "accessor.get")) && (w.get = y), (y = s(P.set, "accessor.set")) && (w.set = y), (y = s(P.init, "accessor.init")) && S.push(y);else if (void 0 !== P) throw new TypeError("accessor decorators must return an object with get, set, or init properties or void 0"); } else s(P, (p ? "field" : "method") + " decorators", "return") && (p ? S.push(P) : w[A] = P); } } finally { I.v = !0; } } return (p || d) && u.push(function (e, t) { for (var r = S.length - 1; r >= 0; r--) t = S[r].call(e, t); return t; }), p || b || (f ? d ? u.push(i(w, "get"), i(w, "set")) : u.push(2 === o ? w[A] : i.call.bind(w[A])) : Object.defineProperty(e, n, w)), P; } function u(e, t) { return Object.defineProperty(e, Symbol.metadata || Symbol.for("Symbol.metadata"), { configurable: !0, enumerable: !0, value: t }); } if (arguments.length >= 6) var l = a[Symbol.metadata || Symbol.for("Symbol.metadata")]; var f = Object.create(null == l ? null : l), p = function (e, t, r, n) { var o, a, i = [], s = function (t) { return _checkInRHS(t) === e; }, u = new Map(); function l(e) { e && i.push(c.bind(null, e)); } for (var f = 0; f < t.length; f++) { var p = t[f]; if (Array.isArray(p)) { var d = p[1], h = p[2], m = p.length > 3, y = 16 & d, v = !!(8 & d), g = 0 == (d &= 7), b = h + "/" + v; if (!g && !m) { var w = u.get(b); if (!0 === w || 3 === w && 4 !== d || 4 === w && 3 !== d) throw Error("Attempted to decorate a public method/accessor that has the same name as a previously decorated public method/accessor. This is not currently supported by the decorators plugin. Property name was: " + h); u.set(b, !(d > 2) || d); } applyDec(v ? e : e.prototype, p, y, m ? "#" + h : _toPropertyKey(h), d, n, v ? a = a || [] : o = o || [], i, v, m, g, 1 === d, v && m ? s : r); } } return l(o), l(a), i; }(e, t, o, f); return r.length || u(e, f), { e: p, get c() { var t = []; return r.length && [u(applyDec(e, [r], n, e.name, 5, f, t), f), c.bind(null, t, e)]; } }; }
20
+ function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : i + ""; }
21
+ function _toPrimitive(t, r) { if ("object" != typeof t || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != typeof i) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
22
+ function _setFunctionName(e, t, n) { "symbol" == typeof t && (t = (t = t.description) ? "[" + t + "]" : ""); try { Object.defineProperty(e, "name", { configurable: !0, value: n ? n + " " + t : t }); } catch (e) {} return e; }
23
+ function _checkInRHS(e) { if (Object(e) !== e) throw TypeError("right-hand side of 'in' should be an object, got " + (null !== e ? typeof e : "null")); return e; }
24
+ import { AgoraObservable, AgoraRteScreenCaptureType, trace } from '../imports';
25
+ import { FcrMediaSourceState, FcrDeviceType } from '../type';
26
+ import { fcrCapabilitySchema, fcrDeviceTypeSchema, fcrMobileDeviceIdOrNameSchema, fcrRenderConfigSchema, numberSchema, stringOrObjectSchema } from '../schema';
27
+ import validateParams from '../utilities/validate-params';
28
+ import { createLogger } from '../utilities/logger';
29
+ /**
30
+ * @internal
31
+ */
32
+ export class FcrMobileMediaControlImpl {
33
+ static {
34
+ [_initProto] = _applyDecs(this, [[_getDeviceIdDecs, 2, "getDeviceId"], [_getDeviceStateDecs, 2, "getDeviceState"], [trace, 2, "startCameraTest"], [trace, 2, "stopCameraTest"], [_startCameraPreviewDecs, 2, "startCameraPreview"], [_stopCameraPreviewDecs, 2, "stopCameraPreview"], [trace, 2, "stopCameraPreviewOnAllCanvas"], [trace, 2, "startScreenCapture"], [trace, 2, "getScreenCaptureState"], [trace, 2, "startLoopbackRecording"], [trace, 2, "stopLoopbackRecording"], [trace, 2, "getLoopbackRecordingState"], [trace, 2, "getAudioOutputRouting"], [trace, 2, "getAudioEffectEnhancer"], [trace, 2, "getVideoEffectEnhancer"], [_openDeviceDecs, 2, "openDevice"], [_closeDeviceDecs, 2, "closeDevice"], [trace, 2, "switchCamera"], [trace, 2, "getCameraPosition"], [_getCameraTrackDecs, 2, "getCameraTrack"], [_getMicrophoneTrackDecs, 2, "getMicrophoneTrack"], [_isCapabilitySupportedDecs, 2, "isCapabilitySupported"], [_adjustOutputVolumeDecs, 2, "adjustOutputVolume"]], []).e;
35
+ }
36
+ [(_getDeviceIdDecs = [trace, validateParams(fcrDeviceTypeSchema)], _getDeviceStateDecs = [trace, validateParams(fcrDeviceTypeSchema)], _startCameraPreviewDecs = [trace, validateParams(stringOrObjectSchema, fcrRenderConfigSchema)], _stopCameraPreviewDecs = [trace, validateParams(stringOrObjectSchema)], _openDeviceDecs = [trace, validateParams(fcrDeviceTypeSchema)], _closeDeviceDecs = [trace, validateParams(fcrDeviceTypeSchema)], _getCameraTrackDecs = validateParams(fcrMobileDeviceIdOrNameSchema), _getMicrophoneTrackDecs = validateParams(fcrMobileDeviceIdOrNameSchema), _isCapabilitySupportedDecs = [trace, validateParams(fcrCapabilitySchema)], _adjustOutputVolumeDecs = [trace, validateParams(numberSchema)], "logger")] = (_initProto(this), createLogger({
37
+ prefix: 'FcrMobileMediaControlImpl'
38
+ }));
39
+ _observable = new AgoraObservable();
40
+ _cameraDeviceName = undefined;
41
+ _microphoneDeviceName = undefined;
42
+ _screenDeviceName = undefined;
43
+ _loopbackDeviceName = undefined;
44
+ constructor(mediaControl) {
45
+ this._mediaControl = mediaControl;
46
+ this._mediaControl.getCameraTrack(this._cameraDeviceName).addObserver({
47
+ onCameraStateUpdated: (deviceId, state) => {
48
+ this._observable.notifyObservers('onCameraStateUpdated', state);
49
+ }
50
+ });
51
+ this._mediaControl.getMicrophoneTrack(this._microphoneDeviceName).addObserver({
52
+ onMicrophoneStateUpdated: (deviceId, state) => {
53
+ this._observable.notifyObservers('onMicrophoneStateUpdated', state);
54
+ },
55
+ onVolumeIndicationUpdated: (deviceId, volume) => {
56
+ this._observable.notifyObservers('onMicrophoneVolumeIndicationUpdated', volume);
57
+ }
58
+ });
59
+ this._mediaControl.getScreenTrack(this._screenDeviceName).addObserver({
60
+ onScreenCaptureStateUpdated: (sourceId, state) => {
61
+ this._observable.notifyObservers('onScreenCaptureStateUpdated', state);
62
+ }
63
+ });
64
+ this._mediaControl.addObserver({
65
+ onAutoPlayFailed: () => {
66
+ this._observable.notifyObservers('onAutoPlayFailed');
67
+ },
68
+ onCameraAdded: device => {},
69
+ onCameraRemoved: device => {},
70
+ onMicrophoneAdded: device => {},
71
+ onMicrophoneRemoved: device => {},
72
+ onAudioOutputRoutingUpdated: routing => {
73
+ this._observable.notifyObservers('onAudioOutputRoutingUpdated', routing);
74
+ },
75
+ onSpeakerListAdded: devices => {},
76
+ onSpeakerListRemoved: devices => {},
77
+ onOutputVolumeIndicationUpdated: volume => {
78
+ this._observable.notifyObservers('onOutputVolumeIndicationUpdated', volume);
79
+ }
80
+ });
81
+ }
82
+ getDeviceId(deviceType) {
83
+ switch (deviceType) {
84
+ case FcrDeviceType.Camera:
85
+ return this._cameraDeviceName;
86
+ case FcrDeviceType.Microphone:
87
+ return this._microphoneDeviceName;
88
+ default:
89
+ return '';
90
+ }
91
+ }
92
+ getDeviceState(deviceType) {
93
+ switch (deviceType) {
94
+ case FcrDeviceType.Camera:
95
+ return this._mediaControl.getCameraTrack(this._cameraDeviceName).getState();
96
+ case FcrDeviceType.Microphone:
97
+ return this._mediaControl.getMicrophoneTrack(this._microphoneDeviceName).getState();
98
+ default:
99
+ return FcrMediaSourceState.CLOSE;
100
+ }
101
+ }
102
+ startCameraTest() {
103
+ this._mediaControl.getCameraTrack(this._cameraDeviceName).startTest();
104
+ }
105
+ stopCameraTest() {
106
+ this._mediaControl.getCameraTrack(this._cameraDeviceName).startTest();
107
+ }
108
+ startCameraPreview(view, config) {
109
+ this._mediaControl.getCameraTrack(this._cameraDeviceName).startPreview(config, view);
110
+ }
111
+ stopCameraPreview(view) {
112
+ this._mediaControl.getCameraTrack(this._cameraDeviceName).stopPreview(view);
113
+ }
114
+ stopCameraPreviewOnAllCanvas() {
115
+ throw new Error('Method not implemented.');
116
+ }
117
+ startScreenCapture(excludeWindowList) {
118
+ this._mediaControl.getScreenTrack(this._screenDeviceName).start(AgoraRteScreenCaptureType.SCREEN, excludeWindowList);
119
+ }
120
+ stopScreenCapture() {
121
+ this._mediaControl.getScreenTrack(this._screenDeviceName).stop();
122
+ }
123
+ startScreenCaptureWithParams(params) {
124
+ this._mediaControl.getScreenTrack(this._screenDeviceName).setCaptureParams(params);
125
+ this._mediaControl.getScreenTrack(this._screenDeviceName).start(AgoraRteScreenCaptureType.SCREEN, []);
126
+ }
127
+ getScreenCaptureState() {
128
+ return this._mediaControl.getScreenTrack(this._screenDeviceName).getState();
129
+ }
130
+ startLoopbackRecording() {
131
+ this._mediaControl.getLoopbackTrack(this._loopbackDeviceName).start();
132
+ }
133
+ stopLoopbackRecording() {
134
+ this._mediaControl.getLoopbackTrack(this._loopbackDeviceName).stop();
135
+ }
136
+ getLoopbackRecordingState() {
137
+ return this._mediaControl.getLoopbackTrack(this._loopbackDeviceName).getState();
138
+ }
139
+ enableSpeaker(enable) {
140
+ this._mediaControl.setEnableSpeaker(enable);
141
+ }
142
+ getAudioOutputRouting() {
143
+ return this._mediaControl.getAudioOutputRouting();
144
+ }
145
+ getAudioEffectEnhancer() {
146
+ throw new Error('Method not implemented.');
147
+ }
148
+ getVideoEffectEnhancer() {
149
+ throw new Error('Method not implemented.');
150
+ }
151
+ openDevice(deviceType) {
152
+ switch (deviceType) {
153
+ case FcrDeviceType.Camera:
154
+ this.getCameraTrack(this._cameraDeviceName).start();
155
+ break;
156
+ case FcrDeviceType.Microphone:
157
+ this.getMicrophoneTrack(this._microphoneDeviceName).start();
158
+ break;
159
+ default:
160
+ }
161
+ }
162
+ closeDevice(deviceType) {
163
+ switch (deviceType) {
164
+ case FcrDeviceType.Camera:
165
+ this.getCameraTrack(this._cameraDeviceName).stop();
166
+ break;
167
+ case FcrDeviceType.Microphone:
168
+ this.getMicrophoneTrack(this._microphoneDeviceName).stop();
169
+ break;
170
+ default:
171
+ }
172
+ }
173
+ switchCamera() {
174
+ this._mediaControl.getCameraTrack(this._cameraDeviceName).switchPosition();
175
+ return this._mediaControl.getCameraTrack(this._cameraDeviceName).getPosition();
176
+ }
177
+ getCameraPosition() {
178
+ return this._mediaControl.getCameraTrack(this._cameraDeviceName).getPosition();
179
+ }
180
+ getCameraTrack(deviceId) {
181
+ return this._mediaControl.getCameraTrack(deviceId);
182
+ }
183
+ getMicrophoneTrack(deviceId) {
184
+ return this._mediaControl.getMicrophoneTrack(deviceId);
185
+ }
186
+ isCapabilitySupported(capability) {
187
+ return this._mediaControl.isCapabilitySupported(capability);
188
+ }
189
+ adjustOutputVolume(volume) {
190
+ this._mediaControl.adjustAudioOutputVolume(volume);
191
+ }
192
+ addObserver(observer) {
193
+ this._observable.addObserver(observer);
194
+ }
195
+ removeObserver(observer) {
196
+ this._observable.removeObserver(observer);
197
+ }
198
+ }
@@ -0,0 +1,6 @@
1
+ export let FcrDeviceType = /*#__PURE__*/function (FcrDeviceType) {
2
+ FcrDeviceType["Camera"] = "camera";
3
+ FcrDeviceType["Microphone"] = "microphone";
4
+ FcrDeviceType["Speaker"] = "speaker";
5
+ return FcrDeviceType;
6
+ }({});
@@ -0,0 +1,46 @@
1
+ import "core-js/modules/es.array.push.js";
2
+ import "core-js/modules/esnext.function.metadata.js";
3
+ import "core-js/modules/esnext.map.delete-all.js";
4
+ import "core-js/modules/esnext.map.emplace.js";
5
+ import "core-js/modules/esnext.map.every.js";
6
+ import "core-js/modules/esnext.map.filter.js";
7
+ import "core-js/modules/esnext.map.find.js";
8
+ import "core-js/modules/esnext.map.find-key.js";
9
+ import "core-js/modules/esnext.map.includes.js";
10
+ import "core-js/modules/esnext.map.key-of.js";
11
+ import "core-js/modules/esnext.map.map-keys.js";
12
+ import "core-js/modules/esnext.map.map-values.js";
13
+ import "core-js/modules/esnext.map.merge.js";
14
+ import "core-js/modules/esnext.map.reduce.js";
15
+ import "core-js/modules/esnext.map.some.js";
16
+ import "core-js/modules/esnext.map.update.js";
17
+ import "core-js/modules/esnext.symbol.metadata.js";
18
+ let _initProto, _uploadEventDecs;
19
+ function _applyDecs(e, t, r, n, o, a) { function i(e, t, r) { return function (n, o) { return r && r(n), e[t].call(n, o); }; } function c(e, t) { for (var r = 0; r < e.length; r++) e[r].call(t); return t; } function s(e, t, r, n) { if ("function" != typeof e && (n || void 0 !== e)) throw new TypeError(t + " must " + (r || "be") + " a function" + (n ? "" : " or undefined")); return e; } function applyDec(e, t, r, n, o, a, c, u, l, f, p, d, h) { function m(e) { if (!h(e)) throw new TypeError("Attempted to access private element on non-instance"); } var y, v = t[0], g = t[3], b = !u; if (!b) { r || Array.isArray(v) || (v = [v]); var w = {}, S = [], A = 3 === o ? "get" : 4 === o || d ? "set" : "value"; f ? (p || d ? w = { get: _setFunctionName(function () { return g(this); }, n, "get"), set: function (e) { t[4](this, e); } } : w[A] = g, p || _setFunctionName(w[A], n, 2 === o ? "" : A)) : p || (w = Object.getOwnPropertyDescriptor(e, n)); } for (var P = e, j = v.length - 1; j >= 0; j -= r ? 2 : 1) { var D = v[j], E = r ? v[j - 1] : void 0, I = {}, O = { kind: ["field", "accessor", "method", "getter", "setter", "class"][o], name: n, metadata: a, addInitializer: function (e, t) { if (e.v) throw Error("attempted to call addInitializer after decoration was finished"); s(t, "An initializer", "be", !0), c.push(t); }.bind(null, I) }; try { if (b) (y = s(D.call(E, P, O), "class decorators", "return")) && (P = y);else { var k, F; O.static = l, O.private = f, f ? 2 === o ? k = function (e) { return m(e), w.value; } : (o < 4 && (k = i(w, "get", m)), 3 !== o && (F = i(w, "set", m))) : (k = function (e) { return e[n]; }, (o < 2 || 4 === o) && (F = function (e, t) { e[n] = t; })); var N = O.access = { has: f ? h.bind() : function (e) { return n in e; } }; if (k && (N.get = k), F && (N.set = F), P = D.call(E, d ? { get: w.get, set: w.set } : w[A], O), d) { if ("object" == typeof P && P) (y = s(P.get, "accessor.get")) && (w.get = y), (y = s(P.set, "accessor.set")) && (w.set = y), (y = s(P.init, "accessor.init")) && S.push(y);else if (void 0 !== P) throw new TypeError("accessor decorators must return an object with get, set, or init properties or void 0"); } else s(P, (p ? "field" : "method") + " decorators", "return") && (p ? S.push(P) : w[A] = P); } } finally { I.v = !0; } } return (p || d) && u.push(function (e, t) { for (var r = S.length - 1; r >= 0; r--) t = S[r].call(e, t); return t; }), p || b || (f ? d ? u.push(i(w, "get"), i(w, "set")) : u.push(2 === o ? w[A] : i.call.bind(w[A])) : Object.defineProperty(e, n, w)), P; } function u(e, t) { return Object.defineProperty(e, Symbol.metadata || Symbol.for("Symbol.metadata"), { configurable: !0, enumerable: !0, value: t }); } if (arguments.length >= 6) var l = a[Symbol.metadata || Symbol.for("Symbol.metadata")]; var f = Object.create(null == l ? null : l), p = function (e, t, r, n) { var o, a, i = [], s = function (t) { return _checkInRHS(t) === e; }, u = new Map(); function l(e) { e && i.push(c.bind(null, e)); } for (var f = 0; f < t.length; f++) { var p = t[f]; if (Array.isArray(p)) { var d = p[1], h = p[2], m = p.length > 3, y = 16 & d, v = !!(8 & d), g = 0 == (d &= 7), b = h + "/" + v; if (!g && !m) { var w = u.get(b); if (!0 === w || 3 === w && 4 !== d || 4 === w && 3 !== d) throw Error("Attempted to decorate a public method/accessor that has the same name as a previously decorated public method/accessor. This is not currently supported by the decorators plugin. Property name was: " + h); u.set(b, !(d > 2) || d); } applyDec(v ? e : e.prototype, p, y, m ? "#" + h : _toPropertyKey(h), d, n, v ? a = a || [] : o = o || [], i, v, m, g, 1 === d, v && m ? s : r); } } return l(o), l(a), i; }(e, t, o, f); return r.length || u(e, f), { e: p, get c() { var t = []; return r.length && [u(applyDec(e, [r], n, e.name, 5, f, t), f), c.bind(null, t, e)]; } }; }
20
+ function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : i + ""; }
21
+ function _toPrimitive(t, r) { if ("object" != typeof t || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != typeof i) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
22
+ function _setFunctionName(e, t, n) { "symbol" == typeof t && (t = (t = t.description) ? "[" + t + "]" : ""); try { Object.defineProperty(e, "name", { configurable: !0, value: n ? n + " " + t : t }); } catch (e) {} return e; }
23
+ function _checkInRHS(e) { if (Object(e) !== e) throw TypeError("right-hand side of 'in' should be an object, got " + (null !== e ? typeof e : "null")); return e; }
24
+ import { trace } from '../imports';
25
+ /**
26
+ * @internal
27
+ */
28
+ export class FcrMonitorControlImpl {
29
+ static {
30
+ [_initProto] = _applyDecs(this, [[_uploadEventDecs, 2, "uploadEvent"]], []).e;
31
+ }
32
+ [(_uploadEventDecs = trace(['event']), "_monitor")] = void _initProto(this);
33
+ constructor(engine, _config) {
34
+ this._config = _config;
35
+ this._monitor = engine.getMonitor();
36
+ }
37
+ async uploadEvent(event) {
38
+ return this._monitor.uploadEvent(event);
39
+ }
40
+ addObserver(observer) {
41
+ this._monitor.addObserver(observer);
42
+ }
43
+ removeObserver(observer) {
44
+ this._monitor.addObserver(observer);
45
+ }
46
+ }
@@ -0,0 +1 @@
1
+ export {};