翻译:羊牧东岭

原文地址:https://iiif.io/api/cookbook/recipe/0065-opera-multiple-canvases/

用例

一场歌剧表演可能耗时很长,从而用多张磁带或胶卷等物理介质来分别存放。在进行数字化时,这些物理介质可以分别形成单个文件,然后每个文件分别映射到一个画布 (Canvas) 上。这个现实生活中的例子展示了如何使用多个画布对此进行建模。

实施说明

本例的实现与单一画布上多个音视频文件的目录基本相同,不同之处在于,本例中的两个文件(分别代表歌剧的一幕),每个文件都对应有自己的画布,并如此地在相应结构中被引用。使用两个画布时,播放器将仅显示当前播放的这个文件的持续时长。在切换播放文件时,时间将从零开始。如果你希望针对文件而非整部歌剧来建立时间参考,那么这种实现方法会有所帮助。

限制条件

由于播放器在播放下一个文件时需要切换上下文环境,所以实际上会导致分开播放。为确保连续播放,所有文件应注释到共同的某个画布 (Canvas) 上,就像单一画布上多个音视频文件的目录例子中所示的那样。

例子

JSON-LD | 在Universal Viewer中查看

  1. {
  2. "@context": "http://iiif.io/api/presentation/3/context.json",
  3. "id": "https://iiif.io/api/cookbook/recipe/0065-opera-multiple-canvases/manifest.json",
  4. "type": "Manifest",
  5. "label": {
  6. "it": [
  7. "L'Elisir D'Amore"
  8. ],
  9. "en": [
  10. "The Elixir of Love"
  11. ]
  12. },
  13. "metadata": [
  14. {
  15. "label": {
  16. "en": [
  17. "Date Issued"
  18. ]
  19. },
  20. "value": {
  21. "en": [
  22. "2019"
  23. ]
  24. }
  25. },
  26. {
  27. "label": {
  28. "en": [
  29. "Publisher"
  30. ]
  31. },
  32. "value": {
  33. "en": [
  34. "Indiana University Jacobs School of Music"
  35. ]
  36. }
  37. }
  38. ],
  39. "items": [
  40. {
  41. "id": "https://iiif.io/api/cookbook/recipe/0065-opera-multiple-canvases/canvas/1",
  42. "type": "Canvas",
  43. "width": 1920,
  44. "height": 1080,
  45. "duration": 3971.24,
  46. "label": {
  47. "en": [
  48. "Atto Primo"
  49. ]
  50. },
  51. "items": [
  52. {
  53. "id": "https://iiif.io/api/cookbook/recipe/0065-opera-multiple-canvases/canvas/1/annotation_page/1",
  54. "type": "AnnotationPage",
  55. "items": [
  56. {
  57. "id": "https://iiif.io/api/cookbook/recipe/0065-opera-multiple-canvases/canvas/1/annotation_page/1/annotation/1",
  58. "type": "Annotation",
  59. "motivation": "painting",
  60. "target": "https://iiif.io/api/cookbook/recipe/0065-opera-multiple-canvases/canvas/1",
  61. "body": {
  62. "id": "https://fixtures.iiif.io/video/indiana/donizetti-elixir/vae0637_accessH264_low_act_1.mp4",
  63. "type": "Video",
  64. "format": "video/mp4",
  65. "height": 1080,
  66. "width": 1920,
  67. "duration": 3971.24
  68. }
  69. }
  70. ]
  71. }
  72. ],
  73. "thumbnail": [
  74. {
  75. "id": "https://fixtures.iiif.io/video/indiana/donizetti-elixir/act1-thumbnail.png",
  76. "type": "Image"
  77. }
  78. ]
  79. },
  80. {
  81. "id": "https://iiif.io/api/cookbook/recipe/0065-opera-multiple-canvases/canvas/2",
  82. "type": "Canvas",
  83. "width": 1920,
  84. "height": 1080,
  85. "duration": 3307.22,
  86. "label": {
  87. "en": [
  88. "Atto Secondo"
  89. ]
  90. },
  91. "items": [
  92. {
  93. "id": "https://iiif.io/api/cookbook/recipe/0065-opera-multiple-canvases/canvas/2/annotation_page/1",
  94. "type": "AnnotationPage",
  95. "items": [
  96. {
  97. "id": "https://iiif.io/api/cookbook/recipe/0065-opera-multiple-canvases/canvas/2/annotation_page/1/annotation/1",
  98. "type": "Annotation",
  99. "motivation": "painting",
  100. "target": "https://iiif.io/api/cookbook/recipe/0065-opera-multiple-canvases/canvas/2",
  101. "body": {
  102. "id": "https://fixtures.iiif.io/video/indiana/donizetti-elixir/vae0637_accessH264_low_act_2.mp4",
  103. "type": "Video",
  104. "format": "video/mp4",
  105. "height": 1080,
  106. "width": 1920,
  107. "duration": 3307.22
  108. }
  109. }
  110. ]
  111. }
  112. ],
  113. "thumbnail": [
  114. {
  115. "id": "https://fixtures.iiif.io/video/indiana/donizetti-elixir/act2-thumbnail.png",
  116. "type": "Image"
  117. }
  118. ]
  119. }
  120. ],
  121. "structures": [
  122. {
  123. "type": "Range",
  124. "id": "https://iiif.io/api/cookbook/recipe/0065-opera-multiple-canvases/range/1",
  125. "label": {
  126. "it": [
  127. "Gaetano Donizetti, L'Elisir D'Amore"
  128. ]
  129. },
  130. "items": [
  131. {
  132. "type": "Range",
  133. "id": "https://iiif.io/api/cookbook/recipe/0065-opera-multiple-canvases/range/2",
  134. "label": {
  135. "en": [
  136. "Atto Primo"
  137. ]
  138. },
  139. "items": [
  140. {
  141. "type": "Range",
  142. "id": "https://iiif.io/api/cookbook/recipe/0065-opera-multiple-canvases/range/3",
  143. "label": {
  144. "it": [
  145. "Preludio e Coro d'introduzione – Bel conforto al mietitore"
  146. ]
  147. },
  148. "items": [
  149. {
  150. "type": "Canvas",
  151. "id": "https://iiif.io/api/cookbook/recipe/0065-opera-multiple-canvases/canvas/1#t=0,302.05"
  152. }
  153. ]
  154. },
  155. {
  156. "type": "Range",
  157. "id": "https://iiif.io/api/cookbook/recipe/0065-opera-multiple-canvases/range/4",
  158. "label": {
  159. "en": [
  160. "Remainder of Atto Primo"
  161. ]
  162. },
  163. "items": [
  164. {
  165. "type": "Canvas",
  166. "id": "https://iiif.io/api/cookbook/recipe/0065-opera-multiple-canvases/canvas/1#t=302.05,3971.24"
  167. }
  168. ]
  169. }
  170. ]
  171. },
  172. {
  173. "type": "Range",
  174. "id": "https://iiif.io/api/cookbook/recipe/0065-opera-multiple-canvases/range/5",
  175. "label": {
  176. "en": [
  177. "Atto Secondo"
  178. ]
  179. },
  180. "items": [
  181. {
  182. "type": "Canvas",
  183. "id": "https://iiif.io/api/cookbook/recipe/0065-opera-multiple-canvases/canvas/2#t=0,3307.22"
  184. }
  185. ]
  186. }
  187. ]
  188. }
  189. ]
  190. }

相关专题