Repository navigation
Replies: 2 comments 1 reply
|
The 16:9 comes from inside the compat skin's shadow root, not from your container. This is now tracked as a bug in #9691, and #9692 removes the fixed ratio (it's open, not released yet). Once it ships, Until then, you can add a small stylesheet to the skin's shadow root (it's an open shadow root): <script setup>
import { onMounted, ref } from 'vue';
const skin = ref(null); // same ref="skin" you already have on <video-compat-skin>
onMounted(async () => {
await customElements.whenDefined('video-compat-skin');
const root = skin.value?.shadowRoot;
if (!root) return;
const sheet = new CSSStyleSheet();
sheet.replaceSync(`
.media-container { aspect-ratio: auto; height: 100%; min-height: 0; }
::slotted(:not([slot])) { width: 100%; height: 100% !important; }
`);
root.adoptedStyleSheets = [...root.adoptedStyleSheets, sheet];
});
</script>The first rule makes the inner container follow the skin element's size. The second makes the slotted media element ( I tested this with
|
|
Thanks for the report and the screenshots. You're right: the compat skin was forcing 16:9 on the container inside its shadow root, so an This is fixed in v10.3.0 by #9692 (tracked in #9691). After you upgrade, the |


Thanks for the report and the screenshots. You're right: the compat skin was forcing 16:9 on the container inside its shadow root, so an
aspect-ratioon<video-compat-skin>only changed the outer element.This is fixed in v10.3.0 by #9692 (tracked in #9691). After you upgrade, the
aspect-ratioyou set on the skin element controls the player's shape in every skin. The video and poster fill the player and stay centered, even if your page uses a CSS reset like Tailwind'svideo { height: auto }.