This is an extension that allows playing of Quite OK Audio (QOA) audio files.
This is designed to be similar to the built-in audio player VS Code uses for WAV, MP3, etc.
Download the latest VSIX from the Releases page and install it to VS Code:
wget https://github.com/braheezy/vscode-qoa-preview/releases/download/v0.1.0/qoa-preview-0.1.0.vsix
code --install-extension qoa-preview-0.1.0.vsix
Click on a QOA file, and play it! There is support for:
- Play/pause
- Mute
- Seek
To convert audio files to and from the QOA format, or for a more featured player, check out goqoa
!
There are no settings.
- Fork the repository.
- Create your feature.
- Commit your changes.
- Push to the branch.
- Open a pull request.
This project uses Bun as it's JavaScript runtime, so ensure that's installed.
I found it quicker to iterate on the HTML/JS/CSS outside of VS Code, so that's what in test/
and it can be hosted with bun run local
. Those files are not 100% copy-paste-able to the extension code, so watch out.
Once you're ready to test in VS Code, you should be able to press F5 in this project to auto-launch the debug config. You'll want to open the Web Developer Tools using the Command Palette for classic web dev debugging tools.
src/
contains:
extension.ts
: The main entry point for the extension. Boilerplate.qoaDecoder.js
: Vendored QOA decoderqoaPreview.ts
: The main logic for the extension, and notably, where the HTML template is.media/
: JS/CSS/SVG assets for rendering.
To package the extension into a VSIX file:
bun run package
- pfusik's QOA Decoder JS transpile to decode QOA files. I've vendored the MIT licensed file into this project.
- lalunamel's bun-vscode-extension to scaffold the project.
- VS Code's built-in media-preview extension for how they load and play audio files.