Skip to content

Proof-of-concept demonstrating the usage of Web Audio API on server using Playwright

License

Notifications You must be signed in to change notification settings

satelllte/web-audio-on-server

Repository files navigation

Web Audio on Server

Proof-of-concept demonstrating the usage of Web Audio API on server using Playwright.

How it works

The core audio rendering logic put in src/renderAudio.ts script, which uses OfflineAudioContext to generate audio buffer. Then it's being taken by some wrapping code to put it into an HTML page wrapper to be opened by Playwright browser to download the resulting audio file.

The key benefit of Playwright is that it allows to run this logic on any platform, preserving all of the features of Web Audio API. So there's no need of some custom Web Audio API re-implementation solution for server, which is a very difficult task to complete.

Getting started

Prerequisites:

To install dependencies:

bun install

To run:

bun run build
bun run render

This project was created using bun init in bun v1.0.29. Bun is a fast all-in-one JavaScript runtime.

About

Proof-of-concept demonstrating the usage of Web Audio API on server using Playwright

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published