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

Clarify example on example with media before signaling #2266

Closed
wants to merge 1 commit into from

Conversation

dontcallmedom
Copy link
Member

@dontcallmedom dontcallmedom commented Aug 12, 2019

As per discussion in #1708:

  • Change the title to 'with incoming media before signaling'
  • Change the intro to add 'This code shows the receiving side'
  • Remove the 'selfView' code

close #1708


Preview | Diff

@aboba
Copy link
Contributor

aboba commented Aug 13, 2019

By removing the call to getUserMedia, where will stream come from?

@dontcallmedom
Copy link
Member Author

stream is no longer used in the example, so it doesn't need to come from anywhere as far as I can tell; I have reverted my removal of the insertion of the remoteView though.

* Change the title to 'with incoming media before signaling'
* Change the intro to add 'This code shows the receiving side'
* Remove the 'selfView' code
close #1708
@fippo
Copy link
Contributor

fippo commented Aug 14, 2019

You're a bit meta by clarifying the example on the example, no? :-)

The example remains wrong though, see also #1709:

remoteView.srcObject = new MediaStream(pc.getReceivers().map((r) => r.track));

is called in start() which is immediately after the peerconnection creation. Since there are no calls to addTransceiver, pc.getReceivers() will return [] and the result is not useful.

I still think removing it (as proposed in #1926) is easier than coming up with something that is not confusing. Maybe @jan-ivar can be convinced to write a blog post instead?

@dontcallmedom
Copy link
Member Author

ok, I'll close this PR then and wait to see how #1926 gets resolved then :)

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

Successfully merging this pull request may close these issues.

Example 14 never sends any media
3 participants