videomail-client 13.5.1 → 13.5.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/README.md CHANGED
@@ -83,6 +83,7 @@ Looking at the examples in the `/src/stories` folder should give you some ideas
83
83
  - <a href="#isBuilt">`videomailClient.isBuilt()`</a>
84
84
  - <a href="#submit">`videomailClient.submit()`</a>
85
85
  - <a href="#getLogLines">`videomailClient.getLogLines()`</a>
86
+ - <a href="#setLimitSeconds">`videomailClient.setLimitSeconds()`</a>
86
87
 
87
88
  <a name="constructor"></a>
88
89
 
@@ -201,6 +202,12 @@ Calling this function will manually trigger a submission of the recorded videoma
201
202
 
202
203
  For advanced use only: returns you a collection of log lines that show what code has been covered recently. Useful if you want to debug something tricky.
203
204
 
205
+ <a name="setLimitSeconds"></a>
206
+
207
+ ### videomailClient.setLimitSeconds()
208
+
209
+ For advanced use only: sets the recording time limit in seconds. Useful if you want to dynamically change the recording duration.
210
+
204
211
  <a name="whatisstored"></a>
205
212
 
206
213
  ## What gets stored on the videomail server?
@@ -10664,7 +10664,7 @@ var __webpack_exports__ = {};
10664
10664
  var client = __webpack_require__("./node_modules/superagent/lib/client.js");
10665
10665
  var client_default = /*#__PURE__*/ __webpack_require__.n(client);
10666
10666
  var package_namespaceObject = {
10667
- rE: "13.5.1"
10667
+ rE: "13.5.2"
10668
10668
  };
10669
10669
  var defined = __webpack_require__("./node_modules/defined/index.js");
10670
10670
  var defined_default = /*#__PURE__*/ __webpack_require__.n(defined);
@@ -15925,6 +15925,9 @@ var __webpack_exports__ = {};
15925
15925
  getStartSeconds() {
15926
15926
  return this.options.video.limitSeconds;
15927
15927
  }
15928
+ setLimitSeconds(limitSeconds) {
15929
+ this.options.video.limitSeconds = limitSeconds;
15930
+ }
15928
15931
  start() {
15929
15932
  this.countdown = this.getStartSeconds();
15930
15933
  this.nearComputed = this.endNighComputed = false;
@@ -16080,6 +16083,10 @@ var __webpack_exports__ = {};
16080
16083
  checkTimer(elapsedTime) {
16081
16084
  this.recordTimer.check(elapsedTime);
16082
16085
  }
16086
+ setLimitSeconds(limitSeconds) {
16087
+ this.options.video.limitSeconds = limitSeconds;
16088
+ this.recordTimer.setLimitSeconds(limitSeconds);
16089
+ }
16083
16090
  constructor(visuals, options){
16084
16091
  super("RecorderInsides", options), recorderInsides_define_property(this, "recordNote", void 0), recorderInsides_define_property(this, "recordTimer", void 0), recorderInsides_define_property(this, "countdown", void 0), recorderInsides_define_property(this, "facingMode", void 0), recorderInsides_define_property(this, "pausedNote", void 0), recorderInsides_define_property(this, "built", false);
16085
16092
  this.recordNote = new recorder_recordNote(visuals);
@@ -18437,6 +18444,10 @@ var __webpack_exports__ = {};
18437
18444
  this.recorderInsides.startCountdown(this.recorder.record.bind(this.recorder));
18438
18445
  } else this.recorder.record();
18439
18446
  }
18447
+ setLimitSeconds(limitSeconds) {
18448
+ this.options.video.limitSeconds = limitSeconds;
18449
+ this.recorderInsides.setLimitSeconds(limitSeconds);
18450
+ }
18440
18451
  getElement() {
18441
18452
  return this.visualsElement;
18442
18453
  }
@@ -18982,6 +18993,10 @@ var __webpack_exports__ = {};
18982
18993
  recordAgain() {
18983
18994
  this.visuals.recordAgain();
18984
18995
  }
18996
+ setLimitSeconds(limitSeconds) {
18997
+ this.options.video.limitSeconds = limitSeconds;
18998
+ this.visuals.setLimitSeconds(limitSeconds);
18999
+ }
18985
19000
  constructor(options){
18986
19001
  super("Container", options), container_define_property(this, "visibility", document_visibility_default()()), container_define_property(this, "htmlElement", document.querySelector("html")), container_define_property(this, "visuals", void 0), container_define_property(this, "buttons", void 0), container_define_property(this, "resource", void 0), container_define_property(this, "form", void 0), container_define_property(this, "hasError", false), container_define_property(this, "submitted", false), container_define_property(this, "lastValidation", false), container_define_property(this, "containerElement", void 0), container_define_property(this, "built", false);
18987
19002
  this.visuals = new wrappers_visuals(this, options);
@@ -19053,6 +19068,12 @@ var __webpack_exports__ = {};
19053
19068
  this.unload(true);
19054
19069
  this.container.startOver(params);
19055
19070
  }
