This Firefox extension translates subtitles on ARD Mediathek videos from German to English and displays them above the original subtitles when the video is paused.
I really like the content on ARD Mediathek, but subtitles are often in German, which presents a challenge for non-native German speakers like me. So I created this extension to help me understand the content better, while also serving as a learning tool for improving my German language skills.
- Automatically detects and translates subtitles in ARD Mediathek videos.
- Ensures subtitles are in German (
lang="de-DE"
) before translation. - Stores translations to avoid redundant API calls.
- Displays translated subtitles only when the video is paused.
- Positions translated subtitles above the original ones.
- Download the extension files.
- Open Firefox and go to
about:debugging
. - Click on
This Firefox
(orThis Nightly
if using Firefox Nightly). - Click on
Load Temporary Add-on
and select themanifest.json
file.
- Open an ARD Mediathek video (
https://www.ardmediathek.de/video/*
). - Play the video, and subtitles will appear as usual.
- Pause the video to see the translated subtitles appear above the original ones.
- Uses the Google Translate API to translate subtitles.
- Monitors subtitle changes using a
MutationObserver
. - Stores translations in a cache to prevent repeated API requests.
- Observes the play/pause button state to determine when to display translations.
- Option to choose different target languages.
- Persistent storage for translations across page reloads.
- Customizable subtitle positioning and styling.
This project is licensed under the MIT License.