-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
Pull off the bandaid: Remove RTC prefix from all names #409
Conversation
I am torn. For Go code it is much better. Stuttering is really annoying (and makes autocomplete worthless sometimes) But we are diverging from the spec. It might not be bad this time, but what if this creates a broken window situation. Since we diverge on this it makes it more likely that we will diverge in other places and it won't be a big deal. One datapoint is that all the other versions (aiortc and ecmascript implementation) do use the |
To counter the aiortc and ecmascript datapoint: The Chromium WebRTC Native API only has a prefix in languages where namespaces are not supported. Objective-C and Ecmascript use the prefix. Java and C++ do not. If users are used to programming against the Android client library or directly in C++ losing the prefix will be no problem. |
I have never used the Java/C++ APIs, reading about those now! Do they implement the full spec? My assumption was that the Native API was completely different, when I see people on |
They have the same goals as us, from the top level docs here
|
My assumption was that the native API is the reference implementation for the WebRTC spec. Maybe I am mistaken though. |
Pull Request Test Coverage Report for Build 2052
💛 - Coveralls |
Yeah, the C++ native API powers the Chrome implementation. It's not 1:1 with the Javascript API mostly because of language differences. https://webrtc.googlesource.com/src/+/master/api/peer_connection_interface.h Stuff like you have to create a But yeah, it uses the |
I was talking to Sean on Slack about whether or not to merge this. Since we can't decide whether to drop the RTC prefix or keep it, I thought we could put it to a vote. Can everyone fill this out or comment if they have any different ideas? |
Well, I’ll go on the record as being in favor of this change. It’s a nice idea to try and match the js API but in reality it’s not going to be copy/paste equivalent. If there has to be some translation anyhow, we might as make our library more idiomatic. |
Voted! I think this is great, thank you so much for starting this :) I say if yes is 50%+ we go for it Everyone please vote if you get a chance. We can also have a sh script to fix this for people, so hopefully users will not be that annoyed. |
Voted! I think it makes sense |
I'm all for briefer APIs. The |
Merge it! Fantastic work, sorry for the push back Max I was wrong |
No, thanks for holding us to a higher standard! This is a big change. I'll see if I can write a new test to appease the coveralls and then we're good to merge. |
Let's pull off the bandaid! * Reduces studdering: webrtc.RTCTrack -> webrtc.Track * Makes it easier to find types by editor autocomplete * Makes code read more fluently (less repetition) Since we're breaking the API in 2.0, our only chance to do this is now. Relates to #408
Relates to #408
Also reformat unit test to add test names so it's easier to track individual test cases in the table-driven test. Increases test coverage in peerconnection.go. Enough for us to merge? Relates to #408
Quick! Someone approve it so we can merge before coveralls finishes and blocks the commit. :-) Edit: looks like the extra test did the trick. It's rebased and ready to merge when you all are. |
Since we're breaking the API in 2.0, our only chance to
do this is now!
Relates to #408