videomail-client 9.2.8 → 9.2.10

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.2.8",
3
+ "version": "9.2.10",
4
4
  "description": "A wicked npm package to record videos directly in the browser, wohooo!",
5
5
  "keywords": [
6
6
  "webcam",
@@ -17267,7 +17267,7 @@ function wrappy (fn, cb) {
17267
17267
  },{}],116:[function(_dereq_,module,exports){
17268
17268
  module.exports={
17269
17269
  "name": "videomail-client",
17270
- "version": "9.2.8",
17270
+ "version": "9.2.10",
17271
17271
  "description": "A wicked npm package to record videos directly in the browser, wohooo!",
17272
17272
  "keywords": [
17273
17273
  "webcam",
@@ -20917,7 +20917,7 @@ var Visuals = function Visuals(container, options) {
20917
20917
  var built;
20918
20918
  function buildNoScriptTag() {
20919
20919
  var noScriptElement = container.querySelector("noscript");
20920
- if (!noScriptElement) {
20920
+ if (noScriptElement) {
20921
20921
  noScriptElement = (0, _hyperscript.default)("noscript");
20922
20922
  noScriptElement.innerHTML = "Please enable Javascript";
20923
20923
  visualsElement.appendChild(noScriptElement);
@@ -20996,7 +20996,7 @@ var Visuals = function Visuals(container, options) {
20996
20996
  this.build = function () {
20997
20997
  var playerOnly = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false;
20998
20998
  var replayParentElement = arguments.length > 1 ? arguments[1] : undefined;
20999
- if (container && !playerOnly) {
20999
+ if (container) {
21000
21000
  visualsElement = container.querySelector(".".concat(options.selectors.visualsClass));
21001
21001
  if (!visualsElement) {
21002
21002
  visualsElement = (0, _hyperscript.default)("div.".concat(options.selectors.visualsClass));
@@ -23111,7 +23111,6 @@ var _iphoneInlineVideo = _interopRequireDefault(_dereq_("iphone-inline-video"));
23111
23111
  var _events = _interopRequireDefault(_dereq_("../../events"));
23112
23112
  var _browser = _interopRequireDefault(_dereq_("../../util/browser"));
23113
23113
  var _eventEmitter = _interopRequireDefault(_dereq_("../../util/eventEmitter"));
23114
- var _videomailError = _interopRequireDefault(_dereq_("../../util/videomailError"));
23115
23114
  var Replay = function Replay(parentElement, options) {
23116
23115
  _eventEmitter.default.call(this, options, "Replay");
23117
23116
  var self = this;
@@ -23123,11 +23122,11 @@ var Replay = function Replay(parentElement, options) {
23123
23122
  function buildElement() {
23124
23123
  var replayParentElement = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : parentElement;
23125
23124
  replayElement = (0, _hyperscript.default)("video.".concat(options.selectors.replayClass));
23126
- if (!replayElement.setAttribute) {
23127
- throw _videomailError.default.create("Please upgrade browser", options);
23128
- }
23129
23125
  if (typeof replayParentElement === "string") {
23130
23126
  replayParentElement = document.getElementById(replayParentElement);
23127
+ if (!replayParentElement) {
23128
+ throw new Error("No replay parent element container with ID ".concat(replayParentElement, " found."));
23129
+ }
23131
23130
  }
23132
23131
  replayParentElement.appendChild(replayElement);
23133
23132
  }
@@ -23292,6 +23291,10 @@ var Replay = function Replay(parentElement, options) {
23292
23291
  debug("Replay: built.");
23293
23292
  };
23294
23293
  this.unload = function () {
23294
+ debug("Replay: unload()");
23295
+ replayElement.remove();
23296
+ replayElement = undefined;
23297
+ videomail = undefined;
23295
23298
  built = false;
23296
23299
  };
23297
23300
  this.getVideoSource = function (type) {
@@ -23408,7 +23411,7 @@ var Replay = function Replay(parentElement, options) {
23408
23411
  (0, _inherits.default)(Replay, _eventEmitter.default);
23409
23412
  var _default = exports.default = Replay;
23410
23413
 
23411
- },{"../../events":119,"../../util/browser":124,"../../util/eventEmitter":126,"../../util/videomailError":131,"@babel/runtime/helpers/interopRequireDefault":4,"add-eventlistener-with-options":12,"hidden":61,"hyperscript":63,"inherits":66,"iphone-inline-video":69}],147:[function(_dereq_,module,exports){
23414
+ },{"../../events":119,"../../util/browser":124,"../../util/eventEmitter":126,"@babel/runtime/helpers/interopRequireDefault":4,"add-eventlistener-with-options":12,"hidden":61,"hyperscript":63,"inherits":66,"iphone-inline-video":69}],147:[function(_dereq_,module,exports){
23412
23415
  "use strict";
23413
23416
 
23414
23417
  var _interopRequireDefault = _dereq_("@babel/runtime/helpers/interopRequireDefault");