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

use promise version of API #98

Merged
merged 1 commit into from Jul 9, 2018
Merged

use promise version of API #98

merged 1 commit into from Jul 9, 2018

Conversation

fippo
Copy link
Member

@fippo fippo commented Jun 7, 2018

this.pc.addStream(stream);
stream.getTracks().forEach(
function(track) {
this.pc.addTrack(
Copy link
Contributor

Choose a reason for hiding this comment

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

IIRC this was problematic in chrome. It only allows calling addTrack once? It's been a while since I used this. @jensengar do you remember?

Copy link
Member Author

Choose a reason for hiding this comment

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

i've been using this in production for over a year

Copy link
Member Author

Choose a reason for hiding this comment

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

ping? Since I heard (from a random person on the street) you're still using this in production

self.pc.setRemoteDescription(new RTCSessionDescription(offer),
self.pc.setRemoteDescription(
new RTCSessionDescription(offer)
).then(
function () {
cb();
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 can just pass cb 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.

I find this highly confusing:

.then(cb, cb)

it works because the success has arguments and the error uses the first one but...

@fippo
Copy link
Member Author

fippo commented Jun 28, 2018

ping?

@fippo fippo merged commit 5d51f66 into master Jul 9, 2018
@fippo fippo deleted the promises branch July 9, 2018 23:04
@fippo
Copy link
Member Author

fippo commented Jul 9, 2018

publishes as 8.4.0. Now updating simplewebrtc.js to use this.

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

Successfully merging this pull request may close these issues.

None yet

4 participants