From 4821a79db9854fda64bc62d8567532a5ddd99bb6 Mon Sep 17 00:00:00 2001 From: KMchaudhary Date: Tue, 20 Jan 2026 13:12:17 +0530 Subject: [PATCH] Fix the aspectRatio compatibility issue on godam video block --- assets/src/blocks/godam-player/VideoJS.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/assets/src/blocks/godam-player/VideoJS.js b/assets/src/blocks/godam-player/VideoJS.js index b00855da7..81212d6f8 100644 --- a/assets/src/blocks/godam-player/VideoJS.js +++ b/assets/src/blocks/godam-player/VideoJS.js @@ -42,8 +42,12 @@ export const VideoJS = ( props ) => { const videojsOptions = { ...options }; + if ( ! options.aspectRatio ) { + videojsOptions.aspectRatio = '16:9'; + } + if ( options.aspectRatio && ! /^\d+:\d+$/.test( options.aspectRatio ) ) { - // Remove aspectRatio from options as we will set it later + // Unset the aspectRatio from videojsOptions as we will set it later delete videojsOptions.aspectRatio; }