videomail-client 9.2.6 → 9.2.8

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.6",
3
+ "version": "9.2.8",
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.6",
17270
+ "version": "9.2.8",
17271
17271
  "description": "A wicked npm package to record videos directly in the browser, wohooo!",
17272
17272
  "keywords": [
17273
17273
  "webcam",
@@ -19810,6 +19810,10 @@ var Container = function Container(options) {
19810
19810
 
19811
19811
  // since https://github.com/binarykitchen/videomail-client/issues/87
19812
19812
  function findParentFormElement() {
19813
+ if (!containerElement) {
19814
+ // Must be in player only mode
19815
+ return;
19816
+ }
19813
19817
  return containerElement.closest("form");
19814
19818
  }
19815
19819
  function getFormElement() {
@@ -20122,6 +20126,10 @@ var Container = function Container(options) {
20122
20126
  return buttons.getSubmitButton();
20123
20127
  };
20124
20128
  this.querySelector = function (selector) {
20129
+ if (!containerElement) {
20130
+ // Must be in player only mode
20131
+ return;
20132
+ }
20125
20133
  return containerElement.querySelector(selector);
20126
20134
  };
20127
20135
  this.beginWaiting = function () {
@@ -20988,14 +20996,14 @@ var Visuals = function Visuals(container, options) {
20988
20996
  this.build = function () {
20989
20997
  var playerOnly = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false;
20990
20998
  var replayParentElement = arguments.length > 1 ? arguments[1] : undefined;
20991
- if (container) {
20999
+ if (container && !playerOnly) {
20992
21000
  visualsElement = container.querySelector(".".concat(options.selectors.visualsClass));
20993
21001
  if (!visualsElement) {
20994
21002
  visualsElement = (0, _hyperscript.default)("div.".concat(options.selectors.visualsClass));
20995
21003
  var buttonsElement = container.querySelector(".".concat(options.selectors.buttonsClass));
20996
21004
 
20997
21005
  /*
20998
- * make sure it's placed before the buttons, but only if it's a child
21006
+ * Make sure it's placed before the buttons, but only if it's a child
20999
21007
  * element of the container = inside the container
21000
21008
  */
21001
21009
  if (buttonsElement && !container.isOutsideElementOf(buttonsElement)) {
@@ -21006,7 +21014,7 @@ var Visuals = function Visuals(container, options) {
21006
21014
  }
21007
21015
 
21008
21016
  /*
21009
- * do not hide visuals element so that apps can give it a predefined
21017
+ * Do not hide visuals element so that apps can give it a predefined
21010
21018
  * width or height through css but hide all children
21011
21019
  */
21012
21020
  visualsElement.classList.add("visuals");