跳转到内容
搜索文档

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.5s1m35s)或图像的 URL。

chapters

类型Record<string, string>

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

expandChapters

类型boolean

默认值false

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

showMoreVideos

类型boolean

默认值true

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

file

类型string

如果提供了 file,则不能使用 idtitlethumbnailchapters 属性,而是从 stream 集合中的 YAML 文件中检索它们。

这篇文档对您有帮助吗?