nagamuslim/novnc-audio-plugin — reverse-engineered prompt
Reverse engineered prompt
Build me a small JavaScript plugin that adds audio playback to a noVNC page without needing any extra libraries. I want it to be something people can drop into their noVNC HTML with one script tag, and it should add a simple audio button in the noVNC control bar so the user can start and stop the stream.
It should support MediaMTX HLS streams by default, using /stream/index.m3u8, but let me change the stream path with a data attribute on the script tag. Also make a separate version for Icecast style MP3 or OGG streams where the user provides the stream URL.
Please make it robust in normal browsers, handle play and pause cleanly, and fail gracefully if the stream is missing or blocked. Include clear README instructions for CDN use, manual hosting, npm install, custom stream paths, and a warning that cross origin audio needs a reverse proxy or correct CORS setup. Look up current noVNC behavior online if you need to.
Want more depth? Deep Reverse