-
Notifications
You must be signed in to change notification settings - Fork 2.9k
Editorial: use named variables for media-resource-specific text tracks #11293
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@whatwg/media care to review as well?
@@ -37461,7 +37461,8 @@ interface <dfn interface>MediaError</dfn> { | |||
|
|||
<dd> | |||
<p>If the <span>media data</span> is <span>CORS-same-origin</span>, run the <span>steps to | |||
expose a media-resource-specific text track</span> with the relevant data.</p> | |||
expose a media-resource-specific text track</span> with the relevant data, | |||
the <span>media resource</span> and the <span>media element</span>.</p> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oxford comma. (Also wrapping doesn't look quite right.)
<p>The <dfn>steps to expose a media-resource-specific text track</dfn> given | ||
some relevant data <var>data</var>, | ||
a <span>media element</span> <var>element</var>, and | ||
a <span>media resource</span> <var>resource</var> are:</p> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Wrapping doesn't look right.
text track rendering</span> appropriate for the format in question.</p> | ||
<li><p>Set <var>track</var>'s <span data-x="text track list of cues">list of cues</span>'s | ||
<span>rules for updating the text track rendering</span> to the rules appropriate for the format | ||
in question.</p> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"for data's format" maybe? Or resoure? What is the difference between data and resource?
<dd>The <span>text track in-band metadata track dispatch type</span> must be set to the value | ||
of the Name header field. <ref>OGGSKELETONHEADERS</ref></dd> | ||
<dd>Set <var>track</var>'s <span data-x="text track in-band metadata track dispatch | ||
type">in-band metadata track dispatch type</span> to the value of the Name header field. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Where does the header come from?
<dd>Let the | ||
first <code data-x="">stsd</code> box of the | ||
first <code data-x="">stbl</code> box of the | ||
first <code data-x="">minf</code> box of the | ||
first <code data-x="">mdia</code> box of the | ||
<span>text track</span>'s <code data-x="">trak</code> box in the | ||
first <code data-x="">mdia</code> box of | ||
<var>track</var>'s <code data-x="">trak</code> box in the | ||
first <code data-x="">moov</code> box | ||
of the file be the <i>stsd box</i>, if any. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we should add <p>
elements to this <dd>
.
for the data.</p> | ||
<li> | ||
<p>Set <var>track</var>'s <span data-x="text track mode">mode</span> to the mode consistent | ||
with the user's preferences and the requirements of the relevant specification for the data.</p> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
data?
This algorithm feels more readable to me using named variables rather than referring to the objects indirectly.
/media.html ( diff )