Skip to content

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

Ms2ger
Copy link
Member

@Ms2ger Ms2ger commented May 9, 2025

This algorithm feels more readable to me using named variables rather than referring to the objects indirectly.


/media.html ( diff )

Copy link
Member

@annevk annevk left a 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>
Copy link
Member

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>
Copy link
Member

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>
Copy link
Member

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.
Copy link
Member

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?

Comment on lines 39985 to 39992
<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.
Copy link
Member

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>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

data?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants