speaker-calibration 2.2.248 → 2.2.250

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.248",
3
+ "version": "2.2.250",
4
4
  "description": "Speaker calibration library for auditory testing",
5
5
  "main": "dist/main.js",
6
6
  "directories": {
@@ -266,7 +266,10 @@ switch (isSmartPhone) {
266
266
  window.listener.setMicrophoneDeviceId(webAudioDeviceNames.microphone);
267
267
  // show target element
268
268
  targetElement.style.display = 'block';
269
- await window.listener.startCalibration();
269
+ await window.listener.startCalibration({
270
+ microphoneFromAPI: webAudioDeviceNames.microphone,
271
+ microphoneDeviceId: webAudioDeviceNames.microphone,
272
+ });
270
273
  if (lock) {
271
274
  lock.release();
272
275
  }
@@ -34,8 +34,8 @@ class Listener extends AudioPeer {
34
34
  this.connectionManager = null;
35
35
  }
36
36
 
37
- startCalibration = async () => {
38
- await this.getDeviceInfo();
37
+ startCalibration = async (deviceInfo = {}) => {
38
+ await this.getDeviceInfo(deviceInfo);
39
39
  await this.openAudioStream();
40
40
  };
41
41
 
@@ -94,8 +94,7 @@ class Listener extends AudioPeer {
94
94
  });
95
95
  };
96
96
 
97
- getDeviceInfo = async () => {
98
- const deviceInfo = {};
97
+ getDeviceInfo = async (deviceInfo = {}) => {
99
98
  try {
100
99
  fod.complete(function (data) {
101
100
  deviceInfo['IsMobile'] = data.device['ismobile'];
@@ -114,8 +113,8 @@ class Listener extends AudioPeer {
114
113
  console.error('Error fetching or executing script:', error.message);
115
114
  }
116
115
  // deviceInfo['deviceInfoFromUser'] = this.deviceInfoFromUser;
117
- deviceInfo['microphoneFromAPI'] = this.microphoneFromAPI;
118
- deviceInfo['microphoneDeviceId'] = this.microphoneDeviceId;
116
+ // deviceInfo['microphoneFromAPI'] = this.microphoneFromAPI;
117
+ // deviceInfo['microphoneDeviceId'] = this.microphoneDeviceId;
119
118
  deviceInfo['screenWidth'] = window.screen.width;
120
119
  deviceInfo['screenHeight'] = window.screen.height;
121
120
  console.log('deviceInfo Inside getDeviceInfo: ', deviceInfo);