videomail-client 13.15.0 → 13.15.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.
@@ -10876,7 +10876,7 @@ var __webpack_exports__ = {};
10876
10876
  var client = __webpack_require__(5734);
10877
10877
  var client_default = /*#__PURE__*/ __webpack_require__.n(client);
10878
10878
  var package_namespaceObject = {
10879
- rE: "13.15.0"
10879
+ rE: "13.15.2"
10880
10880
  };
10881
10881
  function isAudioEnabled(options) {
10882
10882
  return Boolean(options.audio.enabled);
@@ -15129,7 +15129,7 @@ var __webpack_exports__ = {};
15129
15129
  cpu: err.cpu,
15130
15130
  device: err.device,
15131
15131
  engine: err.engine,
15132
- err: serializeError(err.err),
15132
+ err: err.err ? serializeError(err.err) : void 0,
15133
15133
  explanation: err.explanation,
15134
15134
  location: err.location,
15135
15135
  logLines: err.logLines,
@@ -17110,6 +17110,7 @@ var __webpack_exports__ = {};
17110
17110
  this.onPlayReached = false;
17111
17111
  this.onLoadedMetaDataReached = false;
17112
17112
  this.playingPromiseReached = false;
17113
+ this.videoTrackLabel = void 0;
17113
17114
  if (isAudioEnabled(this.options)) null != this.audioRecorder || (this.audioRecorder = new media_AudioRecorder(this, this.options));
17114
17115
  const unloadAllEventListeners = ()=>{
17115
17116
  var _this_rawVisualUserMedia, _this_rawVisualUserMedia1;
@@ -17207,6 +17208,7 @@ var __webpack_exports__ = {};
17207
17208
  try {
17208
17209
  var _this_rawVisualUserMedia, _this_rawVisualUserMedia1, _this_rawVisualUserMedia2;
17209
17210
  const videoTrack = media_getFirstVideoTrack(localMediaStream);
17211
+ this.videoTrackLabel = null == videoTrack ? void 0 : videoTrack.label;
17210
17212
  if (videoTrack) if (videoTrack.enabled) if (util_isVirtualCamera(videoTrack)) throw error_createError({
17211
17213
  message: "Virtual cameras are not allowed.",
17212
17214
  explanation: `Please use a real camera, not "${videoTrack.label}".`,
@@ -17237,6 +17239,9 @@ var __webpack_exports__ = {};
17237
17239
  });
17238
17240
  }
17239
17241
  }
17242
+ getVideoTrackLabel() {
17243
+ return this.videoTrackLabel;
17244
+ }
17240
17245
  isReady() {
17241
17246
  var _this_rawVisualUserMedia;
17242
17247
  return Boolean(null == (_this_rawVisualUserMedia = this.rawVisualUserMedia) ? void 0 : _this_rawVisualUserMedia.src);
@@ -17343,7 +17348,7 @@ var __webpack_exports__ = {};
17343
17348
  };
17344
17349
  }
