mirror of
https://github.com/zoriya/v10.git
synced 2026-08-16 02:45:09 +00:00
Bring the tailwind style support up to date with demos added on main
since this branch was written:
- html/tailwind and react/tailwind BasicUsage variants for the new media
element references (background-video, cast-button, dash-video,
hlsjs-video, mux-audio, mux-video, native-hls-video, simple-hls-video,
simple-hls-audio-only) and the use-media reference, mirroring their
css variants 1:1
- wire the new variants into the reference pages behind
<StyleCase styles={["tailwind"]}> (react demos on the media element
pages stay source-only, matching the css variants until #1343 lands)
- sync the tooltip react tailwind demos with the Tooltip.Label change
the css variants picked up in the meantime
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01WD9APXrFDbbMEUZrR1imz3
84 lines
3.5 KiB
Plaintext
84 lines
3.5 KiB
Plaintext
---
|
|
title: DashVideo
|
|
frameworkTitle:
|
|
html: dash-video
|
|
description: DASH video element powered by dash.js for adaptive bitrate streaming
|
|
---
|
|
|
|
import MediaReference from "@/components/docs/api-reference/MediaReference.astro";
|
|
import FrameworkCase from "@/components/docs/FrameworkCase.astro";
|
|
import StyleCase from "@/components/docs/StyleCase.astro";
|
|
import Demo from "@/components/docs/demos/Demo.astro";
|
|
|
|
{/* React live demo disabled until #1343 (SSR-breaking media imports) is fixed; show source instead. */}
|
|
import { TabsRoot, TabsList, Tab, TabsPanel } from "@/components/Tabs";
|
|
import ServerCode from "@/components/Code/ServerCode.astro";
|
|
import basicUsageReactTsx from "@/components/docs/demos/dash-video/react/css/BasicUsage.tsx?raw";
|
|
import basicUsageReactCss from "@/components/docs/demos/dash-video/react/css/BasicUsage.css?raw";
|
|
import basicUsageReactTailwindTsx from "@/components/docs/demos/dash-video/react/tailwind/BasicUsage.tsx?raw";
|
|
|
|
{/* HTML demos */}
|
|
import BasicUsageDemoHtml from "@/components/docs/demos/dash-video/html/css/BasicUsage.astro";
|
|
import basicUsageHtml from "@/components/docs/demos/dash-video/html/css/BasicUsage.html?raw";
|
|
import basicUsageHtmlCss from "@/components/docs/demos/dash-video/html/css/BasicUsage.css?raw";
|
|
import basicUsageHtmlTs from "@/components/docs/demos/dash-video/html/css/BasicUsage.ts?raw";
|
|
import BasicUsageDemoHtmlTailwind from "@/components/docs/demos/dash-video/html/tailwind/BasicUsage.astro";
|
|
import basicUsageTailwindHtml from "@/components/docs/demos/dash-video/html/tailwind/BasicUsage.html?raw";
|
|
import basicUsageTailwindHtmlTs from "@/components/docs/demos/dash-video/html/tailwind/BasicUsage.ts?raw";
|
|
|
|
DASH video element powered by [dash.js](https://github.com/Dash-Industry-Forum/dash.js/) for MPEG-DASH adaptive bitrate streaming.
|
|
|
|
## Examples
|
|
|
|
### Basic Usage
|
|
|
|
{/* React: source-only until #1343 is fixed. Restore <Demo> with <BasicUsageDemoReact client:idle /> afterward. */}
|
|
<FrameworkCase frameworks={["react"]}>
|
|
<StyleCase styles={["css"]}>
|
|
<TabsRoot client:idle>
|
|
<TabsList client:idle label="Basic usage source code">
|
|
<Tab client:idle value="App.tsx" initial>App.tsx</Tab>
|
|
<Tab client:idle value="App.css">App.css</Tab>
|
|
</TabsList>
|
|
<TabsPanel client:idle value="App.tsx" initial>
|
|
<ServerCode code={basicUsageReactTsx} lang="tsx" />
|
|
</TabsPanel>
|
|
<TabsPanel client:idle value="App.css">
|
|
<ServerCode code={basicUsageReactCss} lang="css" />
|
|
</TabsPanel>
|
|
</TabsRoot>
|
|
</StyleCase>
|
|
<StyleCase styles={["tailwind"]}>
|
|
<TabsRoot client:idle>
|
|
<TabsList client:idle label="Basic usage source code">
|
|
<Tab client:idle value="App.tsx" initial>App.tsx</Tab>
|
|
</TabsList>
|
|
<TabsPanel client:idle value="App.tsx" initial>
|
|
<ServerCode code={basicUsageReactTailwindTsx} lang="tsx" />
|
|
</TabsPanel>
|
|
</TabsRoot>
|
|
</StyleCase>
|
|
</FrameworkCase>
|
|
|
|
<FrameworkCase frameworks={["html"]}>
|
|
<StyleCase styles={["css"]}>
|
|
<Demo files={[
|
|
{ title: "index.html", code: basicUsageHtml, lang: "html" },
|
|
{ title: "index.css", code: basicUsageHtmlCss, lang: "css" },
|
|
{ title: "index.ts", code: basicUsageHtmlTs, lang: "ts" },
|
|
]}>
|
|
<BasicUsageDemoHtml />
|
|
</Demo>
|
|
</StyleCase>
|
|
<StyleCase styles={["tailwind"]}>
|
|
<Demo files={[
|
|
{ title: "index.html", code: basicUsageTailwindHtml, lang: "html" },
|
|
{ title: "index.ts", code: basicUsageTailwindHtmlTs, lang: "ts" },
|
|
]}>
|
|
<BasicUsageDemoHtmlTailwind />
|
|
</Demo>
|
|
</StyleCase>
|
|
</FrameworkCase>
|
|
|
|
<MediaReference media="DashVideo" />
|