Media Preview(媒体预览(Media Preview))¶
The Media Preview widget can be used to display image, audio, video, and document media, given a supported media source. Currently supported media sources include media URLs, attachment properties, and media reference properties.
Configuration Options¶
- Media string
- Media string options support images referenced in the following three formats to render a preview of the media:
- Blobster RID, for example,
ri.blobster.main.image.ab1c23d4-56ef-789g-h012-3456ij78k90l. - Media URL
- If referencing a media URL from a media set, the URL should be of the format:
https://{my-foundry-url}/mio/api/media-set/{media set rid}/items/{media item rid}. - If referencing a media URL from a dataset, the URL should be of the format:
https://{my-foundry-url}/foundry-data-proxy/api/web/dataproxy/datasets/{dataset rid}/transactions/{transaction rid}/{filename}orhttps://{my-foundry-url}/foundry-data-proxy/api/web/dataproxy/datasets/{dataset rid}/views/{branch name}/{filename}. - If referencing an external media URL, ensure access has been configured in your enrollment’s Content Security Policy settings.
- Data URL with a Base64-encoded media, for example,
data:image/png;base64,{base64-encoded image}.
- Blobster RID, for example,
- Attachment property
- Define an object set with a single object and select the attachment typed property to render a preview of the media for that object.
- Media reference property
- Define an object set with a single object and select the media reference typed property to render a preview of the media for that object.
Specialized media preview widgets¶
The media preview widget displays all types of media, whereas the specialized media preview widgets listed below can only display a specific type of media, but provide additional functionality for their specific media type.
- PDF Viewer Widget
- Supports display of annotations and provides other additional configuration options.
- Video Display Widget
- Supports additional video specific configuration, such as jumping to specific frames, as well as scrubbing/seeking to move to a specific timestamp.
- Audio and Transcription Display widget
- Supports additional audio specific configuration, such as scrubbing/seeking to move to a specific timestamp, as well as transcription display and interaction.
中文翻译¶
媒体预览(Media Preview)¶
媒体预览(Media Preview)组件可用于显示图像、音频、视频和文档媒体,前提是提供支持的媒体源。当前支持的媒体源包括媒体URL、附件属性(attachment properties)和媒体引用属性(media reference properties)。
配置选项¶
- 媒体字符串(Media string)
- 媒体字符串选项支持以下三种格式引用的图像,以渲染媒体预览:
- Blobster RID,例如
ri.blobster.main.image.ab1c23d4-56ef-789g-h012-3456ij78k90l。 - 媒体URL(Media URL)
- 如果引用来自媒体集(media set)的媒体URL,URL格式应为:
https://{my-foundry-url}/mio/api/media-set/{media set rid}/items/{media item rid}。 - 如果引用来自数据集(dataset)的媒体URL,URL格式应为:
https://{my-foundry-url}/foundry-data-proxy/api/web/dataproxy/datasets/{dataset rid}/transactions/{transaction rid}/{filename}或https://{my-foundry-url}/foundry-data-proxy/api/web/dataproxy/datasets/{dataset rid}/views/{branch name}/{filename}。 - 如果引用外部媒体URL,请确保已在您的注册环境的内容安全策略(Content Security Policy)设置中配置了访问权限。
- 包含Base64编码媒体的数据URL(Data URL),例如
data:image/png;base64,{base64-encoded image}。
- Blobster RID,例如
- 附件属性(Attachment property)
- 定义一个包含单个对象的对象集(object set),并选择附件类型属性,以渲染该对象的媒体预览。
- 媒体引用属性(Media reference property)
- 定义一个包含单个对象的对象集,并选择媒体引用(media reference)类型属性,以渲染该对象的媒体预览。
专用媒体预览组件¶
媒体预览组件可显示所有类型的媒体,而下面列出的专用媒体预览组件只能显示特定类型的媒体,但为其特定媒体类型提供了额外功能。
- PDF查看器组件(PDF Viewer Widget)
- 支持显示注释,并提供其他附加配置选项。
- 视频显示组件(Video Display Widget)
- 支持视频特定的附加配置,例如跳转到特定帧,以及通过拖拽/搜索移动到特定时间戳。
- 音频与转录显示组件(Audio and Transcription Display widget)
- 支持音频特定的附加配置,例如通过拖拽/搜索移动到特定时间戳,以及转录显示和交互。