|
5 | 5 | else root["VideomailClient"] = factory(); |
6 | 6 | })(globalThis, ()=>(()=>{ |
7 | 7 | var __webpack_modules__ = { |
8 | | - "./node_modules/@rsbuild/core/compiled/css-loader/index.js??ruleSet[1].rules[13].use[1]!builtin:lightningcss-loader??ruleSet[1].rules[13].use[2]!./node_modules/stylus-loader/dist/cjs.js??ruleSet[1].rules[13].use[3]!./src/styles/main.styl" (module1, __webpack_exports__, __webpack_require__) { |
| 8 | + "./node_modules/@rsbuild/core/compiled/css-loader/index.js??ruleSet[1].rules[10].oneOf[2].use[1]!builtin:lightningcss-loader??ruleSet[1].rules[10].oneOf[2].use[2]!./node_modules/stylus-loader/dist/cjs.js??ruleSet[1].rules[10].oneOf[2].use[3]!./src/styles/main.styl" (module1, __webpack_exports__, __webpack_require__) { |
9 | 9 | "use strict"; |
10 | 10 | __webpack_require__.d(__webpack_exports__, { |
11 | 11 | A: ()=>__rspack_default_export |
|
2265 | 2265 | this.decoder = null; |
2266 | 2266 | this.encoding = null; |
2267 | 2267 | if (options.encoding) { |
2268 | | - if (!StringDecoder) StringDecoder = __webpack_require__("./node_modules/duplexify/node_modules/string_decoder/lib/string_decoder.js").StringDecoder; |
| 2268 | + if (!StringDecoder) StringDecoder = __webpack_require__("./node_modules/duplexify/node_modules/string_decoder/lib/string_decoder.js").I; |
2269 | 2269 | this.decoder = new StringDecoder(options.encoding); |
2270 | 2270 | this.encoding = options.encoding; |
2271 | 2271 | } |
|
2364 | 2364 | return false === this._readableState.flowing; |
2365 | 2365 | }; |
2366 | 2366 | Readable.prototype.setEncoding = function(enc) { |
2367 | | - if (!StringDecoder) StringDecoder = __webpack_require__("./node_modules/duplexify/node_modules/string_decoder/lib/string_decoder.js").StringDecoder; |
| 2367 | + if (!StringDecoder) StringDecoder = __webpack_require__("./node_modules/duplexify/node_modules/string_decoder/lib/string_decoder.js").I; |
2368 | 2368 | this._readableState.decoder = new StringDecoder(enc); |
2369 | 2369 | this._readableState.encoding = enc; |
2370 | 2370 | return this; |
|
3557 | 3557 | if ('string' != typeof nenc && (Buffer.isEncoding === isEncoding || !isEncoding(enc))) throw new Error('Unknown encoding: ' + enc); |
3558 | 3558 | return nenc || enc; |
3559 | 3559 | } |
3560 | | - exports1.StringDecoder = StringDecoder; |
| 3560 | + exports1.I = StringDecoder; |
3561 | 3561 | function StringDecoder(encoding) { |
3562 | 3562 | this.encoding = normalizeEncoding(encoding); |
3563 | 3563 | var nb; |
|
8599 | 8599 | this.decoder = null; |
8600 | 8600 | this.encoding = null; |
8601 | 8601 | if (options.encoding) { |
8602 | | - if (!StringDecoder) StringDecoder = __webpack_require__("./node_modules/websocket-stream/node_modules/string_decoder/lib/string_decoder.js").StringDecoder; |
| 8602 | + if (!StringDecoder) StringDecoder = __webpack_require__("./node_modules/websocket-stream/node_modules/string_decoder/lib/string_decoder.js").I; |
8603 | 8603 | this.decoder = new StringDecoder(options.encoding); |
8604 | 8604 | this.encoding = options.encoding; |
8605 | 8605 | } |
|
8698 | 8698 | return false === this._readableState.flowing; |
8699 | 8699 | }; |
8700 | 8700 | Readable.prototype.setEncoding = function(enc) { |
8701 | | - if (!StringDecoder) StringDecoder = __webpack_require__("./node_modules/websocket-stream/node_modules/string_decoder/lib/string_decoder.js").StringDecoder; |
| 8701 | + if (!StringDecoder) StringDecoder = __webpack_require__("./node_modules/websocket-stream/node_modules/string_decoder/lib/string_decoder.js").I; |
8702 | 8702 | this._readableState.decoder = new StringDecoder(enc); |
8703 | 8703 | this._readableState.encoding = enc; |
8704 | 8704 | return this; |
|
9891 | 9891 | if ('string' != typeof nenc && (Buffer.isEncoding === isEncoding || !isEncoding(enc))) throw new Error('Unknown encoding: ' + enc); |
9892 | 9892 | return nenc || enc; |
9893 | 9893 | } |
9894 | | - exports1.StringDecoder = StringDecoder; |
| 9894 | + exports1.I = StringDecoder; |
9895 | 9895 | function StringDecoder(encoding) { |
9896 | 9896 | this.encoding = normalizeEncoding(encoding); |
9897 | 9897 | var nb; |
|
10832 | 10832 | var client = __webpack_require__("./node_modules/superagent/lib/client.js"); |
10833 | 10833 | var client_default = /*#__PURE__*/ __webpack_require__.n(client); |
10834 | 10834 | var package_namespaceObject = { |
10835 | | - rE: "13.7.3" |
| 10835 | + rE: "13.8.3" |
10836 | 10836 | }; |
10837 | 10837 | function isAudioEnabled(options) { |
10838 | 10838 | return Boolean(options.audio.enabled); |
|
14852 | 14852 | const queryParams = { |
14853 | 14853 | [constants.WHITELIST_KEY_LABEL]: this.options.whitelistKey |
14854 | 14854 | }; |
14855 | | - let url = `${this.options.apiUrl}/videomail/`; |
| 14855 | + const path = videomail.public ? "wall" : "videomail"; |
| 14856 | + let url = `${this.options.apiUrl}/${path}/`; |
14856 | 14857 | if (method === FormMethod.PUT && videomail.key) url += videomail.key; |
14857 | 14858 | try { |
14858 | 14859 | const request = await client_default()(method, url).query(queryParams).set("Timezone-Id", this.timezoneId).withCredentials().send(videomail).timeout(this.options.timeouts.connection); |
|
15159 | 15160 | var insertStyleElement_default = /*#__PURE__*/ __webpack_require__.n(insertStyleElement); |
15160 | 15161 | var styleTagTransform = __webpack_require__("./node_modules/@rsbuild/core/compiled/style-loader/runtime/styleTagTransform.js"); |
15161 | 15162 | var styleTagTransform_default = /*#__PURE__*/ __webpack_require__.n(styleTagTransform); |
15162 | | - var main = __webpack_require__("./node_modules/@rsbuild/core/compiled/css-loader/index.js??ruleSet[1].rules[13].use[1]!builtin:lightningcss-loader??ruleSet[1].rules[13].use[2]!./node_modules/stylus-loader/dist/cjs.js??ruleSet[1].rules[13].use[3]!./src/styles/main.styl"); |
| 15163 | + var main = __webpack_require__("./node_modules/@rsbuild/core/compiled/css-loader/index.js??ruleSet[1].rules[10].oneOf[2].use[1]!builtin:lightningcss-loader??ruleSet[1].rules[10].oneOf[2].use[2]!./node_modules/stylus-loader/dist/cjs.js??ruleSet[1].rules[10].oneOf[2].use[3]!./src/styles/main.styl"); |
15163 | 15164 | var main_options = {}; |
15164 | 15165 | main_options.styleTagTransform = styleTagTransform_default(); |
15165 | 15166 | main_options.setAttributes = setAttributesWithoutAttributes_default(); |
@@ -17059,15 +17060,12 @@ |
17059 | 17060 | const url2Connect = `${this.options.socketUrl}?${encodeURIComponent(constants.WHITELIST_KEY_LABEL)}=${encodeURIComponent(this.options.whitelistKey)}`; |
17060 | 17061 | this.options.logger.debug(`Recorder: initializing web socket to ${url2Connect}`); |
17061 | 17062 | try { |
17062 | | - this.stream = stream_default()(url2Connect, { |
17063 | | - perMessageDeflate: false, |
17064 | | - objectMode: true |
17065 | | - }); |
| 17063 | + this.stream = stream_default()(url2Connect); |
17066 | 17064 | } catch (exc) { |
17067 | 17065 | this.connecting = this.connected = false; |
17068 | 17066 | const err = error_createError({ |
17069 | 17067 | message: "Failed to connect to server", |
17070 | | - explanation: "Please upgrade your browser. Your current version does not seem to support websockets.", |
| 17068 | + explanation: "If this happens again, please contact us with the details of your environment.", |
17071 | 17069 | options: this.options, |
17072 | 17070 | exc |
17073 | 17071 | }); |
|
17096 | 17094 | }); |
17097 | 17095 | this.stream.on("data", (data)=>{ |
17098 | 17096 | this.options.logger.debug(`${PIPE_SYMBOL}Stream *data* event emitted`); |
17099 | | - let command; |
17100 | 17097 | try { |
17101 | | - command = JSON.parse(data.toString()); |
| 17098 | + const command = JSON.parse(data.toString()); |
| 17099 | + this.executeCommand(command); |
17102 | 17100 | } catch (exc) { |
17103 | 17101 | this.options.logger.debug(`Failed to parse command: ${exc}`); |
17104 | 17102 | const err = error_createError({ |
|
17110 | 17108 | this.emit("ERROR", { |
17111 | 17109 | err |
17112 | 17110 | }); |
17113 | | - } finally{ |
17114 | | - this.executeCommand(command); |
17115 | 17111 | } |
17116 | 17112 | }); |
17117 | 17113 | this.stream.on("error", (err)=>{ |
@@ -17370,14 +17366,17 @@ |
17370 | 17366 | this.loop?.dispose(); |
17371 | 17367 | } |
17372 | 17368 | getIntervalSum() { |
| 17369 | + if (!this.loop) return; |
17373 | 17370 | return this.loop.getElapsedTime(); |
17374 | 17371 | } |
17375 | 17372 | getAvgInterval() { |
17376 | | - return this.getIntervalSum() / this.framesCount; |
| 17373 | + const intervalSum = this.getIntervalSum(); |
| 17374 | + if (!intervalSum) return; |
| 17375 | + return intervalSum / this.framesCount; |
17377 | 17376 | } |
17378 | 17377 | getAvgFps() { |
17379 | 17378 | const intervalSum = this.getIntervalSum(); |
17380 | | - if (0 === intervalSum || null == intervalSum) return; |
| 17379 | + if (!intervalSum) return; |
17381 | 17380 | return this.framesCount / intervalSum * 1000; |
17382 | 17381 | } |
17383 | 17382 | getRecordingStats() { |
|
0 commit comments