A Blazor wrapper for the Web Audio browser API. This Web API standardizes methods for processing and synthesizing audio in web applications. The primary paradigm is of an audio routing graph, where a number of AudioNode objects are connected together to define the overall audio rendering. This project implements a wrapper around the API for Blazor so that we can easily and safely work with audio in the browser.
This wrapper is still under development, but you can get the preview release on NuGet.
The sample project can be demoed at https://kristofferstrube.github.io/Blazor.WebAudio/
On each page, you can find the corresponding code for the example in the top right corner.
On the API Coverage Status page, you can see how much of the WebIDL specs this wrapper has covered.
The library uses the following other packages to support its features:
- https://github.com/KristofferStrube/Blazor.WebIDL (To make error handling JSInterop)
- https://github.com/KristofferStrube/Blazor.DOM (To implement EventTarget's in the package like
BaseAudioContext
andAudioNode
) - https://github.com/KristofferStrube/Blazor.MediaCaptureStreams (To enable the creation of
MediaStreamAudioDestinationNode
,MediaStreamAudioSourceNode
, and other otherMediaStream
related nodes)
This repository was built with inspiration and help from the following series of articles:
- Typed exceptions for JSInterop in Blazor
- Wrapping JavaScript libraries in Blazor WebAssembly/WASM
- Call anonymous C# functions from JS in Blazor WASM
- Using JS Object References in Blazor WASM to wrap JS libraries
- Blazor WASM 404 error and fix for GitHub Pages
- How to fix Blazor WASM base path problems