Files
ko-grammar/docs/.vitepress/theme/components/YouTube.vue
T
2026-09-12 19:09:09 +07:00

52 lines
911 B
Vue

<template>
<div :class="$style.container">
<iframe
:class="$style.iframe"
width="100%"
height="100%"
:src="
'https://www.youtube.com/embed/' +
($props.list ? `videoseries?list=${$props.list}` : $props.id)
"
:title="$props.title"
frameborder="0"
allow="
accelerometer;
autoplay;
encrypted-media;
gyroscope;
picture-in-picture;
fullscreen;
clipboard-write;
web-share;
"
referrerpolicy="strict-origin-when-cross-origin"
allowfullscreen
>
</iframe>
</div>
</template>
<script setup lang="ts">
defineProps<{
id?: string;
list?: string;
title?: string;
}>();
</script>
<style module>
.container {
padding-bottom: 56.25%;
position: relative;
}
.iframe {
position: absolute;
top: 0px;
left: 0px;
width: 100%;
height: 100%;
}
</style>