feat: support audio and video file playback in Agent Folder#1191
Draft
feat: support audio and video file playback in Agent Folder#1191
Conversation
Support playing multimedia files (audio: mp3, wav, ogg, flac, aac, m4a, wma; video: mp4, webm, ogv, mov, avi, mkv) using native HTML5 audio and video elements with controls, instead of showing raw binary content. Co-authored-by: lightaime <[email protected]>
Co-authored-by: lightaime <[email protected]>
Copilot
AI
changed the title
[WIP] Add support for playing audio and video files in eigent
feat: support audio and video file playback in Agent Folder
Feb 9, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Audio/video files (e.g.
.wav) were being read as UTF-8 text and dumped into a<pre>tag, rendering as garbled binary content. Now they play back using native HTML5 media elements.Changes
electron/main/fileReader.ts— Media file types now resolve with the file path (same as PDF) instead of falling through tofs.readFileSync(filePath, 'utf-8')src/components/Folder/index.tsx— Route media files throughread-file-dataurlto get a data URL, then render<audio controls>or<video controls>accordingly. Extension lists extracted as module-level constants (AUDIO_EXTENSIONS,VIDEO_EXTENSIONS,MEDIA_EXTENSIONS) to avoid triple duplication.test/unit/electron/main/fileReader.test.ts— Tests for media extension classificationSupported formats
Follows the existing PDF pattern:
openFile()returns the file path → frontend callsread-file-dataurlto convert to a data URL → element renders withsrc={dataUrl}.Original prompt
💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.