Skip to content
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

#2522: fixed overlay; added announcement of the resize when the video… #3075

Merged
merged 1 commit into from
Jan 8, 2025
Merged
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: 6 additions & 3 deletions dashboard/src/common-components/video/VideoPlayer.vue
Original file line number Diff line number Diff line change
Expand Up @@ -54,10 +54,10 @@ const playerWidth = ref(null);
const playerHeight = ref(null);
const isConfiguredVideoSize = computed(() => playerWidth.value && playerHeight.value)
const resolution = computed(() => {
if (!videoPlayerSizeInStorage?.value) {
if (!playerWidth?.value || !playerHeight?.value) {
return ''
}
return `${videoPlayerSizeInStorage.value.width} x ${videoPlayerSizeInStorage.value.height}`
return `${playerWidth.value} x ${playerHeight.value}`
})
const isResizing = ref(false);

Expand Down Expand Up @@ -167,6 +167,9 @@ const createResizeSupport = () => {
function stopResize() {
window.removeEventListener('mousemove', resize)
isResizing.value = false
if (playerWidth.value && playerHeight.value) {
announcer.polite(`Resized the video player to ${playerWidth.value} x ${playerHeight.value}`)
}
}
}

Expand All @@ -193,7 +196,7 @@ const createResizeSupport = () => {
<div v-if="isResizing" class="text-center flex align-items-center justify-content-center ">
<div class="absolute z-4 top-0 left-0 right-0 bottom-0 bg-gray-600 opacity-50 text-center flex align-items-center justify-content-center " >
</div>
<div class="absolute top-0 z-5 text-center bg-white mt-5 border-1 border-round" style="width: 100px;">
<div class="absolute top-0 z-5 text-center bg-primary-reverse mt-5 border-1 border-round" style="width: 100px;">
{{ resolution }}
</div>
</div>
Expand Down
Loading