-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add checks to prevent breaking when running in the server
- Loading branch information
1 parent
e49d444
commit c605bb5
Showing
20 changed files
with
215 additions
and
147 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
(function (global, factory) { | ||
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports) : | ||
typeof define === 'function' && define.amd ? define(['exports'], factory) : | ||
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(global.advancedAnalyserNode = {})); | ||
})(this, (function (exports) { 'use strict'; | ||
|
||
/* | ||
* The path below is not an external module. It's an alias (defined in tsconfig.json) to ./dist/processor.worklet.js | ||
* The AudioWorkletProcessor is bundled first, and later imported here to be bundled as a base64 string, | ||
* to avoid needing to be manually imported and loaded by this module's consumers | ||
*/ | ||
const createAdvancedAnalyserNode = async (context, options = {}) => { | ||
{ | ||
throw new Error(` | ||
AudioWorkletNode does not exist in this environment: | ||
This typically happens if you try to run 'createAdvancedAnalyserNode' in the server | ||
`); | ||
} | ||
}; | ||
|
||
exports.createAdvancedAnalyserNode = createAdvancedAnalyserNode; | ||
|
||
Object.defineProperty(exports, '__esModule', { value: true }); | ||
|
||
})); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,2 @@ | ||
import { AdvancedAnalyserNodeProperties } from 'src/types'; | ||
import { AdvancedAnalyserNode } from './advanced-analyser-node'; | ||
export declare const createAdvancedAnalyserNode: (context: BaseAudioContext, options?: AdvancedAnalyserNodeProperties) => Promise<AdvancedAnalyserNode>; | ||
import { AdvancedAnalyserNodeProperties } from '../types'; | ||
export declare const createAdvancedAnalyserNode: (context: BaseAudioContext, options?: AdvancedAnalyserNodeProperties) => Promise<import("./advanced-analyser-node").AdvancedAnalyserNode>; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,2 @@ | ||
export * from './create-advanced-analyser'; | ||
export * from './advanced-analyser-node'; | ||
export { type AdvancedAnalyserNode } from './advanced-analyser-node'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.