@gjsify/webaudio 0.4.35 → 0.4.36
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/globals.mjs +19 -0
- package/package.json +29 -16
package/globals.mjs
ADDED
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Re-exports native Web Audio API globals for browser builds.
|
|
3
|
+
*
|
|
4
|
+
* `AudioContext` and the related node hierarchy are universal in modern
|
|
5
|
+
* browsers (Chrome 34+, Firefox 25+, Safari 14.1+ unprefixed).
|
|
6
|
+
*
|
|
7
|
+
* The dynamic resolver in `@gjsify/resolve-npm/runtime-aliases.mjs` routes
|
|
8
|
+
* `@gjsify/webaudio` here when `package.json#gjsify.runtimes.browser === "native"`.
|
|
9
|
+
*
|
|
10
|
+
* NOT used on Node — Node has no AudioContext global.
|
|
11
|
+
*/
|
|
12
|
+
|
|
13
|
+
export const AudioContext = globalThis.AudioContext;
|
|
14
|
+
export const AudioBuffer = globalThis.AudioBuffer;
|
|
15
|
+
export const AudioBufferSourceNode = globalThis.AudioBufferSourceNode;
|
|
16
|
+
export const GainNode = globalThis.GainNode;
|
|
17
|
+
export const AudioParam = globalThis.AudioParam;
|
|
18
|
+
export const HTMLAudioElement = globalThis.HTMLAudioElement;
|
|
19
|
+
export const OfflineAudioContext = globalThis.OfflineAudioContext;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@gjsify/webaudio",
|
|
3
|
-
"version": "0.4.
|
|
3
|
+
"version": "0.4.36",
|
|
4
4
|
"description": "Web Audio API for GJS using GStreamer as audio backend",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"module": "lib/esm/index.js",
|
|
@@ -13,13 +13,16 @@
|
|
|
13
13
|
"./register": {
|
|
14
14
|
"types": "./lib/types/register.d.ts",
|
|
15
15
|
"default": "./lib/esm/register.js"
|
|
16
|
-
}
|
|
16
|
+
},
|
|
17
|
+
"./globals": "./globals.mjs"
|
|
17
18
|
},
|
|
18
19
|
"files": [
|
|
19
|
-
"lib"
|
|
20
|
+
"lib",
|
|
21
|
+
"globals.mjs"
|
|
20
22
|
],
|
|
21
23
|
"sideEffects": [
|
|
22
|
-
"./lib/esm/register.js"
|
|
24
|
+
"./lib/esm/register.js",
|
|
25
|
+
"./globals.mjs"
|
|
23
26
|
],
|
|
24
27
|
"scripts": {
|
|
25
28
|
"clear": "rm -rf lib tsconfig.tsbuildinfo tsconfig.types.tsbuildinfo test.gjs.mjs || exit 0",
|
|
@@ -39,25 +42,35 @@
|
|
|
39
42
|
"audio-api"
|
|
40
43
|
],
|
|
41
44
|
"dependencies": {
|
|
42
|
-
"@gjsify/dom-events": "^0.4.
|
|
45
|
+
"@gjsify/dom-events": "^0.4.36"
|
|
43
46
|
},
|
|
44
47
|
"devDependencies": {
|
|
45
|
-
"@girs/gjs": "4.0.
|
|
46
|
-
"@girs/glib-2.0": "2.88.0-4.0.
|
|
47
|
-
"@girs/gst-1.0": "1.28.1-4.0.
|
|
48
|
-
"@girs/gstapp-1.0": "1.0.0-4.0.
|
|
49
|
-
"@girs/gstaudio-1.0": "1.0.0-4.0.
|
|
50
|
-
"@girs/gstbase-1.0": "1.0.0-4.0.
|
|
51
|
-
"@gjsify/cli": "^0.4.
|
|
52
|
-
"@gjsify/unit": "^0.4.
|
|
48
|
+
"@girs/gjs": "4.0.4",
|
|
49
|
+
"@girs/glib-2.0": "2.88.0-4.0.4",
|
|
50
|
+
"@girs/gst-1.0": "1.28.1-4.0.4",
|
|
51
|
+
"@girs/gstapp-1.0": "1.0.0-4.0.4",
|
|
52
|
+
"@girs/gstaudio-1.0": "1.0.0-4.0.4",
|
|
53
|
+
"@girs/gstbase-1.0": "1.0.0-4.0.4",
|
|
54
|
+
"@gjsify/cli": "^0.4.36",
|
|
55
|
+
"@gjsify/unit": "^0.4.36",
|
|
53
56
|
"@types/node": "^25.9.1",
|
|
54
|
-
"typescript": "^
|
|
57
|
+
"typescript": "^5.9.3"
|
|
55
58
|
},
|
|
56
59
|
"gjsify": {
|
|
57
60
|
"runtimes": {
|
|
58
61
|
"gjs": "polyfill",
|
|
59
62
|
"node": "none",
|
|
60
|
-
"browser": "
|
|
63
|
+
"browser": "native"
|
|
61
64
|
}
|
|
62
|
-
}
|
|
65
|
+
},
|
|
66
|
+
"license": "MIT",
|
|
67
|
+
"repository": {
|
|
68
|
+
"type": "git",
|
|
69
|
+
"url": "git+https://github.com/gjsify/gjsify.git",
|
|
70
|
+
"directory": "packages/web/webaudio"
|
|
71
|
+
},
|
|
72
|
+
"bugs": {
|
|
73
|
+
"url": "https://github.com/gjsify/gjsify/issues"
|
|
74
|
+
},
|
|
75
|
+
"homepage": "https://github.com/gjsify/gjsify/tree/main/packages/web/webaudio#readme"
|
|
63
76
|
}
|