videomail-client 12.0.2 → 13.0.0

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.
@@ -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: "12.0.2"
10667
+ rE: "13.0.0"
10668
10668
  };
10669
10669
  var defined = __webpack_require__("./node_modules/defined/index.js");
10670
10670
  var defined_default = /*#__PURE__*/ __webpack_require__.n(defined);
@@ -14570,7 +14570,7 @@ var __webpack_exports__ = {};
14570
14570
  e.preventDefault();
14571
14571
  } else this.options.logger.debug("Form: doTheSubmit()");
14572
14572
  var _this_formElement_getAttribute;
14573
- const url = null != (_this_formElement_getAttribute = this.formElement.getAttribute("action")) ? _this_formElement_getAttribute : this.options.baseUrl;
14573
+ const url = null != (_this_formElement_getAttribute = this.formElement.getAttribute("action")) ? _this_formElement_getAttribute : this.options.apiUrl;
14574
14574
  const method = this.formElement.getAttribute("method");
14575
14575
  let chosenMethod;
14576
14576
  switch(method){
@@ -14669,7 +14669,7 @@ var __webpack_exports__ = {};
14669
14669
  return newVideomail;
14670
14670
  }
14671
14671
  async get(identifierName, identifierValue) {
14672
- const url = `${this.options.baseUrl}/videomail/${identifierName}/${identifierValue}/snapshot`;
14672
+ const url = `${this.options.apiUrl}/videomail/${identifierName}/${identifierValue}/snapshot`;
14673
14673
  try {
14674
14674
  const request = await client_default()("get", url).type("json").set("Accept", "application/json").withCredentials().set("Timezone-Id", this.timezoneId).set(constants.SITE_NAME_LABEL, this.options.siteName).timeout(this.options.timeouts.connection);
14675
14675
  const videomail = request.body;
@@ -14685,7 +14685,7 @@ var __webpack_exports__ = {};
14685
14685
  const queryParams = {
14686
14686
  [constants.SITE_NAME_LABEL]: this.options.siteName
14687
14687
  };
14688
- let url = `${this.options.baseUrl}/videomail/`;
14688
+ let url = `${this.options.apiUrl}/videomail/`;
14689
14689
  if (method === FormMethod.PUT && videomail.key) url += videomail.key;
14690
14690
  try {
14691
14691
  const request = await client_default()(method, url).query(queryParams).set("Timezone-Id", this.timezoneId).withCredentials().send(videomail).timeout(this.options.timeouts.connection);
@@ -14707,7 +14707,7 @@ var __webpack_exports__ = {};
14707
14707
  const queryParams = {
14708
14708
  [constants.SITE_NAME_LABEL]: this.options.siteName
14709
14709
  };
14710
- const url = `${this.options.baseUrl}/client-error/`;
14710
+ const url = `${this.options.apiUrl}/client-error/`;
14711
14711
  try {
14712
14712
  var _this_options_versions;
14713
14713
  const fullVideomailErrorData = {
@@ -14813,7 +14813,7 @@ var __webpack_exports__ = {};
14813
14813
  logger: console,
14814
14814
  logStackSize: 30,
14815
14815
  verbose: !PRODUCTION,
14816
- baseUrl: "https://videomail.io",
14816
+ apiUrl: "https://videomail.io/api",
14817
14817
  socketUrl: "wss://videomail.io",
14818
14818
  siteName: "videomail-client-demo",
14819
14819
  enablePause: true,
package/dist/esm/index.js CHANGED
@@ -3606,7 +3606,7 @@ const constants = {
3606
3606
  }
3607
3607
  };
3608
3608
  var package_namespaceObject = {
3609
- rE: "12.0.2"
3609
+ rE: "13.0.0"
3610
3610
  };
3611
3611
  function canPlayType_canPlayType(video, type) {
3612
3612
  const canPlayType = video.canPlayType(`video/${type}`);
@@ -4218,7 +4218,7 @@ class Form extends util_Despot {
4218
4218
  this.options.logger.debug(`Form: doTheSubmit(${util_pretty(e)})`);
4219
4219
  e.preventDefault();
4220
4220
  } else this.options.logger.debug("Form: doTheSubmit()");
4221
- const url = this.formElement.getAttribute("action") ?? this.options.baseUrl;
4221
+ const url = this.formElement.getAttribute("action") ?? this.options.apiUrl;
4222
4222
  const method = this.formElement.getAttribute("method");
4223
4223
  let chosenMethod;
4224
4224
  switch(method){
@@ -4297,7 +4297,7 @@ class Resource {
4297
4297
  return newVideomail;
4298
4298
  }
4299
4299
  async get(identifierName, identifierValue) {
4300
- const url = `${this.options.baseUrl}/videomail/${identifierName}/${identifierValue}/snapshot`;
4300
+ const url = `${this.options.apiUrl}/videomail/${identifierName}/${identifierValue}/snapshot`;
4301
4301
  try {
4302
4302
  const request = await superagent("get", url).type("json").set("Accept", "application/json").withCredentials().set("Timezone-Id", this.timezoneId).set(constants.SITE_NAME_LABEL, this.options.siteName).timeout(this.options.timeouts.connection);
4303
4303
  const videomail = request.body;
@@ -4313,7 +4313,7 @@ class Resource {
4313
4313
  const queryParams = {
4314
4314
  [constants.SITE_NAME_LABEL]: this.options.siteName
4315
4315
  };
4316
- let url = `${this.options.baseUrl}/videomail/`;
4316
+ let url = `${this.options.apiUrl}/videomail/`;
4317
4317
  if (method === FormMethod.PUT && videomail.key) url += videomail.key;
4318
4318
  try {
4319
4319
  const request = await superagent(method, url).query(queryParams).set("Timezone-Id", this.timezoneId).withCredentials().send(videomail).timeout(this.options.timeouts.connection);
@@ -4335,7 +4335,7 @@ class Resource {
4335
4335
  const queryParams = {
4336
4336
  [constants.SITE_NAME_LABEL]: this.options.siteName
4337
4337
  };
4338
- const url = `${this.options.baseUrl}/client-error/`;
4338
+ const url = `${this.options.apiUrl}/client-error/`;
4339
4339
  try {
4340
4340
  const fullVideomailErrorData = {
4341
4341
  browser: err.browser,
@@ -4432,7 +4432,7 @@ const options_options = {
4432
4432
  logger: console,
4433
4433
  logStackSize: 30,
4434
4434
  verbose: !PRODUCTION,
4435
- baseUrl: "https://videomail.io",
4435
+ apiUrl: "https://videomail.io/api",
4436
4436
  socketUrl: "wss://videomail.io",
4437
4437
  siteName: "videomail-client-demo",
4438
4438
  enablePause: true,
@@ -10,7 +10,7 @@ export interface VideomailClientOptions {
10
10
  };
11
11
  logStackSize: number;
12
12
  verbose: boolean;
13
- baseUrl: string;
13
+ apiUrl: string;
14
14
  socketUrl: string;
15
15
  siteName: string;
16
16
  enablePause: boolean;
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: "12.0.2"
10673
+ rE: "13.0.0"
10674
10674
  };
10675
10675
  var defined = __webpack_require__("./node_modules/defined/index.js");
10676
10676
  var defined_default = /*#__PURE__*/ __webpack_require__.n(defined);
@@ -14553,7 +14553,7 @@
14553
14553
  this.options.logger.debug(`Form: doTheSubmit(${util_pretty(e)})`);
14554
14554
  e.preventDefault();
14555
14555
  } else this.options.logger.debug("Form: doTheSubmit()");
14556
- const url = this.formElement.getAttribute("action") ?? this.options.baseUrl;
14556
+ const url = this.formElement.getAttribute("action") ?? this.options.apiUrl;
14557
14557
  const method = this.formElement.getAttribute("method");
14558
14558
  let chosenMethod;
14559
14559
  switch(method){
@@ -14632,7 +14632,7 @@
14632
14632
  return newVideomail;
14633
14633
  }
14634
14634
  async get(identifierName, identifierValue) {
14635
- const url = `${this.options.baseUrl}/videomail/${identifierName}/${identifierValue}/snapshot`;
14635
+ const url = `${this.options.apiUrl}/videomail/${identifierName}/${identifierValue}/snapshot`;
14636
14636
  try {
14637
14637
  const request = await client_default()("get", url).type("json").set("Accept", "application/json").withCredentials().set("Timezone-Id", this.timezoneId).set(constants.SITE_NAME_LABEL, this.options.siteName).timeout(this.options.timeouts.connection);
14638
14638
  const videomail = request.body;
@@ -14648,7 +14648,7 @@
14648
14648
  const queryParams = {
14649
14649
  [constants.SITE_NAME_LABEL]: this.options.siteName
14650
14650
  };
14651
- let url = `${this.options.baseUrl}/videomail/`;
14651
+ let url = `${this.options.apiUrl}/videomail/`;
14652
14652
  if (method === FormMethod.PUT && videomail.key) url += videomail.key;
14653
14653
  try {
14654
14654
  const request = await client_default()(method, url).query(queryParams).set("Timezone-Id", this.timezoneId).withCredentials().send(videomail).timeout(this.options.timeouts.connection);
@@ -14670,7 +14670,7 @@
14670
14670
  const queryParams = {
14671
14671
  [constants.SITE_NAME_LABEL]: this.options.siteName
14672
14672
  };
14673
- const url = `${this.options.baseUrl}/client-error/`;
14673
+ const url = `${this.options.apiUrl}/client-error/`;
14674
14674
  try {
14675
14675
  const fullVideomailErrorData = {
14676
14676
  browser: err.browser,
@@ -14767,7 +14767,7 @@
14767
14767
  logger: console,
14768
14768
  logStackSize: 30,
14769
14769
  verbose: !PRODUCTION,
14770
- baseUrl: "https://videomail.io",
14770
+ apiUrl: "https://videomail.io/api",
14771
14771
  socketUrl: "wss://videomail.io",
14772
14772
  siteName: "videomail-client-demo",
14773
14773
  enablePause: true,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "videomail-client",
3
- "version": "12.0.2",
3
+ "version": "13.0.0",
4
4
  "description": "A wicked npm package to record videos directly in the browser, wohooo!",
5
5
  "keywords": [
6
6
  "webcam",