Skip to content

Speakr is a personal, self-hosted web application designed for transcribing audio recordings

Python

Revert docked-video feature — cross-component Teleport crashed Vue's patcher and broke the whole player

Murtaza Nasirf351dc032b09
diff --git a/static/css/styles.css b/static/css/styles.css
index 2f65ecf3..8365fcd6 100644
--- a/static/css/styles.css
+++ b/static/css/styles.css
@@ -4399,53 +4399,6 @@ select:disabled {
}
/* ===== Video Fullscreen Overlay ===== */
-/* Docked video panel (desktop). A flex-shrink-0 strip at the bottom of
- the transcript column; the flex-1 transcript scroller above shrinks to
- make room (content is pushed up, not overlaid). The single <video>
- element is teleported into .video-dock__slot. */
-.video-dock {
- flex-shrink: 0;
- display: flex;
- flex-direction: column;
- height: clamp(160px, 32vh, 380px);
- border-top: var(--border-hairline) solid var(--border-primary);
- background: var(--bg-secondary);
-}
-.video-dock__bar {
- display: flex;
- align-items: center;
- gap: var(--sp-2);
- padding: var(--sp-1) var(--sp-2) var(--sp-1) var(--sp-3);
- border-bottom: var(--border-hairline) solid var(--border-primary);
- flex-shrink: 0;
-}
-.video-dock__title {
- font-size: var(--fs-label);
- font-weight: 600;
- color: var(--text-secondary);
-}
-.video-dock__slot {
- flex: 1;
- min-height: 0;
- display: flex;
- background: #000;
-}
-/* The teleported wrapper (non-fullscreen, docked state) fills the slot
- and centres the video letterboxed. */
-.video-dock-wrapper {
- flex: 1;
- min-width: 0;
- display: flex;
- align-items: center;
- justify-content: center;
- background: #000;
-}
-.video-dock-video {
- max-width: 100%;
- max-height: 100%;
- display: block;
-}
-
.video-fullscreen-overlay {
position: fixed;
inset: 0;
diff --git a/static/js/app.modular.js b/static/js/app.modular.js
index 9e4ac499..dbb3f9b4 100644
--- a/static/js/app.modular.js
+++ b/static/js/app.modular.js
@@ -1128,19 +1128,6 @@ document.addEventListener('DOMContentLoaded', async () => {
const showModalVolumeSlider = ref(false);
const showDuplicatesModal = ref(false);
const videoCollapsed = ref(false);
- // Desktop docked-video panel (strip across the bottom of the
- // transcript column). Off by default; an in-memory ref so it
- // stays on as the user moves between video recordings during
- // the session but resets to off on a fresh page load, per the
- // chosen behaviour. Audio recordings simply never show it
- // (isVideoRecording gates visibility).
- const videoDockEnabled = ref(false);
- const isVideoRecording = computed(() =>
- !!(selectedRecording.value
- && selectedRecording.value.mime_type
- && selectedRecording.value.mime_type.startsWith('video/'))
- );
- const toggleVideoDock = () => { videoDockEnabled.value = !videoDockEnabled.value; };
const videoFullscreen = ref(false);
const fullscreenControlsVisible = ref(true);
const fullscreenControlsTimer = ref(null);
@@ -1595,7 +1582,6 @@ document.addEventListener('DOMContentLoaded', async () => {
modalAudioCurrentTime, modalAudioDuration, modalAudioIsPlaying, modalPlaybackRate,
playbackRate, showSpeedMenu, playbackSpeeds, speedMenuPosition, showVolumeSlider, showModalVolumeSlider,
videoFullscreen, fullscreenControlsVisible, fullscreenControlsTimer, videoCollapsed,
- videoDockEnabled, isVideoRecording, toggleVideoDock,
// Column Resizing
leftColumnWidth, rightColumnWidth, isResizing,
diff --git a/templates/components/detail/desktop-bottom-player.html b/templates/components/detail/desktop-bottom-player.html
index edc11544..969783bf 100644
--- a/templates/components/detail/desktop-bottom-player.html
+++ b/templates/components/detail/desktop-bottom-player.html
@@ -21,17 +21,9 @@
<!-- Audio Player -->
<div v-else>
- <!-- Video/Audio element. A SINGLE element teleported between three
- homes so playback never restarts:
- - fullscreen -> body (fullscreen overlay)
- - docked (desktop) -> #videoDockSlot in the transcript column
- - otherwise -> in place here, hidden (audio-only)
- Teleport is disabled (element stays here) only when neither
- fullscreen nor docked. #videoDockSlot is kept mounted via
- v-show on the dock so the target always exists when enabled. -->
- <Teleport :to="videoFullscreen ? 'body' : '#videoDockSlot'"
- :disabled="!videoFullscreen && !(isVideoRecording && videoDockEnabled)">
- <div :class="videoFullscreen ? 'video-fullscreen-overlay' : (isVideoRecording && videoDockEnabled ? 'video-dock-wrapper' : '')"
+ <!-- Video/Audio element wrapped in Teleport for fullscreen -->
+ <Teleport to="body" :disabled="!videoFullscreen">
+ <div :class="videoFullscreen ? 'video-fullscreen-overlay' : ''"
@mousemove="videoFullscreen && handleFullscreenMouseMove()"
@click.self="videoFullscreen && toggleAudioPlayback()">
@@ -47,10 +39,10 @@
@ended="handleAudioEnded"
@waiting="handleAudioWaiting"
@canplay="handleAudioCanPlay"
- @click="selectedRecording.mime_type && selectedRecording.mime_type.startsWith('video/') && !videoFullscreen && toggleAudioPlayback()"
+ @click="selectedRecording.mime_type && selectedRecording.mime_type.startsWith('video/') && toggleAudioPlayback()"
@dblclick="selectedRecording.mime_type && selectedRecording.mime_type.startsWith('video/') && !videoFullscreen && enterVideoFullscreen()"
- :class="isVideoRecording
- ? (videoFullscreen ? 'video-fullscreen-video' : (videoDockEnabled ? 'video-dock-video' : 'hidden'))
+ :class="selectedRecording.mime_type && selectedRecording.mime_type.startsWith('video/')
+ ? (videoFullscreen ? 'video-fullscreen-video' : 'hidden')
: 'hidden'">
</component>
@@ -147,17 +139,6 @@
style="box-shadow: 0 2px 6px rgba(0,0,0,0.3);"></div>
</div>
- <!-- Video toggle (video files only): shows/hides the docked
- video strip at the bottom of the transcript column.
- Accent colour when on. -->
- <button v-if="isVideoRecording"
- @click="toggleVideoDock"
- class="btn btn--icon flex-shrink-0"
- :style="videoDockEnabled ? 'color: var(--text-accent);' : ''"
- :title="videoDockEnabled ? t('tooltips.hideVideo') : t('tooltips.showVideo')">
- <i :class="videoDockEnabled ? 'fas fa-video' : 'fas fa-video-slash'" class="text-sm"></i>
- </button>
-
<!-- Playback speed -->
<div class="relative flex-shrink-0">
<button ref="speedButtonDesktop"
diff --git a/templates/components/detail/desktop-transcription-panel.html b/templates/components/detail/desktop-transcription-panel.html
index 8d32217b..fc6febcd 100644
--- a/templates/components/detail/desktop-transcription-panel.html
+++ b/templates/components/detail/desktop-transcription-panel.html
@@ -277,27 +277,4 @@
</div>
</div>
</div>
-
- <!-- Docked video panel (desktop). Shows the video feed in a strip
- across the bottom of the transcript column when the user enables
- it from the player bar. The single <video> element is teleported
- in here (#videoDockSlot) from the bottom player so playback is
- continuous; going fullscreen teleports the same element to the
- fullscreen overlay instead. As a flex-shrink-0 child after the
- flex-1 transcript scroller it pushes the transcript up rather
- than overlaying it. -->
- <div v-show="isVideoRecording && videoDockEnabled && !videoFullscreen" class="video-dock">
- <div class="video-dock__bar">
- <i class="fas fa-video text-[var(--text-muted)]" style="font-size: 11px;"></i>
- <span class="video-dock__title" v-text="t('tooltips.video')"></span>
- <div class="flex-1"></div>
- <button @click="enterVideoFullscreen" class="btn btn--icon btn--sm" :title="t('tooltips.enterFullscreen')">
- <i class="fas fa-expand" style="font-size: 11px;"></i>
- </button>
- <button @click="toggleVideoDock" class="btn btn--icon btn--sm" :title="t('tooltips.hideVideo')">
- <i class="fas fa-times text-xs"></i>
- </button>
- </div>
- <div id="videoDockSlot" class="video-dock__slot"></div>
- </div>
</div>