-
Notifications
You must be signed in to change notification settings - Fork 161
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
Update endpoint pair example and fix citation #1318
Merged
Merged
Changes from 2 commits
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
24240e6
Update endpoint pair example and fix citation
jan-ivar aa5cf91
simplify example
jan-ivar a745d0c
Make example look more like the API it references.
jan-ivar a146a0e
Revert "Make example look more like the API it references."
jan-ivar 85a4176
revert example.
jan-ivar cecef0e
Revert example prose
jan-ivar File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
This example has been simplified a bit too much I think. It talks about a platform-provided
Transformer
interface but that interface is now super-implicit, because of the destructuring of function arguments. I think reverting to something likewould work better.
Additionally, the point of
createEndpointPair()
was to match the official name given in the standard, "endpoint pair". So I think that that was even better.Can you say more about why you changed this example?
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 read "web-platform-provided function
createEndpointPair()
" as a callout to the same-shapedsender.createEncodedStreams()
method removed in w3c/webrtc-encoded-transform#64.I was trying to maintain this similarity to the API it's referencing. But the spec's worker-only API is different. From MDN and blog post examples:
The spec fires an event with the transformer which has no constructor. The event part seemed unnecessary but I can try to add it if the context is useful.
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.
Sorry, this seems to have gone in the opposite direction of what I'm requesting. The point of this example is not to reference any other API. (That's the purpose of the note below, which you helpfully edited for accuracy.) It's to give an example of the simplest possible concept of an endpoint pair, i.e. a platform-provided API that returns a
{ readable, writable }
object.The naming is especially important, as we're trying to illustrate the "endpoint pair" concept defined above, not some sort of "transformer" concept which this document does not define.
Can you revert it to its previous version?