mirror of
https://github.com/zoriya/v10.git
synced 2026-08-16 02:45:09 +00:00
fix: add aspect-ratio to demos (#136)
This commit is contained in:
@@ -7,8 +7,8 @@ defineVjsPlayer();
|
||||
document.body.innerHTML = /* html */ `
|
||||
<media-provider>
|
||||
<div style="display: grid; place-items: center; min-height: 100vh;">
|
||||
<media-skin-frosted style="border-radius: 2rem; width: 100%; max-width: 800px; margin: 2rem auto;">
|
||||
<video slot="media" src="https://stream.mux.com/A3VXy02VoUinw01pwyomEO3bHnG4P32xzV7u1j1FSzjNg/high.mp4" muted></video>
|
||||
<media-skin-frosted style="border-radius: 2rem; width: 100%; max-width: 960px; margin: 2rem auto; aspect-ratio: 16/9">
|
||||
<video slot="media" src="https://stream.mux.com/A3VXy02VoUinw01pwyomEO3bHnG4P32xzV7u1j1FSzjNg/high.mp4" muted playsinline poster="https://image.mux.com/A3VXy02VoUinw01pwyomEO3bHnG4P32xzV7u1j1FSzjNg/thumbnail.webp"></video>
|
||||
</media-skin-frosted>
|
||||
</div>
|
||||
</media-provider>
|
||||
|
||||
@@ -111,9 +111,9 @@ export default function App(): JSX.Element {
|
||||
const skinClassName = useMemo(() => {
|
||||
switch (skinKey) {
|
||||
case 'frosted':
|
||||
return 'rounded-4xl shadow shadow-lg shadow-black/15';
|
||||
return 'aspect-video rounded-4xl shadow shadow-lg shadow-black/15';
|
||||
case 'minimal':
|
||||
return 'rounded-2xl shadow shadow-lg shadow-black/15';
|
||||
return 'aspect-video rounded-2xl shadow shadow-lg shadow-black/15';
|
||||
default:
|
||||
return '';
|
||||
}
|
||||
@@ -185,7 +185,7 @@ export default function App(): JSX.Element {
|
||||
<MediaProvider key={key}>
|
||||
<Skin className={skinClassName}>
|
||||
{/* @ts-expect-error -- types are incorrect */}
|
||||
<Video src={mediaSource} poster={poster} />
|
||||
<Video src={mediaSource} poster={poster} playsinline />
|
||||
</Skin>
|
||||
</MediaProvider>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user