19071
+ setLimitSeconds(limitSeconds) {
19072
+ if (this.options.video.limitSeconds === limitSeconds) return void this.options.logger.debug(`Client: setLimitSeconds called but limitSeconds is already ${limitSeconds}, doing nothing.`);
19073
+ this.options.video.limitSeconds = limitSeconds;
19074
+ this.options.logger.debug(`Client: setLimitSeconds (limitSeconds = ${limitSeconds})`);
19075
+ this.container.setLimitSeconds(limitSeconds);
19076
+ }
19056
19077
  unload(startingOver = false) {
19057
19078
  this.container.unload({
19058
19079
  startingOver
@@ -17,6 +17,7 @@ declare class VideomailClient extends Despot {
17
17
  build(): HTMLElement | null | undefined;
18
18
  show(params?: ShowParams): HTMLElement;
19
19
  startOver(params?: StartOverParams): void;
20
+ setLimitSeconds(limitSeconds: number): void;
20
21
  unload(startingOver?: boolean): void;
21
22
  replay(videomail: Videomail, replayParentElementId?: string): HTMLVideoElement;
22
23
  hide(): void;
package/dist/esm/index.js CHANGED
@@ -3606,7 +3606,7 @@ const constants = {
3606
3606
  }
3607
3607
  };
3608
3608
  var package_namespaceObject = {
3609
- rE: "13.5.1"
3609
+ rE: "13.5.2"
3610
3610
  };
3611
3611
  function canPlayType_canPlayType(video, type) {
3612
3612
  const canPlayType = video.canPlayType(`video/${type}`);
@@ -5388,6 +5388,9 @@ class RecordTimer {
5388
5388
  getStartSeconds() {
5389
5389
  return this.options.video.limitSeconds;
5390
5390
  }
5391
+ setLimitSeconds(limitSeconds) {
5392
+ this.options.video.limitSeconds = limitSeconds;
5393
+ }
5391
5394
  start() {
5392
5395
  this.countdown = this.getStartSeconds();
5393
5396
  this.nearComputed = this.endNighComputed = false;
@@ -5522,6 +5525,10 @@ class RecorderInsides extends util_Despot {
5522
5525
  checkTimer(elapsedTime) {
5523
5526
  this.recordTimer.check(elapsedTime);
5524
5527
  }
5528
+ setLimitSeconds(limitSeconds) {
5529
+ this.options.video.limitSeconds = limitSeconds;
5530
+ this.recordTimer.setLimitSeconds(limitSeconds);
5531
+ }
5525
5532
  }
5526
5533
  const recorderInsides = RecorderInsides;
5527
5534
  const NOTIFIER_MESSAGE_ID = "notifierMessage";
@@ -7738,6 +7745,10 @@ class Visuals extends util_Despot {
7738
7745
  this.recorderInsides.startCountdown(this.recorder.record.bind(this.recorder));
7739
7746
  } else this.recorder.record();
7740
7747
  }
7748
+ setLimitSeconds(limitSeconds) {
7749
+ this.options.video.limitSeconds = limitSeconds;
7750
+ this.recorderInsides.setLimitSeconds(limitSeconds);
7751
+ }
7741
7752
  getElement() {
7742
7753
  return this.visualsElement;
7743
7754
  }
@@ -8236,6 +8247,10 @@ class Container extends util_Despot {
8236
8247
  recordAgain() {
8237
8248
  this.visuals.recordAgain();
8238
8249
  }
8250
+ setLimitSeconds(limitSeconds) {
8251
+ this.options.video.limitSeconds = limitSeconds;
8252
+ this.visuals.setLimitSeconds(limitSeconds);
8253
+ }
8239
8254
  }
8240
8255
  const wrappers_container = Container;
8241
8256
  class VideomailClient extends util_Despot {
@@ -8274,6 +8289,12 @@ class VideomailClient extends util_Despot {
8274
8289
  this.unload(true);
8275
8290
  this.container.startOver(params);
8276
8291
  }
8292
+ setLimitSeconds(limitSeconds) {
8293
+ if (this.options.video.limitSeconds === limitSeconds) return void this.options.logger.debug(`Client: setLimitSeconds called but limitSeconds is already ${limitSeconds}, doing nothing.`);
8294
+ this.options.video.limitSeconds = limitSeconds;
8295
+ this.options.logger.debug(`Client: setLimitSeconds (limitSeconds = ${limitSeconds})`);
8296
+ this.container.setLimitSeconds(limitSeconds);
8297
+ }
8277
8298
  unload(startingOver = false) {
8278
8299
  this.container.unload({
8279
8300
  startingOver
@@ -82,5 +82,6 @@ declare class Container extends Despot {
82
82
  resume(): void;
83
83
  stop(): void;
84
84
  recordAgain(): void;
85
+ setLimitSeconds(limitSeconds: number): void;
85
86
  }
86
87
  export default Container;
@@ -22,6 +22,7 @@ declare class RecordTimer {
22
22
  private show;
23
23
  private getSecondsRecorded;
24
24
  private getStartSeconds;
25
+ setLimitSeconds(limitSeconds: number): void;
25
26
  start(): void;
26
27
  pause(): void;
27
28
  resume(): void;
@@ -24,5 +24,6 @@ declare class RecorderInsides extends Despot {
24
24
  resumeCountdown(): void;
25
25
  isCountingDown(): boolean | undefined;
26
26
  checkTimer(elapsedTime: number): void;
27
+ setLimitSeconds(limitSeconds: number): void;
27
28
  }
28
29
  export default RecorderInsides;
@@ -68,6 +68,7 @@ declare class Visuals extends Despot {
68
68
  isUserMediaLoaded(): boolean | undefined;
69
69
  isConnected(): boolean;
70
70
  record(): void;
71
+ setLimitSeconds(limitSeconds: number): void;
71
72
  getElement(): HTMLElement | null | undefined;
72
73
  }
73
74
  export default Visuals;
package/dist/umd/index.js CHANGED
@@ -10670,7 +10670,7 @@
10670
10670
  var client = __webpack_require__("./node_modules/superagent/lib/client.js");
10671
10671
  var client_default = /*#__PURE__*/ __webpack_require__.n(client);
10672
10672
  var package_namespaceObject = {
10673
- rE: "13.5.1"
10673
+ rE: "13.5.2"
10674
10674
  };
10675
10675
  var defined = __webpack_require__("./node_modules/defined/index.js");
10676
10676
  var defined_default = /*#__PURE__*/ __webpack_require__.n(defined);
@@ -15727,6 +15727,9 @@
15727
15727
  getStartSeconds() {
15728
15728
  return this.options.video.limitSeconds;
15729
15729
  }
15730
+ setLimitSeconds(limitSeconds) {
15731
+ this.options.video.limitSeconds = limitSeconds;
15732
+ }
15730
15733
  start() {
15731
15734
  this.countdown = this.getStartSeconds();
15732
15735
  this.nearComputed = this.endNighComputed = false;
@@ -15861,6 +15864,10 @@
15861
15864
  checkTimer(elapsedTime) {
15862
15865
  this.recordTimer.check(elapsedTime);
15863
15866
  }
15867
+ setLimitSeconds(limitSeconds) {
15868
+ this.options.video.limitSeconds = limitSeconds;
15869
+ this.recordTimer.setLimitSeconds(limitSeconds);
15870
+ }
15864
15871
  }
15865
15872
  const recorderInsides = RecorderInsides;
15866
15873
  const NOTIFIER_MESSAGE_ID = "notifierMessage";
@@ -18153,6 +18160,10 @@
18153
18160
  this.recorderInsides.startCountdown(this.recorder.record.bind(this.recorder));
18154
18161
  } else this.recorder.record();
18155
18162
  }
18163
+ setLimitSeconds(limitSeconds) {
18164
+ this.options.video.limitSeconds = limitSeconds;
18165
+ this.recorderInsides.setLimitSeconds(limitSeconds);
18166
+ }
18156
18167
  getElement() {
18157
18168
  return this.visualsElement;
18158
18169
  }
@@ -18651,6 +18662,10 @@
18651
18662
  recordAgain() {
18652
18663
  this.visuals.recordAgain();
18653
18664
  }
18665
+ setLimitSeconds(limitSeconds) {
18666
+ this.options.video.limitSeconds = limitSeconds;
18667
+ this.visuals.setLimitSeconds(limitSeconds);
18668
+ }
18654
18669
  }
18655
18670
  const wrappers_container = Container;
18656
18671
  class VideomailClient extends util_Despot {
@@ -18689,6 +18704,12 @@
18689
18704
  this.unload(true);
18690
18705
  this.container.startOver(params);
18691
18706
  }
18707
+ setLimitSeconds(limitSeconds) {
18708
+ if (this.options.video.limitSeconds === limitSeconds) return void this.options.logger.debug(`Client: setLimitSeconds called but limitSeconds is already ${limitSeconds}, doing nothing.`);
18709
+ this.options.video.limitSeconds = limitSeconds;
18710
+ this.options.logger.debug(`Client: setLimitSeconds (limitSeconds = ${limitSeconds})`);
18711
+ this.container.setLimitSeconds(limitSeconds);
18712
+ }
18692
18713
  unload(startingOver = false) {
18693
18714
  this.container.unload({
18694
18715
  startingOver
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "videomail-client",
3
- "version": "13.5.1",
3
+ "version": "13.5.2",
4
4
  "description": "A wicked npm package to record videos directly in the browser, wohooo!",
5
5
  "keywords": [
6
6
  "webcam",