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
4 changes: 3 additions & 1 deletion src/runtime/components/ScriptYouTubePlayer.vue
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ const props = withDefaults(defineProps<{
playerVars?: YT.PlayerVars
width?: number
height?: number
ratio?: string
/**
* Whether to use youtube-nocookie.com for embedding.
*
Expand All @@ -59,6 +60,7 @@ const props = withDefaults(defineProps<{
playerVars: { autoplay: 0, playsinline: 1 },
width: 640,
height: 360,
ratio: '16/9',
placeholderObjectFit: 'cover',
})

Expand Down Expand Up @@ -197,7 +199,7 @@ const rootAttrs = computed(() => {
position: 'relative',
backgroundColor: 'black',
width: '100%',
aspectRatio: `${props.width}/${props.height}`,
aspectRatio: props.ratio,
},
...(trigger instanceof Promise ? trigger.ssrAttrs || {} : {}),
}) as HTMLAttributes
Expand Down
Loading