Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Dec 5, 2025

Motivation and Context

When lectures have subtitles in multiple languages, users need a way to select their preferred language in the transcript panel. Previously, the panel hardcoded "English" as the default and provided no mechanism to switch languages.

Description

Added dynamic language selection to the transcript panel:

TypeScript changes (web/ts/transcript.ts):

  • getAvailableLanguages(): Scans video.js text tracks for available caption/subtitle languages
  • setLanguage(label): Updates selected language and refreshes transcript display
  • getSelectedLanguage(): Returns current language selection
  • Init now auto-selects first available language instead of hardcoded "English"

Template changes (web/template/partial/stream/transcript.gohtml):

  • Added dropdown selector (shown only when multiple languages available)
  • AlpineJS integration for language state management
  • Removed beta tag

The dropdown populates after player initialization, appears only with 2+ languages, and triggers real-time transcript updates on selection. Export functionality respects the selected language.

Steps for Testing

Prerequisites:

  • 1 Lecturer
  • 2 Students
  • 1 Livestream with subtitles in multiple languages (e.g., English and Deutsch)
  1. Log in as a student
  2. Navigate to a livestream with multiple subtitle languages
  3. Open the transcript panel
  4. Verify the first available language is displayed by default
  5. Verify the language selector dropdown appears in the header
  6. Select a different language from the dropdown
  7. Verify the transcript updates to show the selected language
  8. Test the "Export transcript" button downloads the correct language
  9. Verify the beta tag is no longer displayed

Screenshots

Original prompt

This section details on the original issue you should resolve

<issue_title>Allow language selection on transcript panel</issue_title>
<issue_description>When a lecture has subtitles in two languages, the side-panel should show the native subtitles by default and allow selecting the other one. </issue_description>

<agent_instructions>Look at web/ts/transcript.ts and web/template/partial/stream/transcript.gohtml. Also remove the beta tag.</agent_instructions>

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


💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.

Copilot AI changed the title [WIP] Add language selection feature on transcript panel Allow language selection on transcript panel Dec 5, 2025
@benjaminkost
Copy link

@joschahenningsen ich würde gerne die Aufgabe übernehmen

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.

Allow language selection on transcript panel

3 participants