-
Notifications
You must be signed in to change notification settings - Fork 3.9k
/
Copy pathvalidator-amp-audio.protoascii
121 lines (120 loc) · 3.25 KB
/
validator-amp-audio.protoascii
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
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
tags: { # amp-audio 1.0
html_format: AMP
tag_name: "SCRIPT"
satisfies_condition: "amp-audio 1.0"
excludes_condition: "amp-audio 0.1"
extension_spec: {
name: "amp-audio"
version_name: "v1.0"
version: "1.0"
bento_supported_version: "1.0"
}
attr_lists: "common-extension-attrs"
}
tags: { # amp-audio 0.1
html_format: AMP
html_format: AMP4ADS
tag_name: "SCRIPT"
satisfies_condition: "amp-audio 0.1"
excludes_condition: "amp-audio 1.0"
extension_spec: {
name: "amp-audio"
version_name: "v0.1"
version: "0.1"
version: "latest"
deprecated_allow_duplicates: true
requires_usage: EXEMPTED
}
attr_lists: "common-extension-attrs"
}
attr_lists: { # amp-audio attributes that are common to both AMP and A4A format.
name: "amp-audio-common"
attrs: { name: "album" }
attrs: { name: "artist" }
attrs: { name: "artwork" }
attrs: { name: "controls" }
attrs: { name: "controlslist" }
attrs: { name: "loop" value: "" }
attrs: { name: "muted" value: "" }
attrs: {
name: "src"
value_url: {
protocol: "https"
allow_relative: true # Will be set to false at a future date.
}
disallowed_value_regex: "__amp_source_origin"
}
# <amp-bind>
attrs: { name: "[album]" }
attrs: { name: "[artist]" }
attrs: { name: "[artwork]" }
attrs: { name: "[controlslist]" }
attrs: { name: "[loop]" }
attrs: { name: "[src]" }
attrs: { name: "[title]" }
}
tags: { # <amp-audio> for AMP (autoplay attribute allowed)
html_format: AMP
tag_name: "AMP-AUDIO"
# There is an alternate spec for amp-video in amp-story.
disallowed_ancestor: "AMP-STORY"
requires_extension: "amp-audio"
attrs: {
name: "autoplay"
value: ""
}
attrs: {
name: "preload"
value_casei: "auto"
value_casei: "metadata"
value_casei: "none"
}
attr_lists: "amp-audio-common"
attr_lists: "extended-amp-global"
spec_url: "https://amp.dev/documentation/components/amp-audio/"
amp_layout {
defines_default_height: true
# TODO(johannes): in the longer run, defines_default_width should
# be false, to make it a fixed height layout per default, rather
# than a fixed one.
defines_default_width: true
supported_layouts: FIXED
supported_layouts: FIXED_HEIGHT
supported_layouts: CONTAINER
supported_layouts: NODISPLAY
}
}
tags: { # <amp-audio> for AMP, amp-story (autoplay attribute mandatory)
html_format: AMP
tag_name: "AMP-AUDIO"
spec_name: "amp-story >> amp-audio"
mandatory_ancestor: "AMP-STORY"
requires_extension: "amp-audio"
attrs: {
name: "autoplay"
value: ""
mandatory: true
}
attr_lists: "amp-audio-common"
attr_lists: "extended-amp-global"
spec_url: "https://amp.dev/documentation/components/amp-audio/"
amp_layout {
supported_layouts: NODISPLAY
}
}
tags: { # <amp-audio> for A4A (autoplay attribute disallowed)
html_format: AMP4ADS
tag_name: "AMP-AUDIO"
spec_name: "amp-audio (A4A)"
requires_extension: "amp-audio"
attr_lists: "amp-audio-common"
attr_lists: "extended-amp-global"
spec_url: "https://amp.dev/documentation/components/amp-audio/"
amp_layout {
defines_default_height: true
defines_default_width: true
supported_layouts: FIXED
supported_layouts: FIXED_HEIGHT
supported_layouts: NODISPLAY
}
}