跳转到内容
搜索文档

Stream

最后更新 查看 MarkdownAgent 设置

The Stream component is used 47 times on 45 pages.

See all examples of pages that use Stream

Used 47 times.

Pages

Partials

导入

import { Stream } from "~/components";

用法

Chapters

Chapters

<Stream
	id="86f22d1f760b77cdc349f89b25b63c3e"
	title="Connect and secure from any network to anywhere"
	thumbnail="https://pub-d9bf66e086fb4b639107aa52105b49dd.r2.dev/Connect-and-secure-from-any-network-to-anywhere.jpg"
	chapters={{
		"Chapter 1": "30s",
		"Chapter 2": "1m30s",
		"Chapter 3": "3m15s",
		"Chapter 4": "3m25s",
		"Chapter 5": "3m35s",
	}}
/>

<Stream file="warp-1-basics" />

<Stream> Props

id

必填

类型:string

Stream 视频的 ID。

title

必填

类型:string

Stream 视频的标题。

thumbnail

类型:string

时间戳(即 2.5s 或 1m35s)或图像的 URL。

chapters

类型:Record<string, string>

显示在视频下方作为卡片的可选章节。

expandChapters

类型:boolean

默认值:false

如果存在 chapters,则透传到 Details 组件的 open 属性。

showMoreVideos

类型:boolean

默认值:true

是否在视频下方显示 "Watch more videos on our Developer Channel" 链接。

file

类型:string

如果提供了 file,则不能使用 id、title、thumbnail 和 chapters 属性,而是从 stream ↗ 集合中的 YAML 文件中检索它们。

这篇文档对您有帮助吗?