@aippy/runtime 0.2.0-dev.3 → 0.2.0-dev.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.
@@ -1,4 +1,4 @@
1
- import { c, a, i, b, p, u } from "../useAudioContext-BrvG8DKk.js";
1
+ import { c, a, i, b, p, u } from "../useAudioContext-DLWWSFAX.js";
2
2
  export {
3
3
  c as createHiddenMediaElement,
4
4
  a as createHiddenVideoElement,
@@ -33,7 +33,7 @@ function mergeConfig(userConfig) {
33
33
  }
34
34
  };
35
35
  }
36
- const version = "0.2.0-dev.3";
36
+ const version = "0.2.0-dev.4";
37
37
  const packageJson = {
38
38
  version
39
39
  };
@@ -3,7 +3,7 @@ import { A, E, c } from "../errors-DAz5_jDJ.js";
3
3
  import { CameraAPI, FileSystemAPI, GeolocationAPI, SensorsAPI, camera, fileSystem, geolocation, sensors, vibrate } from "../device/index.js";
4
4
  import { c as c2, a, P, b, p, d } from "../pwa-BkviTQoN.js";
5
5
  import { a as a2, b as b2 } from "../useTweaks-mK5PAWOs.js";
6
- import { c as c3, a as a3, i, b as b3, p as p2, u } from "../useAudioContext-BrvG8DKk.js";
6
+ import { c as c3, a as a3, i, b as b3, p as p2, u } from "../useAudioContext-DLWWSFAX.js";
7
7
  export {
8
8
  A as AippyRuntimeError,
9
9
  CameraAPI,
@@ -214,6 +214,9 @@ function patchAudioContext(audioContext, options = {}) {
214
214
  }
215
215
  const originalDestination = audioContext.destination;
216
216
  const streamDestination = audioContext.createMediaStreamDestination();
217
+ const gainNode = audioContext.createGain();
218
+ gainNode.gain.value = 1;
219
+ gainNode.connect(streamDestination);
217
220
  const mediaElement = createHiddenMediaElement(mediaElementType, debug);
218
221
  mediaElement.srcObject = streamDestination.stream;
219
222
  document.body.appendChild(mediaElement);
@@ -225,15 +228,15 @@ function patchAudioContext(audioContext, options = {}) {
225
228
  autoPauseOptions,
226
229
  debug
227
230
  );
228
- silenceDetector.connect(streamDestination);
231
+ silenceDetector.connect(gainNode);
229
232
  }
230
233
  Object.defineProperty(audioContext, "destination", {
231
- get: () => streamDestination,
234
+ get: () => gainNode,
232
235
  enumerable: true,
233
236
  configurable: true
234
237
  });
235
- if (!("maxChannelCount" in streamDestination)) {
236
- Object.defineProperty(streamDestination, "maxChannelCount", {
238
+ if (!("maxChannelCount" in gainNode)) {
239
+ Object.defineProperty(gainNode, "maxChannelCount", {
237
240
  get: () => originalDestination.maxChannelCount,
238
241
  enumerable: true
239
242
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@aippy/runtime",
3
- "version": "0.2.0-dev.3",
3
+ "version": "0.2.0-dev.4",
4
4
  "description": "Aippy Runtime SDK - Runtime SDK for Aippy projects",
5
5
  "private": false,
6
6
  "type": "module",