A demo on displaying audio visualization inside a Picture-in-Picture window.
- Use Web Audio API to read audio's waveform data
- Use Canvas API to draw visualizations based on waveform data
- Convert canvas into a video stream using
canvas.captureStream()
- Create a
<video>
element, using the canvas video stream as its source video.requestPictureInPicture()
to show the Picture-in-Picture window- Use Media Session API to add playback controls to the Picture-in-Picture window