-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
WIP - api standardization across implementation #364
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
Merged
wer-mathurin
merged 26 commits into
master
from
feature/api-standard-across-implementation
Oct 9, 2020
Merged
WIP - api standardization across implementation #364
wer-mathurin
merged 26 commits into
master
from
feature/api-standard-across-implementation
Oct 9, 2020
Conversation
This file contains hidden or 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
Rename MediaDevices to Navigator
Delegate in RTCVideoRenderer
@wer-mathurin There are two file conflicts, I can try to merge after the conflict is resolved. |
Conflict resolved |
cloudwebrtc
requested changes
Oct 6, 2020
API Expose iceGatheringState API Expose iceConnectionState
cloudwebrtc
approved these changes
Oct 6, 2020
LGTM |
@rostopira Can you look at the code and give comments. This is a big change so I'm looking for your input. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
This work can be seen as a first step to standardize API accros implementation. It prevent missing method implementation, as an example, in the master branch hasTorch() have been implemented for native but not Web. If you use this method and try to run it on when you will encounter compilation failure.
There is also others scenarios that also happen. But merging this PR, this resolve all those cases.
You will find in the code two way of exposing the API. The first one is just exporting that interfaces, and delegate the instanciation of the real class implementation to methods exposed by a factory.
The second one is exporting a class that implement the interface and use a delegate, see RTCVideoRenderer.dart for the example.
I personally like the second option because if we eventually move the the plugin federation concept if we will only need to copy/paste classes in the right package! Because everything if organize and code like plugin federation, but in one plugin :-)