videomail-client 9.0.2 → 9.0.4

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "videomail-client",
3
- "version": "9.0.2",
3
+ "version": "9.0.4",
4
4
  "description": "A wicked npm package to record videos directly in the browser, wohooo!",
5
5
  "keywords": [
6
6
  "webcam",
@@ -17273,7 +17273,7 @@ function wrappy (fn, cb) {
17273
17273
  },{}],114:[function(_dereq_,module,exports){
17274
17274
  module.exports={
17275
17275
  "name": "videomail-client",
17276
- "version": "9.0.2",
17276
+ "version": "9.0.4",
17277
17277
  "description": "A wicked npm package to record videos directly in the browser, wohooo!",
17278
17278
  "keywords": [
17279
17279
  "webcam",
@@ -19695,6 +19695,7 @@ var Buttons = function Buttons(container, options) {
19695
19695
  built = true;
19696
19696
  };
19697
19697
  this.unload = function () {
19698
+ debug("Buttons: unload()");
19698
19699
  built = false;
19699
19700
  };
19700
19701
  this.hide = function (params) {
@@ -19910,6 +19911,9 @@ var Container = function Container(options) {
19910
19911
  function unloadChildren(e) {
19911
19912
  visuals.unload(e);
19912
19913
  buttons.unload();
19914
+ if (form) {
19915
+ form.unload();
19916
+ }
19913
19917
  self.endWaiting();
19914
19918
  }
19915
19919
  function hideMySelf() {
@@ -20515,6 +20519,7 @@ function trimEmail(email) {
20515
20519
  }
20516
20520
  var Form = function Form(container, formElement, options) {
20517
20521
  _eventEmitter.default.call(this, options, "Form");
20522
+ var debug = options.debug;
20518
20523
  var self = this;
20519
20524
  var keyInput;
20520
20525
  function getData() {
@@ -20631,10 +20636,7 @@ var Form = function Form(container, formElement, options) {
20631
20636
  });
20632
20637
  } else {
20633
20638
  inputElement.addEventListener("input", function () {
20634
- // let any UI framework validate first, e.g. remove the custom error
20635
- setTimeout(function () {
20636
- container.validate();
20637
- }, 0);
20639
+ container.validate();
20638
20640
  });
20639
20641
  }
20640
20642
  }
@@ -20708,10 +20710,20 @@ var Form = function Form(container, formElement, options) {
20708
20710
  var submitButton = self.findSubmitButton();
20709
20711
  (0, _hidden.default)(submitButton, true);
20710
20712
  }
20713
+
20714
+ // TODO CONTINUE FROM HERE, PUBLISH THIS CHANGE
20715
+ this.unload = function () {
20716
+ debug("Form: unload()");
20717
+ stopListeningToSubmitEvents();
20718
+ };
20711
20719
  function startListeningToSubmitEvents() {
20712
20720
  var submitButton = container.getSubmitButton();
20713
20721
  submitButton.addEventListener("click", self.doTheSubmit.bind(self));
20714
20722
  }
20723
+ function stopListeningToSubmitEvents() {
20724
+ var submitButton = container.getSubmitButton();
20725
+ submitButton.removeEventListener("click", self.doTheSubmit.bind(self));
20726
+ }
20715
20727
  this.doTheSubmit = function (e) {
20716
20728
  if (e) {
20717
20729
  e.preventDefault();
@@ -21017,6 +21029,7 @@ var Visuals = function Visuals(container, options) {
21017
21029
  });
21018
21030
  };
21019
21031
  this.unload = function (e) {
21032
+ debug("Visuals: unload()", e);
21020
21033
  try {
21021
21034
  recorder.unload(e);
21022
21035
  recorderInsides.unload(e);