Skip to content

feat(audioPiP): seamless playback of audio files/voice messages#4262

Open
okisooo wants to merge 14 commits into
Vendicated:mainfrom
okisooo:pr-audio-pip
Open

feat(audioPiP): seamless playback of audio files/voice messages#4262
okisooo wants to merge 14 commits into
Vendicated:mainfrom
okisooo:pr-audio-pip

Conversation

@okisooo

@okisooo okisooo commented Jun 1, 2026

Copy link
Copy Markdown

Describe your Changes

New plugin for audio playback consistency: AudioPiP

Idea started from actual necessity and having a quick convo with the man John Vencord himself telling me this was doable, I decided to give it a shot since I produce music and offload a bunch of audio files on Discord.

Tabbing out just for the audio to end abruptly always bothered me, and I am rather certain this would be useful to so many other prods out there, or even just the average user.

This abrupt audio cut doesn't happen on mobile, since Discord added a nice PiP feature that quickly smooths out the playback feel when tabbing out which is what this plugin aims to achieve for Desktop.

The PiP player

(don't mind the cat LOL)

Desktop PiP

I tried to recreate the mobile PiP and readapt it for what I think it should look like on Desktop.

Resizing

Just like streams, you'll be able to resize the popup as you please, within margins.

Dragging & Snapping

It also has the same dragging behavior so it feels nice to have on the screen, and doesn't feel invasive.

I originally attempted to get it working exactly like mobile, where, when returning to the source chat of the file being played, the PiP is actually perfectly synced to the original element, but after a lot of trial and error I figured I should keep it simple for now and if the plugin gets a bit of movement, someone more capable should handle that, since I wasn't getting anywhere unless it was with DOM manipulation.

Specific behaviors

  • Floating draggable player similar to livestreams, with resizable corners
    (active resize corner is dependent on where the PiP is located).
  • Seek bar and volume sliders inspired by how audio files look already
  • Shows filename (or type if voice message) aswell as the author

Overall, seamless feel with the goal of keeping a consistent playback experience when tabbing out, which is the ultimate goal of the plugin.

Checklist before submitting

  • I have read the CONTRIBUTING.md file and made sure this pull request complies with it
  • This pull request was written by me, and not an AI agent

@okisooo
okisooo marked this pull request as ready for review June 1, 2026 10:50
Copilot AI review requested due to automatic review settings June 1, 2026 10:50

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Note

Copilot was unable to run its full agentic suite in this review.

Introduces a new AudioPiP plugin that provides a draggable/resizable floating audio player UI and adds the plugin author to the shared developer constants.

Changes:

  • Added AudioPiP plugin implementation (UI + audio tracking + channel-change behavior)
  • Added full styling and a brief README for the plugin
  • Added OKISO entry to Devs for plugin authorship attribution

Reviewed changes

Copilot reviewed 4 out of 5 changed files in this pull request and generated 19 comments.

File Description
src/utils/constants.ts Adds OKISO to Devs so the new plugin can declare its author.
src/plugins/audioPiP/index.tsx Implements the AudioPiP player, including audio interception, store, UI, drag/resize logic, and plugin lifecycle.
src/plugins/audioPiP/style.css Provides the look/feel for the floating player, including controls, sliders, and resizer affordances.
src/plugins/audioPiP/README.md Adds basic plugin documentation/description.
Files not reviewed (1)
  • pnpm-lock.yaml: Language not supported

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread src/plugins/audioPiP/style.css
Comment thread src/plugins/audioPiP/style.css Outdated
Comment thread src/plugins/audioPiP/index.tsx
Comment thread src/plugins/audioPiP/index.tsx
Comment thread src/plugins/audioPiP/index.tsx
Comment thread src/plugins/audioPiP/index.tsx Outdated
Comment thread src/plugins/audioPiP/index.tsx Outdated
Comment thread src/plugins/audioPiP/index.tsx Outdated
Comment thread src/plugins/audioPiP/style.css Outdated
Comment thread src/plugins/audioPiP/style.css Outdated
@okisooo

okisooo commented Jun 1, 2026

Copy link
Copy Markdown
Author

forgot i had copilot autoreviews on for some reason, immediately turned them off bruh, sorry for that spam

@thecatontheceiling

Copy link
Copy Markdown

Only cool PR in Vencord's history congratulations

- capturing audio cleanly
- fixed cache loops and instead grabbing props directly from the audio element
- fixed WeakSets
- new settings toggle if you want the PiP to always come up even in the active tab
@qggs

qggs commented Jun 5, 2026

Copy link
Copy Markdown

This is so good, I actually may need this ASAP!!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants