Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 7 additions & 2 deletions core/frontend/src/components/video-manager/VideoThumbnail.vue
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<v-container class="d-flex flex-column align-center justify-space-between">
<div
class="thumbnail-frame d-flex align-center justify-center"
:style="{ width: width + 'px', aspectRatio: '16 / 9' }"
:style="{ width: parsedWidth, aspectRatio: '16 / 9' }"
>
<span
v-if="disabled"
Expand Down Expand Up @@ -33,7 +33,7 @@
<img
v-else
:src="thumbnail?.source"
style="width: 100%; height: 100%; object-fit: cover;"
style="width: 100%; height: 100%; object-fit: contain;"
>
<div
v-if="is_pirate_mode && register"
Expand All @@ -60,6 +60,7 @@
<div
v-if="register"
class="thumbnail-controls d-flex align-center"
@click.stop.prevent
>
<v-tooltip bottom>
<template #activator="{ on, attrs }">
Expand Down Expand Up @@ -155,6 +156,9 @@ export default Vue.extend({
return this.register && this.thumbnail === undefined
&& !this.continuous_mode && !this.snapshot_in_progress
},
parsedWidth(): string {
return /^\d+$/.test(this.width) ? `${this.width}px` : this.width
},
is_pirate_mode(): boolean {
return settings.is_pirate_mode
},
Expand Down Expand Up @@ -229,6 +233,7 @@ export default Vue.extend({
overflow: hidden;
border-radius: 4px;
background: rgba(0, 0, 0, 0.08);
max-height: 100%;
}

.thumbnail-overlay {
Expand Down
3 changes: 1 addition & 2 deletions core/frontend/src/views/MainView.vue
Original file line number Diff line number Diff line change
Expand Up @@ -220,8 +220,7 @@ export default Vue.extend({
props: {
source,
register: stream.running,
width: 'auto',
height: '100%',
width: '100%',
},
style: {
display: 'flex',
Expand Down
Loading