Release/1.10.0 - #57
Merged
Merged
Conversation
There was a problem hiding this comment.
Pull request overview
This PR adds secure local media preview/playback to the transcription UI by introducing a custom Electron protocol and wiring transcript (VTT) segments to media seeking, while also improving subtitle segmentation and batch ETA estimation.
Changes:
- Introduces
whisperdesk-media://protocol + IPC bridge (file:getMediaSource) for safe, range-enabled local audio/video streaming to the renderer. - Adds transcript-segment parsing/highlighting and an embedded media player with segment click-to-seek navigation in the output panel.
- Improves batch ETA estimation logic and updates/extends automated tests for the new behaviors.
Reviewed changes
Copilot reviewed 26 out of 27 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| src/shared/types.ts | Adds shared MediaSourceResult / MediaSourceType types for the new IPC API. |
| src/renderer/types/electron.d.ts | Extends renderer-side Electron API typings with getMediaSource. |
| src/renderer/test/setup.ts | Updates global Electron API mock to include getMediaSource. |
| src/renderer/test/electronAPIMocks.ts | Extends default/full Electron API mocks with getMediaSource behavior. |
| src/renderer/services/electronAPI.ts | Adds renderer wrapper for getMediaSource. |
| src/renderer/services/tests/electronAPI.test.ts | Tests wrapper behavior including getMediaSource forwarding/fallback. |
| src/renderer/features/transcription/utils/transcriptSegments.ts | New utility to parse VTT cues into timestamped segments. |
| src/renderer/features/transcription/utils/tests/transcriptSegments.test.ts | Tests for segment parsing + timestamp conversion. |
| src/renderer/features/transcription/hooks/useBatchQueue.ts | Refactors ETA calculation to use progress + historical samples; adds timer-based updates. |
| src/renderer/features/transcription/components/TranscriptMediaPlayer/TranscriptMediaPlayer.tsx | New embedded audio/video preview player with controls + IPC source resolution. |
| src/renderer/features/transcription/components/TranscriptMediaPlayer/TranscriptMediaPlayer.css | Styles for the embedded media player UI. |
| src/renderer/features/transcription/components/TranscriptMediaPlayer/index.ts | Barrel export for the new player component. |
| src/renderer/features/transcription/components/TranscriptMediaPlayer/tests/TranscriptMediaPlayer.test.tsx | Tests media player loading/error states and controls. |
| src/renderer/features/transcription/components/TranscriptionContent/TranscriptionContent.tsx | Renders clickable timestamped segments + in-segment search highlighting and active-segment scrolling. |
| src/renderer/features/transcription/components/TranscriptionContent/TranscriptionContent.css | Adds styles for timestamped transcript segment layout/active state. |
| src/renderer/features/transcription/components/OutputDisplay/OutputDisplay.tsx | Integrates segment parsing, embedded player, active segment detection, and segment click-to-seek. |
| src/renderer/features/transcription/components/OutputDisplay/tests/OutputDisplay.test.tsx | Adds tests for segment rendering, seeking, active highlighting, and segment search. |
| src/renderer/features/transcription/components/index.ts | Re-exports the new TranscriptMediaPlayer. |
| src/renderer/features/transcription/tests/useBatchQueue.test.ts | Updates tests for new onFirstComplete signature and new ETA behavior. |
| src/renderer/contexts/AppContext.tsx | Updates onFirstComplete to capture the completed file and set it as selected. |
| src/renderer/components/layout/RightPanel/RightPanel.tsx | Passes selectedFile into OutputDisplay so preview uses the correct media. |
| src/preload/index.ts | Exposes getMediaSource over the preload bridge via IPC. |
| src/main/utils/media-protocol.ts | New protocol implementation (content-type + range handling) and URL minting for local files. |
| src/main/services/whisper.ts | Improves subtitle segmentation via --max-len and --split-on-word. |
| src/main/ipc/index.ts | Adds file:getMediaSource IPC handler and video type detection. |
| src/main/index.ts | Registers the media protocol scheme/handler during app startup. |
| index.html | Updates CSP to allow media loading from the custom protocol. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
pedrovsiqueira
force-pushed
the
release/2.0.0
branch
from
May 8, 2026 18:00
b80931a to
ec8d489
Compare
…t and loading behavior tests
Comment on lines
+219
to
+227
| const setMediaElement = (element: HTMLMediaElement | null): void => { | ||
| mediaRef.current = element; | ||
| onMediaElementChange?.(element); | ||
|
|
||
| if (element) { | ||
| applyVolume(element, volume, isMuted); | ||
| element.playbackRate = playbackRate; | ||
| } | ||
| }; |
|
🎉 This PR is included in version 1.10.0 🎉 The release is available on GitHub release Your semantic-release bot 📦🚀 |
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.
This pull request introduces a new custom protocol for secure, local media file streaming and playback, and integrates a media player with transcript segment navigation into the transcription output UI. It also improves subtitle segmentation, adds video support, and enhances batch processing ETA estimation. The main changes are as follows:
Media Streaming and Protocol Integration
whisperdesk-media://) to securely serve local audio/video files to the renderer, with support for HTTP range requests and correct content types. This enables local playback without exposing file paths or using insecure URLs. (src/main/utils/media-protocol.ts,src/main/index.ts,index.html) [1] [2] [3] [4]file:getMediaSourceto validate media files and return a protocol URL and media type for playback. (src/main/ipc/index.ts) [1] [2]getMediaSourcein the preload bridge for renderer access. (src/preload/index.ts)Transcription Output and Media Player
OutputDisplaycomponent to include an embedded media player (TranscriptMediaPlayer) when transcript segments and a selected media file are available, allowing users to play the media and click transcript segments to seek playback. (src/renderer/features/transcription/components/OutputDisplay/OutputDisplay.tsx) [1] [2] [3] [4] [5]selectedFiletoOutputDisplay, ensuring the correct media file is used for playback. (src/renderer/components/layout/RightPanel/RightPanel.tsx,src/renderer/contexts/AppContext.tsx) [1] [2] [3]Subtitle Segmentation and Video Support
src/main/services/whisper.ts) [1] [2]src/main/ipc/index.ts)Batch Processing and Testing
src/renderer/features/transcription/__tests__/useBatchQueue.test.ts) [1] [2]src/renderer/features/transcription/components/OutputDisplay/__tests__/OutputDisplay.test.tsx)These changes provide a secure, integrated media playback experience for transcriptions, improve subtitle accuracy, and enhance user feedback during batch processing.