Skip to content

Conversation

Copy link

Copilot AI commented Feb 9, 2026

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 to fs.readFileSync(filePath, 'utf-8')
  • src/components/Folder/index.tsx — Route media files through read-file-dataurl to 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 classification

Supported formats

Audio Video
mp3, wav, ogg, flac, aac, m4a, wma mp4, webm, ogv, mov, avi, mkv

Follows the existing PDF pattern: openFile() returns the file path → frontend calls read-file-dataurl to convert to a data URL → element renders with src={dataUrl}.

Original prompt

This section details on the original issue you should resolve

<issue_title>[Feature Request] Support playing multimedia like audio and video files in eigent</issue_title>
<issue_description>### Motivation

Image

Solution

No response

Alternatives

No response

Additional context

No response</issue_description>

Comments on the Issue (you are @copilot in this section)


💡 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.

Copilot AI and others added 2 commits February 9, 2026 00:20
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]>
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
Copilot AI requested a review from lightaime February 9, 2026 00:25
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.

[Feature Request] Support playing multimedia like audio and video files in eigent

2 participants