-
Notifications
You must be signed in to change notification settings - Fork 44
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Show transcript for lectures with subtitles #1403
Conversation
Signed-off-by: carlobortolan <[email protected]>
Signed-off-by: carlobortolan <[email protected]>
Your Testserver will be ready at https://1403.test.live.mm.rbg.tum.de in a few minutes. Logins
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Very clean, like it a lot! Just left a few nits.
web/template/watch.gohtml
Outdated
@@ -424,6 +424,22 @@ | |||
</div> | |||
{{end}} | |||
|
|||
<!-- Transcript --> | |||
<div id="transcript-desktop" x-cloak="" x-show="sidebar === watch.SidebarState.Transcript && transcriptAvailable" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
<div id="transcript-desktop" x-cloak="" x-show="sidebar === watch.SidebarState.Transcript && transcriptAvailable" | |
<div id="transcript-desktop" x-cloak x-show="sidebar === watch.SidebarState.Transcript && transcriptAvailable" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
</button> | ||
</div> | ||
<div class="flex-grow overflow-hidden relative"> | ||
{{template "transcript-list" .}} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No need to pass any context, right?
{{template "transcript-list" .}} | |
{{template "transcript-list"}} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
web/template/watch.gohtml
Outdated
<!-- Transcript Button --> | ||
<button x-show="transcriptAvailable" @toggletranscript.window="e => {transcriptAvailable=true}" @click="sidebar = (sidebar === watch.SidebarState.Transcript ? watch.SidebarState.Hidden : watch.SidebarState.Transcript)" | ||
class="rounded-lg px-3 py-1 md:px-4 py-2 h-fit w-fit bg-gray-100 hover:bg-gray-200 dark:bg-secondary-light dark:hover:bg-gray-600" | ||
:title="'Show Transcript'"> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This way we don't need to run this string through javascript
:title="'Show Transcript'"> | |
title="Show Transcript"> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Seems like we made this mistake before in these files, feel free to clean them up if you want, if not no worries.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for pointing that out; I removed all the unnecessary '
I could find in my latest commit.
@@ -1,12 +1,12 @@ | |||
import { getPlayers } from "./TUMLiveVjs"; | |||
import { copyToClipboard, Time } from "./global"; | |||
import { seekbarOverlay } from "./seekbar-overlay"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I assume this was unused?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes (see beginning & end of watch.ts file)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🚀
Motivation and Context
See #1369.
Description
Updated web client to include the option to show lecture transcript with available subtitles.
When the transcript is enabled, the user can read/scroll/fast-forward through the text (see demo video below).
Steps for Testing
Prerequisites:
Screenshots
2024-11-12.15-04-23.mp4