tone 15.0.1 → 15.0.3
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/Tone/core/context/AudioContext.ts +8 -3
- package/Tone/version.ts +1 -1
- package/build/Tone.js +1 -1
- package/build/Tone.js.map +1 -1
- package/build/esm/core/context/AudioContext.d.ts +2 -0
- package/build/esm/core/context/AudioContext.js +4 -3
- package/build/esm/core/context/AudioContext.js.map +1 -1
- package/build/esm/version.js +1 -1
- package/package.json +1 -1
|
@@ -41,6 +41,8 @@ export type AnyAudioContext = AudioContext | OfflineAudioContext;
|
|
|
41
41
|
interface ToneWindow extends Window {
|
|
42
42
|
TONE_SILENCE_LOGGING?: boolean;
|
|
43
43
|
TONE_DEBUG_CLASS?: string;
|
|
44
|
+
BaseAudioContext: any;
|
|
45
|
+
AudioWorkletNode: any;
|
|
44
46
|
}
|
|
45
47
|
|
|
46
48
|
/**
|
|
@@ -66,10 +68,13 @@ export function createAudioWorkletNode(
|
|
|
66
68
|
): AudioWorkletNode {
|
|
67
69
|
assert(
|
|
68
70
|
isDefined(stdAudioWorkletNode),
|
|
69
|
-
"
|
|
71
|
+
"AudioWorkletNode only works in a secure context (https or localhost)"
|
|
70
72
|
);
|
|
71
|
-
|
|
72
|
-
|
|
73
|
+
return new (
|
|
74
|
+
context instanceof theWindow?.BaseAudioContext
|
|
75
|
+
? theWindow?.AudioWorkletNode
|
|
76
|
+
: stdAudioWorkletNode
|
|
77
|
+
)(context, name, options);
|
|
73
78
|
}
|
|
74
79
|
|
|
75
80
|
/**
|
package/Tone/version.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export const version: string = "15.0.
|
|
1
|
+
export const version: string = "15.0.3";
|