From 25818ae89f757339bedde9b45b7cd2a2c7edfed7 Mon Sep 17 00:00:00 2001 From: Glen Lowland Date: Mon, 1 May 2023 23:06:19 +0100 Subject: [PATCH] Fix seekbar preview aspect ratio and cropping This PR fixes two issue observed with the seekbar preview: - sometimes images got cropped incorrectly at the end of the video due to image having less frames that server tells us - so calculate it in place; - set canvas width and height based on actual frame data so it follows the video aspect ratio rather than hard-coded value. --- src/components/VideoPlayer.vue | 43 ++++++++++++++++++++++------------ 1 file changed, 28 insertions(+), 15 deletions(-) diff --git a/src/components/VideoPlayer.vue b/src/components/VideoPlayer.vue index 40378759..8693adb8 100644 --- a/src/components/VideoPlayer.vue +++ b/src/components/VideoPlayer.vue @@ -6,7 +6,7 @@ :class="{ 'player-container': !isEmbed }" >