Skip to content
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
6 changes: 5 additions & 1 deletion assets/src/blocks/godam-player/VideoJS.js
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down
Loading