mirror of
https://github.com/zoriya/v10.git
synced 2026-08-05 05:37:21 +00:00
[codex] fix intrinsic media aspect ratio handling (#1197)
This commit is contained in:
@@ -138,7 +138,7 @@ async function render() {
|
||||
|
||||
root.innerHTML = html`
|
||||
<${playerTag}>
|
||||
<${skinTag} class="w-full aspect-video max-w-4xl mx-auto">
|
||||
<${skinTag} class="aspect-video max-w-4xl mx-auto">
|
||||
<${mediaTag} src="${src}" playsinline crossorigin="anonymous">
|
||||
${renderStoryboard(storyboard)}
|
||||
</${mediaTag}>
|
||||
|
||||
@@ -21,7 +21,7 @@ async function render() {
|
||||
|
||||
document.getElementById('root')!.innerHTML = html`
|
||||
<video-player>
|
||||
<${tag} class="w-full aspect-video max-w-4xl mx-auto">
|
||||
<${tag} class="aspect-video max-w-4xl mx-auto">
|
||||
<dash-video src="${SOURCES[state.source].url}" playsinline>
|
||||
${renderStoryboard(storyboard)}
|
||||
</dash-video>
|
||||
|
||||
@@ -21,7 +21,7 @@ async function render() {
|
||||
|
||||
document.getElementById('root')!.innerHTML = html`
|
||||
<video-player>
|
||||
<${tag} class="w-full aspect-video max-w-4xl mx-auto">
|
||||
<${tag} class="aspect-video max-w-4xl mx-auto">
|
||||
<hls-video src="${SOURCES[state.source].url}" playsinline crossorigin="anonymous">
|
||||
${renderStoryboard(storyboard)}
|
||||
</hls-video>
|
||||
|
||||
@@ -26,7 +26,7 @@ async function render() {
|
||||
|
||||
document.getElementById('root')!.innerHTML = html`
|
||||
<video-player>
|
||||
<${tag} class="w-full aspect-video max-w-4xl mx-auto">
|
||||
<${tag} class="aspect-video max-w-4xl mx-auto">
|
||||
<mux-video ${sourceAttr} debug playsinline crossorigin="anonymous">
|
||||
${renderStoryboard(storyboard)}
|
||||
</mux-video>
|
||||
|
||||
@@ -21,7 +21,7 @@ async function render() {
|
||||
|
||||
document.getElementById('root')!.innerHTML = html`
|
||||
<video-player>
|
||||
<${tag} class="w-full aspect-video max-w-4xl mx-auto">
|
||||
<${tag} class="aspect-video max-w-4xl mx-auto">
|
||||
<simple-hls-video src="${SOURCES[state.source].url}" playsinline crossorigin="anonymous">
|
||||
${renderStoryboard(storyboard)}
|
||||
</simple-hls-video>
|
||||
|
||||
@@ -20,7 +20,7 @@ async function render() {
|
||||
|
||||
document.getElementById('root')!.innerHTML = html`
|
||||
<video-player>
|
||||
<${tag} class="w-full aspect-video max-w-4xl mx-auto">
|
||||
<${tag} class="aspect-video max-w-4xl mx-auto">
|
||||
<video src="${SOURCES[state.source].url}" playsinline crossorigin="anonymous">
|
||||
${renderStoryboard(storyboard)}
|
||||
</video>
|
||||
|
||||
@@ -20,7 +20,7 @@ function App() {
|
||||
|
||||
return (
|
||||
<VideoProvider>
|
||||
<VideoSkinComponent skin={skin} styling={styling} className="w-full aspect-video max-w-4xl mx-auto">
|
||||
<VideoSkinComponent skin={skin} styling={styling} className="aspect-video max-w-4xl mx-auto">
|
||||
<DashVideo src={SOURCES[source].url} playsInline />
|
||||
</VideoSkinComponent>
|
||||
</VideoProvider>
|
||||
|
||||
@@ -25,12 +25,7 @@ function App() {
|
||||
|
||||
return (
|
||||
<VideoProvider>
|
||||
<VideoSkinComponent
|
||||
poster={poster}
|
||||
skin={skin}
|
||||
styling={styling}
|
||||
className="w-full aspect-video max-w-4xl mx-auto"
|
||||
>
|
||||
<VideoSkinComponent poster={poster} skin={skin} styling={styling} className="aspect-video max-w-4xl mx-auto">
|
||||
<HlsVideo src={SOURCES[source].url} playsInline crossOrigin="anonymous">
|
||||
<Storyboard src={storyboard} />
|
||||
</HlsVideo>
|
||||
|
||||
@@ -28,12 +28,7 @@ function App() {
|
||||
|
||||
return (
|
||||
<VideoProvider>
|
||||
<VideoSkinComponent
|
||||
poster={poster}
|
||||
skin={skin}
|
||||
styling={styling}
|
||||
className="w-full aspect-video max-w-4xl mx-auto"
|
||||
>
|
||||
<VideoSkinComponent poster={poster} skin={skin} styling={styling} className="aspect-video max-w-4xl mx-auto">
|
||||
<MuxVideo {...sourceAttr} debug playsInline crossOrigin="anonymous">
|
||||
<Storyboard src={storyboard} />
|
||||
</MuxVideo>
|
||||
|
||||
@@ -25,12 +25,7 @@ function App() {
|
||||
|
||||
return (
|
||||
<VideoProvider>
|
||||
<VideoSkinComponent
|
||||
poster={poster}
|
||||
skin={skin}
|
||||
styling={styling}
|
||||
className="w-full aspect-video max-w-4xl mx-auto"
|
||||
>
|
||||
<VideoSkinComponent poster={poster} skin={skin} styling={styling} className="aspect-video max-w-4xl mx-auto">
|
||||
<SimpleHlsVideo src={SOURCES[source].url} playsInline crossOrigin="anonymous">
|
||||
<Storyboard src={storyboard} />
|
||||
</SimpleHlsVideo>
|
||||
|
||||
@@ -25,12 +25,7 @@ function App() {
|
||||
|
||||
return (
|
||||
<VideoProvider>
|
||||
<VideoSkinComponent
|
||||
poster={poster}
|
||||
skin={skin}
|
||||
styling={styling}
|
||||
className="w-full aspect-video max-w-4xl mx-auto"
|
||||
>
|
||||
<VideoSkinComponent poster={poster} skin={skin} styling={styling} className="aspect-video max-w-4xl mx-auto">
|
||||
<Video src={SOURCES[source].url} playsInline crossOrigin="anonymous">
|
||||
<Storyboard src={storyboard} />
|
||||
</Video>
|
||||
|
||||
@@ -2,9 +2,10 @@ media-tooltip-group {
|
||||
display: contents;
|
||||
}
|
||||
|
||||
/* Fixes a weird issue with Safari when setting aspect-ratio */
|
||||
:host {
|
||||
/* `display:grid` fixes a weird issue with Safari when setting aspect-ratio */
|
||||
display: grid;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
/* Hide volume popover when volume control is unsupported (e.g., iOS Safari). */
|
||||
|
||||
@@ -19,7 +19,7 @@ const Player = createPlayer({ features: videoFeatures });
|
||||
export function FrostedSkinDemo() {
|
||||
return (
|
||||
<Player.Provider>
|
||||
<VideoSkin className="w-full aspect-video" poster={VJS10_DEMO_VIDEO.poster}>
|
||||
<VideoSkin className="aspect-video" poster={VJS10_DEMO_VIDEO.poster}>
|
||||
<Video src={VJS10_DEMO_VIDEO.mp4} playsInline />
|
||||
</VideoSkin>
|
||||
</Player.Provider>
|
||||
|
||||
@@ -17,7 +17,7 @@ const Player = createPlayer({ features: videoFeatures });
|
||||
export function MinimalSkinDemo() {
|
||||
return (
|
||||
<Player.Provider>
|
||||
<MinimalVideoSkin className="w-full aspect-video" poster={VJS10_DEMO_VIDEO.poster}>
|
||||
<MinimalVideoSkin className="aspect-video" poster={VJS10_DEMO_VIDEO.poster}>
|
||||
<Video src={VJS10_DEMO_VIDEO.mp4} playsInline />
|
||||
</MinimalVideoSkin>
|
||||
</Player.Provider>
|
||||
|
||||
Reference in New Issue
Block a user