翻译: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 ExtensionsW3C 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 中查看

  1. {
  2. "@context": "http://iiif.io/api/presentation/3/context.json",
  3. "id": "https://iiif.io/api/cookbook/recipe/0015-start/manifest.json",
  4. "type": "Manifest",
  5. "label": {
  6. "en": [
  7. "Video of a 30-minute digital clock"
  8. ]
  9. },
  10. "start": {
  11. "id": "https://iiif.io/api/cookbook/recipe/0015-start/canvas-start/segment1",
  12. "type": "SpecificResource",
  13. "source": "https://iiif.io/api/cookbook/recipe/0015-start/canvas/segment1",
  14. "selector": {
  15. "type": "PointSelector",
  16. "t": 120.5
  17. }
  18. },
  19. "rights": "http://creativecommons.org/licenses/by/3.0/",
  20. "requiredStatement": {
  21. "label": {
  22. "en": [
  23. "Attribution"
  24. ]
  25. },
  26. "value": {
  27. "en": [
  28. "<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>"
  29. ]
  30. }
  31. },
  32. "items": [
  33. {
  34. "id": "https://iiif.io/api/cookbook/recipe/0015-start/canvas/segment1",
  35. "type": "Canvas",
  36. "duration": 1801.055,
  37. "items": [
  38. {
  39. "id": "https://iiif.io/api/cookbook/recipe/0015-start/annotation/segment1/page",
  40. "type": "AnnotationPage",
  41. "items": [
  42. {
  43. "id": "https://iiif.io/api/cookbook/recipe/0015-start/annotation/segment1-video",
  44. "type": "Annotation",
  45. "motivation": "painting",
  46. "body": {
  47. "id": "https://fixtures.iiif.io/video/indiana/30-minute-clock/medium/30-minute-clock.mp4",
  48. "type": "Video",
  49. "duration": 1801.055,
  50. "format": "video/mp4"
  51. },
  52. "target": "https://iiif.io/api/cookbook/recipe/0015-start/canvas/segment1"
  53. }
  54. ]
  55. }
  56. ]
  57. }
  58. ]
  59. }

相关专题