17345
17350
  constructor(recorder, options){
17346
- super("UserMedia", options), userMedia_define_property(this, "recorder", void 0), userMedia_define_property(this, "rawVisualUserMedia", void 0), userMedia_define_property(this, "paused", false), userMedia_define_property(this, "recording", false), userMedia_define_property(this, "audioRecorder", void 0), userMedia_define_property(this, "currentVisualStream", void 0), userMedia_define_property(this, "onPlayReached", false), userMedia_define_property(this, "onLoadedMetaDataReached", false), userMedia_define_property(this, "playingPromiseReached", false);
17351
+ super("UserMedia", options), userMedia_define_property(this, "recorder", void 0), userMedia_define_property(this, "rawVisualUserMedia", void 0), userMedia_define_property(this, "paused", false), userMedia_define_property(this, "recording", false), userMedia_define_property(this, "audioRecorder", void 0), userMedia_define_property(this, "currentVisualStream", void 0), userMedia_define_property(this, "onPlayReached", false), userMedia_define_property(this, "onLoadedMetaDataReached", false), userMedia_define_property(this, "playingPromiseReached", false), userMedia_define_property(this, "videoTrackLabel", void 0);
17347
17352
  this.recorder = recorder;
17348
17353
  this.rawVisualUserMedia = recorder.getRawVisualUserMedia();
17349
17354
  mediaEvents.forEach((eventName)=>{
@@ -17916,6 +17921,7 @@ var __webpack_exports__ = {};
17916
17921
  framesCount: this.framesCount,
17917
17922
  videoType
17918
17923
  };
17924
+ if (this.userMedia) this.recordingStats.videoTrackLabel = this.userMedia.getVideoTrackLabel();
17919
17925
  if (isAudioEnabled(this.options) && this.userMedia) {
17920
17926
  this.recordingStats.samplesCount = this.samplesCount;
17921
17927
  this.recordingStats.sampleRate = this.userMedia.getAudioSampleRate();
package/dist/esm/index.js CHANGED
@@ -3617,7 +3617,7 @@ const constants = {
3617
3617
  }
3618
3618
  };
3619
3619
  var package_namespaceObject = {
3620
- rE: "13.15.0"
3620
+ rE: "13.15.2"
3621
3621
  };
3622
3622
  function isAudioEnabled(options) {
3623
3623
  return Boolean(options.audio.enabled);
@@ -4411,7 +4411,7 @@ class Resource {
4411
4411
  cpu: err.cpu,
4412
4412
  device: err.device,
4413
4413
  engine: err.engine,
4414
- err: serializeError(err.err),
4414
+ err: err.err ? serializeError(err.err) : void 0,
4415
4415
  explanation: err.explanation,
4416
4416
  location: err.location,
4417
4417
  logLines: err.logLines,
@@ -6251,6 +6251,7 @@ class UserMedia extends util_Despot {
6251
6251
  this.onPlayReached = false;
6252
6252
  this.onLoadedMetaDataReached = false;
6253
6253
  this.playingPromiseReached = false;
6254
+ this.videoTrackLabel = void 0;
6254
6255
  if (isAudioEnabled(this.options)) this.audioRecorder ??= new media_AudioRecorder(this, this.options);
6255
6256
  const unloadAllEventListeners = ()=>{
6256
6257
  this.options.logger.debug("UserMedia: unloadAllEventListeners()");
@@ -6342,6 +6343,7 @@ class UserMedia extends util_Despot {
6342
6343
  };
6343
6344
  try {
6344
6345
  const videoTrack = media_getFirstVideoTrack(localMediaStream);
6346
+ this.videoTrackLabel = videoTrack?.label;
6345
6347
  if (videoTrack) if (videoTrack.enabled) if (util_isVirtualCamera(videoTrack)) throw error_createError({
6346
6348
  message: "Virtual cameras are not allowed.",
6347
6349
  explanation: `Please use a real camera, not "${videoTrack.label}".`,
@@ -6372,6 +6374,9 @@ class UserMedia extends util_Despot {
6372
6374
  });
6373
6375
  }
6374
6376
  }
6377
+ getVideoTrackLabel() {
6378
+ return this.videoTrackLabel;
6379
+ }
6375
6380
  isReady() {
6376
6381
  return Boolean(this.rawVisualUserMedia?.src);
6377
6382
  }
@@ -6475,7 +6480,7 @@ class UserMedia extends util_Despot {
6475
6480
  };
6476
6481
  }
6477
6482
  constructor(recorder, options){
6478
- super("UserMedia", options), userMedia_define_property(this, "recorder", void 0), userMedia_define_property(this, "rawVisualUserMedia", void 0), userMedia_define_property(this, "paused", false), userMedia_define_property(this, "recording", false), userMedia_define_property(this, "audioRecorder", void 0), userMedia_define_property(this, "currentVisualStream", void 0), userMedia_define_property(this, "onPlayReached", false), userMedia_define_property(this, "onLoadedMetaDataReached", false), userMedia_define_property(this, "playingPromiseReached", false);
6483
+ super("UserMedia", options), userMedia_define_property(this, "recorder", void 0), userMedia_define_property(this, "rawVisualUserMedia", void 0), userMedia_define_property(this, "paused", false), userMedia_define_property(this, "recording", false), userMedia_define_property(this, "audioRecorder", void 0), userMedia_define_property(this, "currentVisualStream", void 0), userMedia_define_property(this, "onPlayReached", false), userMedia_define_property(this, "onLoadedMetaDataReached", false), userMedia_define_property(this, "playingPromiseReached", false), userMedia_define_property(this, "videoTrackLabel", void 0);
6479
6484
  this.recorder = recorder;
6480
6485
  this.rawVisualUserMedia = recorder.getRawVisualUserMedia();
6481
6486
  mediaEvents.forEach((eventName)=>{
@@ -7040,6 +7045,7 @@ class Recorder extends util_Despot {
7040
7045
  framesCount: this.framesCount,
7041
7046
  videoType
7042
7047
  };
7048
+ if (this.userMedia) this.recordingStats.videoTrackLabel = this.userMedia.getVideoTrackLabel();
7043
7049
  if (isAudioEnabled(this.options) && this.userMedia) {
7044
7050
  this.recordingStats.samplesCount = this.samplesCount;
7045
7051
  this.recordingStats.sampleRate = this.userMedia.getAudioSampleRate();
@@ -9,5 +9,6 @@ interface RecordingStats {
9
9
  waitingTime?: number | undefined;
10
10
  wantedFps?: number;
11
11
  wantedInterval?: number;
12
+ videoTrackLabel?: string | undefined;
12
13
  }
13
14
  export type { RecordingStats };
@@ -140,6 +140,7 @@ declare class Form extends Despot {
140
140
  waitingTime?: number | undefined | undefined;
141
141
  wantedFps?: number;
142
142
  wantedInterval?: number;
143
+ videoTrackLabel?: string | undefined | undefined;
143
144
  } | undefined;
144
145
  recordLocation?: string | undefined | undefined;
145
146
  parentKey?: string | undefined | undefined;
@@ -325,6 +326,7 @@ declare class Form extends Despot {
325
326
  waitingTime?: number | undefined | undefined;
326
327
  wantedFps?: number;
327
328
  wantedInterval?: number;
329
+ videoTrackLabel?: string | undefined | undefined;
328
330
  } | undefined;
329
331
  recordLocation?: string | undefined | undefined;
330
332
  parentKey?: string | undefined | undefined;
@@ -17,6 +17,7 @@ declare class UserMedia extends Despot {
17
17
  private onPlayReached;
18
18
  private onLoadedMetaDataReached;
19
19
  private playingPromiseReached;
20
+ private videoTrackLabel?;
20
21
  constructor(recorder: Recorder, options: VideomailClientOptions);
21
22
  private attachMediaStream;
22
23
  private setVisualStream;
@@ -27,6 +28,7 @@ declare class UserMedia extends Despot {
27
28
  unloadRemainingEventListeners(): void;
28
29
  private audioRecord;
29
30
  init(localMediaStream: MediaStream, videoCallback: () => void, audioCallback: AudioProcessCB, endedEarlyCallback: (err: any) => void, switchingFacingMode?: ConstrainDOMString): void;
31
+ getVideoTrackLabel(): string | undefined;
30
32
  isReady(): boolean;
31
33
  stop(visualStream?: MediaStream, params?: StopParams): void;
32
34
  createCanvas(): HTMLCanvasElement;
package/dist/umd/index.js CHANGED
@@ -10882,7 +10882,7 @@
10882
10882
  var client = __webpack_require__(5734);
10883
10883
  var client_default = /*#__PURE__*/ __webpack_require__.n(client);
10884
10884
  var package_namespaceObject = {
10885
- rE: "13.15.0"
10885
+ rE: "13.15.2"
10886
10886
  };
10887
10887
  function isAudioEnabled(options) {
10888
10888
  return Boolean(options.audio.enabled);
@@ -15017,7 +15017,7 @@
15017
15017
  cpu: err.cpu,
15018
15018
  device: err.device,
15019
15019
  engine: err.engine,
15020
- err: serializeError(err.err),
15020
+ err: err.err ? serializeError(err.err) : void 0,
15021
15021
  explanation: err.explanation,
15022
15022
  location: err.location,
15023
15023
  logLines: err.logLines,
@@ -16804,6 +16804,7 @@
16804
16804
  onPlayReached = false;
16805
16805
  onLoadedMetaDataReached = false;
16806
16806
  playingPromiseReached = false;
16807
+ videoTrackLabel;
16807
16808
  constructor(recorder, options){
16808
16809
  super("UserMedia", options);
16809
16810
  this.recorder = recorder;
@@ -16864,6 +16865,7 @@
16864
16865
  this.onPlayReached = false;
16865
16866
  this.onLoadedMetaDataReached = false;
16866
16867
  this.playingPromiseReached = false;
16868
+ this.videoTrackLabel = void 0;
16867
16869
  if (isAudioEnabled(this.options)) this.audioRecorder ??= new media_AudioRecorder(this, this.options);
16868
16870
  const unloadAllEventListeners = ()=>{
16869
16871
  this.options.logger.debug("UserMedia: unloadAllEventListeners()");
@@ -16955,6 +16957,7 @@
16955
16957
  };
16956
16958
  try {
16957
16959
  const videoTrack = media_getFirstVideoTrack(localMediaStream);
16960
+ this.videoTrackLabel = videoTrack?.label;
16958
16961
  if (videoTrack) if (videoTrack.enabled) if (util_isVirtualCamera(videoTrack)) throw error_createError({
16959
16962
  message: "Virtual cameras are not allowed.",
16960
16963
  explanation: `Please use a real camera, not "${videoTrack.label}".`,
@@ -16985,6 +16988,9 @@
16985
16988
  });
16986
16989
  }
16987
16990
  }
16991
+ getVideoTrackLabel() {
16992
+ return this.videoTrackLabel;
16993
+ }
16988
16994
  isReady() {
16989
16995
  return Boolean(this.rawVisualUserMedia?.src);
16990
16996
  }
@@ -17674,6 +17680,7 @@
17674
17680
  framesCount: this.framesCount,
17675
17681
  videoType
17676
17682
  };
17683
+ if (this.userMedia) this.recordingStats.videoTrackLabel = this.userMedia.getVideoTrackLabel();
17677
17684
  if (isAudioEnabled(this.options) && this.userMedia) {
17678
17685
  this.recordingStats.samplesCount = this.samplesCount;
17679
17686
  this.recordingStats.sampleRate = this.userMedia.getAudioSampleRate();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "videomail-client",
3
- "version": "13.15.0",
3
+ "version": "13.15.2",
4
4
  "description": "A wicked npm package to record videos directly in the browser, for Deaf and Sign Language!",
5
5
  "keywords": [
6
6
  "webcam",