videomail-client 15.8.1 → 15.8.2

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/esm/index.js CHANGED
@@ -3620,7 +3620,7 @@ const constants = {
3620
3620
  }
3621
3621
  };
3622
3622
  var package_namespaceObject = {
3623
- rE: "15.8.1"
3623
+ rE: "15.8.2"
3624
3624
  };
3625
3625
  function isAudioEnabled(options) {
3626
3626
  return Boolean(options.audio.enabled);
@@ -3991,6 +3991,7 @@ function createError(errorParams) {
3991
3991
  ].filter(Boolean).join(", ");
3992
3992
  options.logger.debug(`VideomailError: create(${args})`);
3993
3993
  const errData = {
3994
+ cause: errorParams.cause,
3994
3995
  explanation,
3995
3996
  logLines,
3996
3997
  err
@@ -4118,12 +4119,12 @@ function showElement(element) {
4118
4119
  element.style.removeProperty("display");
4119
4120
  }
4120
4121
  const html_showElement = showElement;
4121
- const REGEX = /[ ,]+/u;
4122
+ const EMAIL_SEPARATOR_REGEX = /[ ,]+/gu;
4122
4123
  function trimEmail(email) {
4123
- return email.replace(REGEX, "");
4124
+ return email.replace(EMAIL_SEPARATOR_REGEX, "");
4124
4125
  }
4125
4126
  function trimEmails(emails) {
4126
- const trimmedEmails = emails.split(REGEX).map((item)=>item.trim()).filter(Boolean);
4127
+ const trimmedEmails = emails.split(EMAIL_SEPARATOR_REGEX).map((item)=>item.trim()).filter(Boolean);
4127
4128
  return trimmedEmails;
4128
4129
  }
4129
4130
  function form_define_property(obj, key, value) {
@@ -4499,6 +4500,7 @@ class Resource {
4499
4500
  browser: err.browser,
4500
4501
  code: err.code,
4501
4502
  cookie: err.cookie,
4503
+ cause: err.cause instanceof Error ? serializeError(err.cause) : err.cause,
4502
4504
  cpu: err.cpu,
4503
4505
  device: err.device,
4504
4506
  engine: err.engine,
@@ -6158,6 +6160,34 @@ function summarize(title, contents) {
6158
6160
  return line;
6159
6161
  }
6160
6162
  const util_summarize = summarize;
6163
+ function getFirstVideoTrack(localMediaStream) {
6164
+ const videoTracks = localMediaStream.getVideoTracks();
6165
+ let videoTrack;
6166
+ if (videoTracks[0]) videoTrack = videoTracks[0];
6167
+ return videoTrack;
6168
+ }
6169
+ const media_getFirstVideoTrack = getFirstVideoTrack;
6170
+ const MEDIA_EVENTS = [
6171
+ "loadstart",
6172
+ "suspend",
6173
+ "progress",
6174
+ "abort",
6175
+ "emptied",
6176
+ "stalled",
6177
+ "pause",
6178
+ "loadeddata",
6179
+ "waiting",
6180
+ "playing",
6181
+ "canplay",
6182
+ "canplaythrough",
6183
+ "seeking",
6184
+ "seeked",
6185
+ "ended",
6186
+ "ratechange",
6187
+ "durationchange",
6188
+ "volumechange"
6189
+ ];
6190
+ const mediaEvents = MEDIA_EVENTS;
6161
6191
  function AudioRecorder_define_property(obj, key, value) {
6162
6192
  if (key in obj) Object.defineProperty(obj, key, {
6163
6193
  value: value,
@@ -6203,11 +6233,11 @@ class AudioRecorder {
6203
6233
  let { bufferSize } = this.options.audio;
6204
6234
  if ("auto" === bufferSize) bufferSize = util_getBrowser(this.options).isFirefox() ? 512 : 2048;
6205
6235
  if (!is_power_of_two(bufferSize)) throw error_createError({
6206
- message: "Audio buffer size must be a power of two.",
6236
+ message: `Audio buffer size must be a power of two. The current buffer size is ${bufferSize}.`,
6207
6237
  options: this.options
6208
6238
  });
6209
- if (this.options.audio.volume < 0 || this.options.audio.volume > 1) throw error_createError({
6210
- message: "Audio volume must be between zero and one.",
6239
+ if (!Number.isFinite(this.options.audio.volume) || this.options.audio.volume < 0 || this.options.audio.volume > 1) throw error_createError({
6240
+ message: `Audio volume must be between zero and one. The current volume is ${this.options.audio.volume}.`,
6211
6241
  options: this.options
6212
6242
  });
6213
6243
  volume.gain.value = this.options.audio.volume;
@@ -6253,34 +6283,6 @@ class AudioRecorder {
6253
6283
  }
6254
6284
  }
6255
6285
  const media_AudioRecorder = AudioRecorder;
6256
- function getFirstVideoTrack(localMediaStream) {
6257
- const videoTracks = localMediaStream.getVideoTracks();
6258
- let videoTrack;
6259
- if (videoTracks[0]) videoTrack = videoTracks[0];
6260
- return videoTrack;
6261
- }
6262
- const media_getFirstVideoTrack = getFirstVideoTrack;
6263
- const MEDIA_EVENTS = [
6264
- "loadstart",
6265
- "suspend",
6266
- "progress",
6267
- "abort",
6268
- "emptied",
6269
- "stalled",
6270
- "pause",
6271
- "loadeddata",
6272
- "waiting",
6273
- "playing",
6274
- "canplay",
6275
- "canplaythrough",
6276
- "seeking",
6277
- "seeked",
6278
- "ended",
6279
- "ratechange",
6280
- "durationchange",
6281
- "volumechange"
6282
- ];
6283
- const mediaEvents = MEDIA_EVENTS;
6284
6286
  const VIRTUAL_KEYWORDS = [
6285
6287
  "obs",
6286
6288
  "virtual",
@@ -6684,6 +6686,7 @@ class Recorder extends util_Despot {
6684
6686
  const switchingFacingMode = params?.switchingFacingMode;
6685
6687
  this.userMediaLoading = this.blocking = this.unloaded = this.submitting = false;
6686
6688
  this.userMediaLoaded = true;
6689
+ this.clearUserMediaTimeout();
6687
6690
  if (!switchingFacingMode) this.loop = this.createLoop();
6688
6691
  this.show();
6689
6692
  if (params?.recordWhenReady) this.record();
@@ -6729,12 +6732,17 @@ class Recorder extends util_Despot {
6729
6732
  closeReason: closeEvent?.reason,
6730
6733
  elapsedMs,
6731
6734
  online,
6735
+ secureContext: globalThis.isSecureContext,
6736
+ socketReadyState: this.stream?.socket.readyState,
6737
+ timeoutMs: this.options.timeouts.connection,
6738
+ url: url2Connect,
6732
6739
  unloaded: this.unloaded,
6733
6740
  userMediaLoaded: this.userMediaLoaded,
6734
6741
  userMediaLoading: this.userMediaLoading,
6735
6742
  wasClean: closeEvent?.wasClean,
6736
6743
  socketError,
6737
- blocking: this.blocking
6744
+ blocking: this.blocking,
6745
+ visibilityState: document.visibilityState
6738
6746
  };
6739
6747
  const debugLine = util_summarize("Recorder: failConnection() diagnostic", contents);
6740
6748
  this.options.logger.debug(debugLine);
@@ -6754,6 +6762,7 @@ class Recorder extends util_Despot {
6754
6762
  message: "Unable to connect to the server",
6755
6763
  explanation,
6756
6764
  options: this.options,
6765
+ cause: contents,
6757
6766
  exc: socketError ? new Error("WebSocket connection error", {
6758
6767
  cause: socketError
6759
6768
  }) : void 0
@@ -6831,195 +6840,195 @@ class Recorder extends util_Despot {
6831
6840
  this.recordingStats.waitingTime = this.waitingTime;
6832
6841
  }
6833
6842
  initSocket(cb) {
6834
- if (!this.connected) {
6835
- if (util_isAutomatedUserAgent()) {
6836
- this.connecting = false;
6837
- this.options.logger.debug("Recorder: skipping web socket connection for an automated crawler");
6838
- return;
6839
- }
6840
- this.connecting = true;
6841
- this.connectionFailed = false;
6842
- this.connectingStartedAt = Date.now();
6843
- this.lastCloseEvent = void 0;
6844
- this.lastSocketError = void 0;
6845
- this.emit("CONNECTING");
6846
- let url2Connect;
6847
- try {
6848
- const socketUrlObj = new URL(this.options.socketUrl);
6849
- socketUrlObj.searchParams.set(constants.WHITELIST_KEY_LABEL, this.options.whitelistKey);
6850
- url2Connect = socketUrlObj.toString();
6851
- } catch (exc) {
6852
- this.connecting = this.connected = false;
6853
- const err = error_createError({
6854
- message: "Invalid WebSocket URL",
6855
- explanation: `The configured socketUrl "${this.options.socketUrl}" is not a valid URL. Please check your videomail-client configuration.`,
6856
- options: this.options,
6857
- exc
6858
- });
6859
- this.emit("ERROR", {
6860
- err
6861
- });
6862
- return;
6863
- }
6864
- this.options.logger.debug(`Recorder: initializing web socket stream to ${url2Connect}`);
6865
- let nativeSocket;
6866
- try {
6867
- nativeSocket = new WebSocket(url2Connect);
6868
- nativeSocket.addEventListener("close", (event)=>{
6869
- this.lastCloseEvent = {
6870
- code: event.code,
6871
- reason: event.reason,
6872
- wasClean: event.wasClean
6873
- };
6874
- });
6875
- nativeSocket.addEventListener("error", (event)=>{
6876
- this.lastSocketError = error_getEventDetails(event);
6877
- });
6878
- } catch (exc) {
6879
- this.connecting = this.connected = false;
6880
- const diagnostic = error_getWebSocketDiagnostic(url2Connect);
6881
- const message = diagnostic.looksAutomated ? "Automated crawler: WebSocket not supported in this environment" : `Failed to construct WebSocket to ${url2Connect}`;
6882
- const explanation = diagnostic.looksAutomated ? "Headless crawlers cannot use Videomail's WebSocket. No action needed." : `Please check your connection and try again. If the problem persists, contact us. Diagnostic: ${diagnostic.text}`;
6883
- const err = error_createError({
6884
- message,
6885
- explanation,
6886
- options: this.options,
6887
- exc
6888
- });
6889
- this.emit("ERROR", {
6890
- err
6891
- });
6892
- return;
6893
- }
6894
- try {
6895
- this.stream = websocket_stream(nativeSocket);
6896
- } catch (exc) {
6897
- this.connecting = this.connected = false;
6898
- const err = error_createError({
6899
- message: `Failed to create a stream to ${url2Connect}`,
6900
- explanation: "Please check your connection and try again. If the problem persists, contact us.",
6901
- options: this.options,
6902
- exc
6903
- });
6904
- this.emit("ERROR", {
6905
- err
6906
- });
6907
- }
6908
- if (this.stream) {
6909
- const connectionTimeoutMs = this.options.timeouts.connection;
6910
- this.connectionTimeout = window.setTimeout(()=>{
6911
- if (this.isOnline() && this.isUserMediaLoaded()) {
6912
- this.options.logger.debug(`${PIPE_SYMBOL}Reconnecting due to connection timeout.`);
6913
- this.initSocket();
6914
- } else this.failConnection({
6915
- url2Connect,
6916
- cause: "timeout"
6917
- });
6918
- }, connectionTimeoutMs);
6919
- this.stream.on("close", ()=>{
6920
- const debugLine = util_summarize(`${PIPE_SYMBOL}Stream has closed:`, {
6921
- connecting: this.connecting,
6922
- connected: this.connected,
6923
- userMediaLoaded: this.userMediaLoaded,
6924
- blocking: this.blocking
6925
- });
6926
- this.options.logger.debug(debugLine);
6927
- const tryReconnect = this.connected && this.userMediaLoaded;
6928
- this.connected = false;
6929
- if (tryReconnect) this.initSocket();
6930
- else if (!this.connecting && !this.blocking) window.setTimeout(()=>{
6931
- this.failConnection({
6932
- url2Connect,
6933
- cause: "closed"
6934
- });
6935
- }, 0);
6936
- });
6937
- this.stream.on("connect", (args)=>{
6938
- this.options.logger.debug(`${PIPE_SYMBOL}Stream *connect* event emitted with args: ${util_pretty(args)}`);
6939
- this.clearConnectionTimeout();
6940
- const isClosing = this.stream?.socket.readyState === WebSocket.CLOSING;
6941
- if (!this.connected && !isClosing && !this.unloaded) {
6942
- this.connected = true;
6943
- this.connecting = this.unloaded = false;
6944
- this.emit("CONNECTED");
6945
- cb?.();
6946
- }
6843
+ if (this.connected) return void cb?.();
6844
+ if (this.connecting) return;
6845
+ if (util_isAutomatedUserAgent()) {
6846
+ this.connecting = false;
6847
+ this.options.logger.debug("Recorder: skipping web socket connection for an automated crawler");
6848
+ return;
6849
+ }
6850
+ this.connecting = true;
6851
+ this.connectionFailed = false;
6852
+ this.connectingStartedAt = Date.now();
6853
+ this.lastCloseEvent = void 0;
6854
+ this.lastSocketError = void 0;
6855
+ this.emit("CONNECTING");
6856
+ let url2Connect;
6857
+ try {
6858
+ const socketUrlObj = new URL(this.options.socketUrl);
6859
+ socketUrlObj.searchParams.set(constants.WHITELIST_KEY_LABEL, this.options.whitelistKey);
6860
+ url2Connect = socketUrlObj.toString();
6861
+ } catch (exc) {
6862
+ this.connecting = this.connected = false;
6863
+ const err = error_createError({
6864
+ message: "Invalid WebSocket URL",
6865
+ explanation: `The configured socketUrl "${this.options.socketUrl}" is not a valid URL. Please check your videomail-client configuration.`,
6866
+ options: this.options,
6867
+ exc
6868
+ });
6869
+ this.emit("ERROR", {
6870
+ err
6871
+ });
6872
+ return;
6873
+ }
6874
+ this.options.logger.debug(`Recorder: initializing web socket stream to ${url2Connect}`);
6875
+ let nativeSocket;
6876
+ try {
6877
+ nativeSocket = new WebSocket(url2Connect);
6878
+ nativeSocket.addEventListener("close", (event)=>{
6879
+ this.lastCloseEvent = {
6880
+ code: event.code,
6881
+ reason: event.reason,
6882
+ wasClean: event.wasClean
6883
+ };
6884
+ });
6885
+ nativeSocket.addEventListener("error", (event)=>{
6886
+ this.lastSocketError = error_getEventDetails(event);
6887
+ });
6888
+ } catch (exc) {
6889
+ this.connecting = this.connected = false;
6890
+ const diagnostic = error_getWebSocketDiagnostic(url2Connect);
6891
+ const message = diagnostic.looksAutomated ? "Automated crawler: WebSocket not supported in this environment" : `Failed to construct WebSocket to ${url2Connect}`;
6892
+ const explanation = diagnostic.looksAutomated ? "Headless crawlers cannot use Videomail's WebSocket. No action needed." : `Please check your connection and try again. If the problem persists, contact us. Diagnostic: ${diagnostic.text}`;
6893
+ const err = error_createError({
6894
+ message,
6895
+ explanation,
6896
+ options: this.options,
6897
+ exc
6898
+ });
6899
+ this.emit("ERROR", {
6900
+ err
6901
+ });
6902
+ return;
6903
+ }
6904
+ try {
6905
+ this.stream = websocket_stream(nativeSocket);
6906
+ } catch (exc) {
6907
+ this.connecting = this.connected = false;
6908
+ const err = error_createError({
6909
+ message: `Failed to create a stream to ${url2Connect}`,
6910
+ explanation: "Please check your connection and try again. If the problem persists, contact us.",
6911
+ options: this.options,
6912
+ exc
6913
+ });
6914
+ this.emit("ERROR", {
6915
+ err
6916
+ });
6917
+ }
6918
+ if (this.stream) {
6919
+ const connectionTimeoutMs = this.options.timeouts.connection;
6920
+ this.connectionTimeout = window.setTimeout(()=>{
6921
+ if (this.isOnline() && this.isUserMediaLoaded()) {
6922
+ this.options.logger.debug(`${PIPE_SYMBOL}Reconnecting due to connection timeout.`);
6923
+ this.initSocket();
6924
+ } else this.failConnection({
6925
+ url2Connect,
6926
+ cause: "timeout"
6947
6927
  });
6948
- this.stream.on("data", (data)=>{
6949
- this.options.logger.debug(`${PIPE_SYMBOL}Stream *data* event emitted`);
6950
- try {
6951
- const command = JSON.parse(data.toString());
6952
- this.executeCommand(command);
6953
- } catch (exc) {
6954
- this.options.logger.error(`Failed to parse command: ${exc}`);
6955
- const err = error_createError({
6956
- message: "Invalid server command",
6957
- explanation: `Contact us. The invalid command was: ${data.toString()}.`,
6958
- options: this.options,
6959
- exc
6960
- });
6961
- this.emit("ERROR", {
6962
- err
6963
- });
6964
- }
6928
+ }, connectionTimeoutMs);
6929
+ this.stream.on("close", ()=>{
6930
+ const debugLine = util_summarize(`${PIPE_SYMBOL}Stream has closed:`, {
6931
+ connecting: this.connecting,
6932
+ connected: this.connected,
6933
+ userMediaLoaded: this.userMediaLoaded,
6934
+ blocking: this.blocking
6965
6935
  });
6966
- this.stream.on("error", (err)=>{
6967
- if ("u" > typeof Event && err instanceof Event) this.lastSocketError = error_getEventDetails(err);
6968
- else this.lastSocketError = serializeError(err);
6969
- const debugLine = util_summarize(`${PIPE_SYMBOL}Stream *error* event emitted:`, {
6970
- error: serializeError(err)
6971
- });
6972
- this.options.logger.debug(debugLine);
6973
- if (!this.connected) return void this.failConnection({
6936
+ this.options.logger.debug(debugLine);
6937
+ const tryReconnect = this.connected && this.userMediaLoaded;
6938
+ this.connected = false;
6939
+ if (tryReconnect) this.initSocket();
6940
+ else if (!this.connecting && !this.blocking) window.setTimeout(()=>{
6941
+ this.failConnection({
6974
6942
  url2Connect,
6975
- cause: "error"
6943
+ cause: "closed"
6976
6944
  });
6977
- const streamError = err instanceof Error ? err : new Error("WebSocket stream emitted an error event", {
6978
- cause: this.lastSocketError ?? err
6945
+ }, 0);
6946
+ });
6947
+ this.stream.on("connect", (args)=>{
6948
+ this.options.logger.debug(`${PIPE_SYMBOL}Stream *connect* event emitted with args: ${util_pretty(args)}`);
6949
+ this.clearConnectionTimeout();
6950
+ const isClosing = this.stream?.socket.readyState === WebSocket.CLOSING;
6951
+ if (!this.connected && !isClosing && !this.unloaded) {
6952
+ this.connected = true;
6953
+ this.connecting = this.unloaded = false;
6954
+ this.emit("CONNECTED");
6955
+ cb?.();
6956
+ }
6957
+ });
6958
+ this.stream.on("data", (data)=>{
6959
+ this.options.logger.debug(`${PIPE_SYMBOL}Stream *data* event emitted`);
6960
+ try {
6961
+ const command = JSON.parse(data.toString());
6962
+ this.executeCommand(command);
6963
+ } catch (exc) {
6964
+ this.options.logger.error(`Failed to parse command: ${exc}`);
6965
+ const err = error_createError({
6966
+ message: "Invalid server command",
6967
+ explanation: `Contact us. The invalid command was: ${data.toString()}.`,
6968
+ options: this.options,
6969
+ exc
6979
6970
  });
6980
6971
  this.emit("ERROR", {
6981
- err: error_createError({
6982
- message: "WebSocket stream error",
6983
- explanation: `The WebSocket stream emitted an error event. Details: ${util_pretty(err)}`,
6984
- options: this.options,
6985
- exc: streamError
6986
- })
6972
+ err
6987
6973
  });
6974
+ }
6975
+ });
6976
+ this.stream.on("error", (err)=>{
6977
+ if ("u" > typeof Event && err instanceof Event) this.lastSocketError = error_getEventDetails(err);
6978
+ else this.lastSocketError = serializeError(err);
6979
+ const debugLine = util_summarize(`${PIPE_SYMBOL}Stream *error* event emitted:`, {
6980
+ error: serializeError(err)
6988
6981
  });
6989
- this.stream.on("drain", ()=>{
6990
- this.options.logger.debug(`${PIPE_SYMBOL}Stream *drain* event emitted (should not happen!)`);
6991
- });
6992
- this.stream.on("preend", (args)=>{
6993
- this.options.logger.debug(`${PIPE_SYMBOL}Stream *preend* event emitted with args: ${util_pretty(args)}`);
6994
- });
6995
- this.stream.on("end", ()=>{
6996
- this.options.logger.debug(`${PIPE_SYMBOL}Stream *end* event emitted`);
6997
- });
6998
- this.stream.on("drain", (args)=>{
6999
- this.options.logger.debug(`${PIPE_SYMBOL}Stream *drain* event emitted with args: ${util_pretty(args)}`);
7000
- });
7001
- this.stream.on("pipe", (src)=>{
7002
- this.options.logger.debug(`${PIPE_SYMBOL}Stream *pipe* event emitted with src: ${util_pretty(src)}`);
7003
- });
7004
- this.stream.on("unpipe", (src)=>{
7005
- this.options.logger.debug(`${PIPE_SYMBOL}Stream *unpipe* event emitted with src: ${util_pretty(src)}`);
7006
- });
7007
- this.stream.on("resume", (args)=>{
7008
- this.options.logger.debug(`${PIPE_SYMBOL}Stream *resume* event emitted with args: ${util_pretty(args)}`);
7009
- });
7010
- this.stream.on("uncork", (args)=>{
7011
- this.options.logger.debug(`${PIPE_SYMBOL}Stream *uncork* event emitted with args: ${util_pretty(args)}`);
7012
- });
7013
- this.stream.on("readable", (args)=>{
7014
- this.options.logger.debug(`${PIPE_SYMBOL}Stream *readable* event emitted with args: ${util_pretty(args)}`);
6982
+ this.options.logger.debug(debugLine);
6983
+ if (!this.connected) return void this.failConnection({
6984
+ url2Connect,
6985
+ cause: "error"
7015
6986
  });
7016
- this.stream.on("prefinish", (args)=>{
7017
- this.options.logger.debug(`${PIPE_SYMBOL}Stream *prefinish* event emitted with args: ${util_pretty(args)}`);
6987
+ const streamError = err instanceof Error ? err : new Error("WebSocket stream emitted an error event", {
6988
+ cause: this.lastSocketError ?? err
7018
6989
  });
7019
- this.stream.on("finish", (args)=>{
7020
- this.options.logger.debug(`${PIPE_SYMBOL}Stream *finish* event emitted with args: ${util_pretty(args)}`);
6990
+ this.emit("ERROR", {
6991
+ err: error_createError({
6992
+ message: "WebSocket stream error",
6993
+ explanation: `The WebSocket stream emitted an error event. Details: ${util_pretty(err)}`,
6994
+ options: this.options,
6995
+ exc: streamError
6996
+ })
7021
6997
  });
7022
- }
6998
+ });
6999
+ this.stream.on("drain", ()=>{
7000
+ this.options.logger.debug(`${PIPE_SYMBOL}Stream *drain* event emitted (should not happen!)`);
7001
+ });
7002
+ this.stream.on("preend", (args)=>{
7003
+ this.options.logger.debug(`${PIPE_SYMBOL}Stream *preend* event emitted with args: ${util_pretty(args)}`);
7004
+ });
7005
+ this.stream.on("end", ()=>{
7006
+ this.options.logger.debug(`${PIPE_SYMBOL}Stream *end* event emitted`);
7007
+ });
7008
+ this.stream.on("drain", (args)=>{
7009
+ this.options.logger.debug(`${PIPE_SYMBOL}Stream *drain* event emitted with args: ${util_pretty(args)}`);
7010
+ });
7011
+ this.stream.on("pipe", (src)=>{
7012
+ this.options.logger.debug(`${PIPE_SYMBOL}Stream *pipe* event emitted with src: ${util_pretty(src)}`);
7013
+ });
7014
+ this.stream.on("unpipe", (src)=>{
7015
+ this.options.logger.debug(`${PIPE_SYMBOL}Stream *unpipe* event emitted with src: ${util_pretty(src)}`);
7016
+ });
7017
+ this.stream.on("resume", (args)=>{
7018
+ this.options.logger.debug(`${PIPE_SYMBOL}Stream *resume* event emitted with args: ${util_pretty(args)}`);
7019
+ });
7020
+ this.stream.on("uncork", (args)=>{
7021
+ this.options.logger.debug(`${PIPE_SYMBOL}Stream *uncork* event emitted with args: ${util_pretty(args)}`);
7022
+ });
7023
+ this.stream.on("readable", (args)=>{
7024
+ this.options.logger.debug(`${PIPE_SYMBOL}Stream *readable* event emitted with args: ${util_pretty(args)}`);
7025
+ });
7026
+ this.stream.on("prefinish", (args)=>{
7027
+ this.options.logger.debug(`${PIPE_SYMBOL}Stream *prefinish* event emitted with args: ${util_pretty(args)}`);
7028
+ });
7029
+ this.stream.on("finish", (args)=>{
7030
+ this.options.logger.debug(`${PIPE_SYMBOL}Stream *finish* event emitted with args: ${util_pretty(args)}`);
7031
+ });
7023
7032
  }
7024
7033
  }
7025
7034
  showUserMedia() {
@@ -1,3 +1,3 @@
1
- import { VideoTypeType } from "./../../../types/VideoType.js";
1
+ import { VideoTypeType } from "../types/VideoType.js";
2
2
  declare function canPlayType(video: HTMLVideoElement, type: VideoTypeType): false | "maybe" | "probably";
3
3
  export default canPlayType;
@@ -2,6 +2,7 @@ import { VideomailClientOptions } from "../../types/options.js";
2
2
  import HTTPVideomailError from "./HTTPVideomailError.js";
3
3
  import VideomailError from "./VideomailError.js";
4
4
  interface ErrorParams {
5
+ cause?: unknown;
5
6
  err?: HTTPVideomailError;
6
7
  exc?: unknown;
7
8
  message?: string;