videomail-client 9.2.3 → 9.2.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.2.3",
3
+ "version": "9.2.4",
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.3",
17270
+ "version": "9.2.4",
17271
17271
  "description": "A wicked npm package to record videos directly in the browser, wohooo!",
17272
17272
  "keywords": [
17273
17273
  "webcam",
@@ -19749,11 +19749,6 @@ var Container = function Container(options) {
19749
19749
  var built;
19750
19750
  var form;
19751
19751
  validateOptions();
19752
- function prependDefaultCss() {
19753
- (0, _insertCss.default)(_mainMinCss.default, {
19754
- prepend: true
19755
- });
19756
- }
19757
19752
 
19758
19753
  // since https://github.com/binarykitchen/videomail-client/issues/87
19759
19754
  function findParentFormElement() {
@@ -20032,38 +20027,33 @@ var Container = function Container(options) {
20032
20027
  this.hasElement = function () {
20033
20028
  return Boolean(containerElement);
20034
20029
  };
20030
+ function prependDefaultCss() {
20031
+ (0, _insertCss.default)(_mainMinCss.default, {
20032
+ prepend: true
20033
+ });
20034
+ }
20035
20035
  this.build = function () {
20036
20036
  var playerOnly = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false;
20037
20037
  var replayParentElement = arguments.length > 1 ? arguments[1] : undefined;
20038
20038
  debug("Container: build (playerOnly = ".concat(playerOnly).concat(replayParentElement ? ", replayParentElement=\"".concat(replayParentElement, "\"") : "", ")"));
20039
20039
  try {
20040
- containerElement = document.getElementById(options.selectors.containerId);
20040
+ options.insertCss && prependDefaultCss();
20041
20041
 
20042
- /*
20043
- * Only build when a container element hast been found,
20044
- * otherwise be silent and do nothing
20045
- */
20046
- if (containerElement) {
20047
- options.insertCss && prependDefaultCss();
20048
- !built && initEvents(playerOnly);
20049
- correctDimensions();
20042
+ // Note, it can be undefined when e.g. just replaying a videomail
20043
+ containerElement = document.getElementById(options.selectors.containerId);
20044
+ !built && initEvents(playerOnly);
20045
+ correctDimensions();
20050
20046
 
20051
- // Building form also applies for when `playerOnly` because of
20052
- // correcting mode on Videomail. This function will skip if there is no form. Easy.
20053
- self.buildForm();
20054
- buildChildren(playerOnly, replayParentElement);
20055
- if (!hasError) {
20056
- debug("Container: built.");
20057
- built = true;
20058
- self.emit(_events.default.BUILT);
20059
- } else {
20060
- debug("Container: building failed due to an error.");
20061
- }
20047
+ // Building form also applies for when `playerOnly` because of
20048
+ // correcting mode on Videomail. This function will skip if there is no form. Easy.
20049
+ self.buildForm();
20050
+ buildChildren(playerOnly, replayParentElement);
20051
+ if (!hasError) {
20052
+ debug("Container: built.");
20053
+ built = true;
20054
+ self.emit(_events.default.BUILT);
20062
20055
  } else {
20063
- /*
20064
- * Commented out since it does too much noise on videomail's view page which is fine
20065
- * debug('Container: no container element with ID ' + options.selectors.containerId + ' found. Do nothing.')
20066
- */
20056
+ debug("Container: building failed due to an error.");
20067
20057
  }
20068
20058
  } catch (exc) {
20069
20059
  self.emit(_events.default.ERROR, exc);