speaker-calibration 2.2.179 → 2.2.181

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": "speaker-calibration",
3
- "version": "2.2.179",
3
+ "version": "2.2.181",
4
4
  "description": "Speaker calibration library for auditory testing",
5
5
  "main": "dist/main.js",
6
6
  "directories": {
@@ -388,7 +388,7 @@ await fetch(url, options)
388
388
  const proceedButton = document.createElement('button');
389
389
  proceedButton.setAttribute('id', 'calibrationProceedButton');
390
390
  proceedButton.setAttribute('class', 'btn btn-success');
391
- proceedButton.innerHTML = 'Proceed';
391
+ proceedButton.innerHTML = phrases.T_PROCEED[this.language];
392
392
  proceedButton.onclick = () => {
393
393
  // open the link in a new tab
394
394
  window.open(this.uri, '_blank');
@@ -2452,7 +2452,11 @@ class Combination extends AudioCalibrator {
2452
2452
  const querySnapshot = await getDocs(q);
2453
2453
  // if exists return the linear field of the first document
2454
2454
  if (querySnapshot.size > 0) {
2455
- return querySnapshot.docs[0].data().linear;
2455
+ return {
2456
+ ir: querySnapshot.docs[0].data().linear,
2457
+ createDate: querySnapshot.docs[0].data().createDate,
2458
+ jsonFileName: querySnapshot.docs[0].data().jsonFileName
2459
+ };
2456
2460
  }
2457
2461
  return null;
2458
2462
  };
@@ -2736,8 +2740,8 @@ class Combination extends AudioCalibrator {
2736
2740
  ? 'minidsp'
2737
2741
  : this.deviceInfo.OEM.toLowerCase().split(' ').join('')
2738
2742
  : micManufacturer.toLowerCase().split(' ').join('');
2739
- // const ID = "712-5669";
2740
- // const OEM = "minidsp";
2743
+ // const ID = "A2484";
2744
+ // const OEM = "apple";
2741
2745
  const micInfo = {
2742
2746
  micModelName: isSmartPhone ? micModelName : microphoneName,
2743
2747
  OEM: isSmartPhone
@@ -2780,9 +2784,14 @@ class Combination extends AudioCalibrator {
2780
2784
  if (componentIR == null) {
2781
2785
  //mode 'ir'
2782
2786
  //global variable this.componentIR must be set
2783
- this.componentIR = await this.readFrqGainFromFirestore(ID, OEM, true).then(data => {
2784
- return data;
2787
+ await this.readFrqGainFromFirestore(ID, OEM, true).then(data => {
2788
+ if (data !== null) {
2789
+ this.componentIR = data.ir;
2790
+ micInfo['parentTimestamp'] = data.createDate;
2791
+ micInfo['parentFilenameJSON'] = data.jsonFileName;
2792
+ }
2785
2793
  });
2794
+
2786
2795
  // await this.readFrqGain(ID, OEM).then(data => {
2787
2796
  // return data;
2788
2797
  // });
package/src/utils.js CHANGED
@@ -169,6 +169,7 @@ export const createAndShowPopup = (lang) => {
169
169
  </div>`,
170
170
  showConfirmButton: false,
171
171
  position: 'bottom',
172
+ width: "40%",
172
173
  customClass: {
173
174
  container:'no-background',
174
175
  },