-
Notifications
You must be signed in to change notification settings - Fork 4
/
217.txt
55 lines (40 loc) · 2.49 KB
/
217.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
[1] [DFN[[RUBYB[媒体文書]@en[media document]]]]は、[[画像]]や[[動画]]、[[音声]]への [[navigate]]
で作成される[[文書]]です。
;; [2] [[プラグイン文書]]とは違って[[媒体文書]]は仕様書上の用語ではありません。
* 仕様書
[REFS[
- [3] [CITE@en-GB-x-hixie[HTML Standard]] ([TIME[2015-04-25 04:40:19 +09:00]] 版) <https://html.spec.whatwg.org/#read-media>
]REFS]
* 媒体文書の構築
[5] [[navigate]] は次のようにして[[媒体文書]]の
[[DOM]] を構築することになっています。
;; [[navigate]] への[[引数]]のうち、[[資源]]を参照します。
[7] 当該[[文書]]で [[AppCache選択アルゴリズム]]を[[マニフェスト]]無しで実行しなければ[['''なりません''']] [SRC[>>3]]。
[6] 次のようにして[[文書]]の[[子孫]]を作成する[['''べきです''']] [SRC[>>3]]。
;; なぜか [['''SHOULD''']] にとどまっています。
[FIG(steps)[
= [[文書]]に [CODE(HTMLe)@en[[[html]]]] [[要素]]を [[append]] します。
= [CODE(HTMLe)@en[[[head]]]] [[要素]]と [CODE(HTMLe)@en[[[body]]]]
[[要素]]を [CODE(HTMLe)@en[[[html]]]] [[要素]]に [[append]] します。
= [[要素]]を [CODE(HTMLe)@en[[[body]]]] [[要素]]に [[append]] します。
=- [[画像]]なら、 [CODE(HTMLe)@en[[[img]]]] [[要素]]とします。
=- [[動画]]なら、 [CODE(HTMLe)@en[[[video]]]] [[要素]]とします。
=- [[音声]]なら、 [CODE(HTMLe)@en[[[audio]]]] [[要素]]とします。
= その[[要素]]の [CODE(HTMLa)@en[[[src]]]] [[属性]]に[[資源]]の [[URL]] を設定します。
]FIG]
[8] [CODE(HTMLe)@en[[[head]]]] [[要素]]の[[内容]]や[[媒体]]を表す[[要素]]の[[属性]]は、
適宜設定して構いません [SRC[>>3]]。
[EG[
[9] 例えば [CODE(HTMLa)@en[[[autoplay]]]] [[属性]]や [CODE(HTMLa)@en[[[controls]]]]
[[属性]]を設定できます。
]EG]
[EG[
[10] [[Webブラウザー]]によっては、[[viewport]] と同じ大きさへの自動的な拡大・縮小や、
手動での拡大、保存等の[[ツールバー]]を[[画像]]用に提供するなど、通常の
[[HTML文書]]中の [CODE(HTMLe)@en[[[img]]]] [[要素]]とは異なる機能を用意しています。
]EG]
[EG[
[11] [[Webブラウザー]]によって[[画像]]の [[EXIF]]/[CODE(CSS)@en[[[image-orientation]]]]
の解釈が異なっています。
]EG]
[4] その後、 [[stop parsing]] を実行しなければ[['''なりません''']] [SRC[>>3]]。