Skip to content

Conversation

@jlaine
Copy link
Contributor

@jlaine jlaine commented Nov 15, 2017

In most places, we prefer to use the modern getReceivers/getSenders
instead of the legacy getRemoteStreams/getLocalStreams. However there
were two places where this logic was reversed.

@jlaine
Copy link
Contributor Author

jlaine commented Nov 15, 2017

A question : do we really need the getDescription/setDescription events? This seems like an internal implementation detail which should not leak into the API. In any case these two events don't even seem to match the documentation, which states these events are fired with "sdpWrapper" as their argument.

https://sipjs.com/api/0.8.0/sessionDescriptionHandler/#getdescription

@egreenmachine
Copy link
Collaborator

I have to run this through some manual testing to make sure it doesn't break anything. I originally had it this way, but then reversed it during some browser testing.

In terms of the events, I think they should be left. The events across the library generally are inconsistent and there are lots that do not make sense. A complete rework of the events is on my wishlist, but until then I am inclined to just leave them in place. As for the sdpWrapper argument, it should match what is there. It is really a RTCSessionDescription per WebRTC spec. I can update the documentation as such.

@jlaine
Copy link
Contributor Author

jlaine commented Nov 15, 2017

Sorry, ignore my last comment, I meant : do we need the setRemoteDescription event? It isn't documented nor is it used.

@jlaine
Copy link
Contributor Author

jlaine commented Nov 15, 2017

As for tests, I tested "Simple" on Linux using:

  • Chrome 62
  • Firefox 56

@jlaine jlaine force-pushed the prefer-getreceivers branch from 8e8567f to fdfd30b Compare November 15, 2017 14:27
In most places, we prefer to use the modern getReceivers/getSenders
instead of the legacy getRemoteStreams/getLocalStreams. However there
were two places where this logic was reversed.
@egreenmachine
Copy link
Collaborator

It looks like setRemoteDescription event is safe to remove. It is tough to see how these applications would be useful for applications. If that event is removed then the peerConnection-setRemoteDescriptionFailed event should also be removed.

@jlaine jlaine force-pushed the prefer-getreceivers branch from fdfd30b to 6907b4d Compare November 15, 2017 14:32
@jlaine
Copy link
Contributor Author

jlaine commented Nov 15, 2017

I agree concerning peerConnection-setRemoteDescriptionFailed. Do you want a separate PR for the removal of these two events or should I just include it in this PR?

@jlaine
Copy link
Contributor Author

jlaine commented Nov 15, 2017

We also have a peerConnection-SetLocalDescriptionFailed (note the inconsistent capital "S"), which would probably be better replaced self.logger.error(e) to be consistent with how setRemoteDescription fails

@egreenmachine
Copy link
Collaborator

You can add it to this PR or submit a new one. No preference on our end.

@jlaine
Copy link
Contributor Author

jlaine commented Nov 15, 2017

I'll submit a separate pull request, so this one is ready as far as I'm concerned.

@egreenmachine
Copy link
Collaborator

I ran this through all the browsers, and it worked well. Due to how potentially disruptive this small change may be, I am going to let it sit for a few days incase anyone else has comments on it or anything else comes up on our end.

@jlaine
Copy link
Contributor Author

jlaine commented Nov 15, 2017

Sure, take your time. By the way, do you think we can cut a release soon, I'm quite eager to get the other fixes out?

@egreenmachine
Copy link
Collaborator

Planning to cut a release of 0.8.4 once this is merged in (assuming nothing else comes up before then). Then planning on 0.9.0 shortly after that for #459 as it is API breaking.

@jlaine
Copy link
Contributor Author

jlaine commented Nov 15, 2017

Ok. 0.9 sounds like the target for weeding out the undocumented events then

@egreenmachine egreenmachine merged commit b2a2206 into onsip:master Nov 20, 2017
@jlaine
Copy link
Contributor Author

jlaine commented Nov 21, 2017

Fantastic, thanks Eric, and thanks for pushing out the release! I have a feeling that a fast release schedule is highly desirable as most users (myself included) only discover features once they hit a release.

@jlaine jlaine deleted the prefer-getreceivers branch November 27, 2017 08:33
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.

2 participants