翻译:Wu Gang
原文地址:https://iiif.io/api/cookbook/recipe/0015-start/
专题主页 | 专题列表
用例
通常,音频或视频资源包含属于对象但不重要的内容,例如麦克风检查,或表演开始前的观众噪音,或测试卡。 start 属性允许发布者指定客户端应用程序应该开始回放的点。
实施说明
通过添加客户端在特定点开始回放所需的信息,本专题扩展了“ 最简单的清单 - 视频”。这是通过将 start 属性(起始时间以秒为单位)添加到 Manifest 上来完成的。
start 属性的目标必须是具有 id 和 type 属性的 JSON 对象,可以是 Canvas ,也可以是带有 Selector 和 source 属性的特定资源,其中source属性的值为Canvas。
在本用例中,目标 type 属性是一个 SpecificResource (“type”: “SpecificResource”), Selector 的 type 属性是一个 PointSelector (“type”: “PointSelector”),它标识了源中的起始时间点 (“t”: 120.5)。
有关 start 属性的更多信息,请参阅:Start 属性。
关于 Selector 类:
Annotation 目标中的Seclector用于描述如何检索资源的给定部分。 IIIF 规范中定义了三个 Selector 类,但只有 PointSelector 类适用于本用例。 PointSelector 类在空间 (x, y) 和/或时间 (t) 上定义特定点。
有关其他 Selector 类的更多信息,请参阅:IIIF Open/Web Annotation Extensions 和 W3C Web Annotation Selectors。
示例
本示例显示了一个带有单个 Canvas 的 Manifest,持续时间为 1801.055 秒。 它有一个与之关联的视频文件 (30-minute-clock.mp4)。 start 属性指定回放开始点为 120.5 秒。 该视频由 DrLex1 创建,并使用 Creative Commons Attribution license 发布。
注意:在撰写本专题时,某些查看器(Universal Viewer)支持视频内容的回放,但查看器尚不支持基于时间的对象的 start 属性。
JSON-LD | 在 Universal Viewer 中查看
{
"@context": "http://iiif.io/api/presentation/3/context.json",
"id": "https://iiif.io/api/cookbook/recipe/0015-start/manifest.json",
"type": "Manifest",
"label": {
"en": [
"Video of a 30-minute digital clock"
]
},
"start": {
"id": "https://iiif.io/api/cookbook/recipe/0015-start/canvas-start/segment1",
"type": "SpecificResource",
"source": "https://iiif.io/api/cookbook/recipe/0015-start/canvas/segment1",
"selector": {
"type": "PointSelector",
"t": 120.5
}
},
"rights": "http://creativecommons.org/licenses/by/3.0/",
"requiredStatement": {
"label": {
"en": [
"Attribution"
]
},
"value": {
"en": [
"<span>The video was created by <a href='https://www.youtube.com/watch?v=Lsq0FiXjGHg'>DrLex1</a> and was released using a <a href='https://creativecommons.org/licenses/by/3.0/'>Creative Commons Attribution license</a></span>"
]
}
},
"items": [
{
"id": "https://iiif.io/api/cookbook/recipe/0015-start/canvas/segment1",
"type": "Canvas",
"duration": 1801.055,
"items": [
{
"id": "https://iiif.io/api/cookbook/recipe/0015-start/annotation/segment1/page",
"type": "AnnotationPage",
"items": [
{
"id": "https://iiif.io/api/cookbook/recipe/0015-start/annotation/segment1-video",
"type": "Annotation",
"motivation": "painting",
"body": {
"id": "https://fixtures.iiif.io/video/indiana/30-minute-clock/medium/30-minute-clock.mp4",
"type": "Video",
"duration": 1801.055,
"format": "video/mp4"
},
"target": "https://iiif.io/api/cookbook/recipe/0015-start/canvas/segment1"
}
]
}
]
}
]
}
相关专题
- 最简单的清单 - 视频 显示一个简单视频资源的清单。
- 最简单的清单 - 音频 显示一个简单音频资源的清单。
- [从特定的画布开始加载清单][202] 使用 start 属性在特定画布上加载。