Skip to content
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

Pass kind into algorithms that rely on it. #1831

Merged
merged 1 commit into from
Apr 12, 2018
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 15 additions & 12 deletions webrtc.html
Original file line number Diff line number Diff line change
Expand Up @@ -4923,6 +4923,9 @@ <h2>Methods</h2>
<code><a>MediaStreamTrack</a></code> object indicated by the
method's first argument.</p>
</li>
<li>
<p>Let <var>kind</var> be <var>track.kind</var>.</p>
</li>
<li>
<p>Let <var>streams</var> be a list of
<code><a>MediaStream</a></code> objects constructed from the
Expand Down Expand Up @@ -4960,7 +4963,7 @@ <h2>Methods</h2>
<li>
<p>The <a>transceiver kind</a> of the
<code><a>RTCRtpTransceiver</a></code>, associated with
the sender, matches <var>track</var>'s kind.</p>
the sender, matches <var>kind</var>.</p>
</li>
<li>
<p>The transceiver is not <code>stopped</code>. More
Expand Down Expand Up @@ -5019,14 +5022,13 @@ <h2>Methods</h2>
following steps:</p>
<ol>
<li>
<p><a>Create an RTCRtpSender</a> with <var>track</var>
and <var>streams</var> and let <var>sender</var> be the
result.</p>
<p><a>Create an RTCRtpSender</a> with <var>track</var>,
<var>kind</var> and <var>streams</var>, and let
<var>sender</var> be the result.</p>
</li>
<li>
<p><a>Create an RTCRtpReceiver</a> with
<var>track.kind</var> as kind and let <var>receiver</var>
be the result.</p>
<p><a>Create an RTCRtpReceiver</a> with <var>kind</var>,
and let <var>receiver</var> be the result.</p>
</li>
<li>
<p><a>Create an RTCRtpTransceiver</a> with
Expand Down Expand Up @@ -5221,8 +5223,8 @@ <h2>Methods</h2>
</li>
<li>
<p><a>Create an RTCRtpSender</a> with <var>track</var>,
<var>streams</var> and <var>sendEncodings</var> and let
<var>sender</var> be the result.</p>
<var>kind</var>, <var>streams</var> and <var>sendEncodings</var>
and let <var>sender</var> be the result.</p>
<p>If <var>sendEncodings</var> is set, then subsequent calls
to <code>createOffer</code> will be configured to send
multiple RTP encodings as defined in <span data-jsep=
Expand Down Expand Up @@ -5495,7 +5497,8 @@ <h3><dfn>RTCRtpSender</dfn> Interface</h3>
changed appropriately.</p>

<p>To <dfn>create an RTCRtpSender</dfn> with a
<code><a>MediaStreamTrack</a></code>, <var>track</var>, a list of
<code><a>MediaStreamTrack</a></code>, <var>track</var>, a string,
<var>kind</var>, a list of
Copy link
Contributor

Choose a reason for hiding this comment

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

the language "a string, kind" reads oddly to me. it's kind of the verbal equivalent of

function createRtcRtpSender(DOMString kind, .....)

but emphasizing the stringiness seems weird to me. Not going to object too much, though.

Copy link
Member Author

@jan-ivar jan-ivar Apr 11, 2018

Choose a reason for hiding this comment

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

I prefer to not list types at all (we're inconsistent throughout the spec). But if we're going to list types then kind is not a type, its type is string, and we are listing types here.

Copy link
Member Author

Choose a reason for hiding this comment

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

"...and optionally an id string, id" was already there. Should I remove the types altogether?

Copy link
Contributor

Choose a reason for hiding this comment

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

I'm happy with leaving the types out for these non-formal interfaces.
(the reason why audio/video isn't an enum is an artifact of WebIDL's treatment of enums and extensibility, not because we didn't want it to be, I think.)

<code><a>MediaStream</a></code> objects, <var>streams</var>, and
optionally a list of <code><a>RTCRtpEncodingParameters</a></code>
objects, <var>sendEncodings</var>, run the following steps:</p>
Expand All @@ -5517,7 +5520,7 @@ <h3><dfn>RTCRtpSender</dfn> Interface</h3>
slot initialized to <code>null</code>.</p>
</li>
<li>
<p>If <var>sender</var> is of kind "audio" then
<p>If <var>kind</var> is <code>"audio"</code> then
<a>create an <code>RTCDTMFSender</code></a> <var>dtmf</var> and set
the <a>[[\Dtmf]]</a> internal slot to <var>dtmf</var>.
</li>
Expand Down Expand Up @@ -6559,7 +6562,7 @@ <h2>Dictionary <code><a>RTCRtpHeaderExtensionCapability</a></code> Members</h2>
<h3><dfn>RTCRtpReceiver</dfn> Interface</h3>
<p>The <code>RTCRtpReceiver</code> interface allows an application to
inspect the receipt of a <code>MediaStreamTrack</code>.</p>
<p>To <dfn>create an RTCRtpReceiver</dfn> with kind, <var>kind</var>, and
Copy link
Member Author

@jan-ivar jan-ivar Apr 11, 2018

Choose a reason for hiding this comment

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

My comment was in reference to this line, which used kind as both type and name.

<p>To <dfn>create an RTCRtpReceiver</dfn> with a string, <var>kind</var>, and
optionally an id string, <var>id</var>, run the following steps:</p>
<ol>
<li>
Expand Down