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

updated webrtc lib to m75 #455

Merged
merged 28 commits into from
Mar 2, 2020
Merged

updated webrtc lib to m75 #455

merged 28 commits into from
Mar 2, 2020

Conversation

akilude
Copy link
Contributor

@akilude akilude commented Nov 29, 2019

This is for #452

Steps i followed:

  1. python build-webrtc.py --setup --ios ~/src/
  2. cd ~/src/build_webrtc/webrtc/ios/src/
  3. git checkout -b m75
  4. python build-webrtc.py --build --ios ~/src/
  5. Replaced the webrtc.framework in the plugin with the generated webrtc.framework folder

If you want to merge, please test.

Thanks.

@hthetiot
Copy link
Contributor

Thank you very much @akilude
I will test that next week.

@hthetiot
Copy link
Contributor

I'm not sure why the Travis build fail @akilude did you compile for x86 and armv7 ?

@akilude
Copy link
Contributor Author

akilude commented Dec 1, 2019

@hthetiot i followed the instructions in this link and built only for iOS.

It was compiled for ARM, ARM-64, x86 and x64

I built the release build, should i build the debug build instead?

@hthetiot
Copy link
Contributor

hthetiot commented Dec 2, 2019

No that perfect @akilude , I will check if we get any error caused by WebRTC.framework API change like #427

Did you successfully run on iOS on your side with this new WebRTC version?

@akilude
Copy link
Contributor Author

akilude commented Dec 5, 2019

I haven't run it yet, was busy, will run it in a day or two, sorry for the late reply @hthetiot

@hthetiot
Copy link
Contributor

hthetiot commented Dec 6, 2019

No worries @akilude we all busy, that already fantastic that you helping.
I think we will have to update some swift for M75 migration.

@akilude
Copy link
Contributor Author

akilude commented Dec 9, 2019

i tried the app, it's not compiling, i think its due to the swift changes that need to be made.

@hthetiot
Copy link
Contributor

hthetiot commented Dec 9, 2019

Yes that what I was suspecting, I will look when I have time, fell free to past Xcode error here.

@panassidi
Copy link

Can you update code with m75 framework?

@hthetiot
Copy link
Contributor

hthetiot commented Feb 4, 2020

@panassidi Sorry I dont have the bandwitht yet for that.
You can wait or if you want you can pay me to do it :)

@panassidi
Copy link

panassidi commented Feb 5, 2020

@panassidi Sorry I dont have the bandwitht yet for that.
You can wait or if you want you can pay me to do it :)

I compiled m75 but my app do not compile
I raplaced webrtc.framework folder

@hthetiot
Copy link
Contributor

hthetiot commented Feb 5, 2020

@panassidi yes that why this PR is still open, we need to update the Swift code it's not enough to replace the WebRTC.framework you need also to replace the WebRTC binary also.

If you can try to test that branch and try to compile you application using Xcode and provide the Xcode errors that may help this issue to get closed.

Note: you need to use the instructions on the issue description to compile WebRTC outside WebRTC will not work.

@panassidi
Copy link

This is the error from XCode:

/Users/dartagnan/Apps/JoConnectBeta/platforms/ios/JoConnectBeta/Plugins/cordova-plugin-iosrtc/PluginMediaStreamRenderer.swift:4:45: Use of undeclared type 'RTCEAGLVideoViewDelegate'
/Users/dartagnan/Apps/JoConnectBeta/platforms/ios/JoConnectBeta/Plugins/cordova-plugin-iosrtc/PluginMediaStreamRenderer.swift:76:29: Cannot assign value of type 'PluginMediaStreamRenderer' to type 'RTCVideoViewDelegate?'

I can read on plugin notes (cordova-plugin-iosRTC)

"Use clean WebRTC.framework build with x86 and arm support, remove debug patches.

Remove custom patches (RTCVideoFrame.h, RTCEAGLVideoView.h)

Import RTCMTLVideoView.h to fix Metal related crashes later.

How can I remove custom and debug patches?

@panassidi
Copy link

Here the errors from Xcode:

/Users/dartagnan/Apps/JoConnectBeta/platforms/ios/JoConnectBeta/Plugins/cordova-plugin-iosrtc/PluginMediaStreamRenderer.swift:4:45: Use of undeclared type 'RTCEAGLVideoViewDelegate'
/Users/dartagnan/Apps/JoConnectBeta/platforms/ios/JoConnectBeta/Plugins/cordova-plugin-iosrtc/PluginMediaStreamRenderer.swift:76:29: Cannot assign value of type 'PluginMediaStreamRenderer' to type 'RTCVideoViewDelegate?'

I can read on roject note (cordova-lugin-iosrtc)
"Use clean WebRTC.framework build with x86 and arm support, remove debug patches.

Remove custom patches (RTCVideoFrame.h, RTCEAGLVideoView.h)

How can I remove debug and custom patches?

@hthetiot
Copy link
Contributor

hthetiot commented Feb 8, 2020

Thank you @panassidi as I told you for now I don't have the time to handle this issue, however this PR goes in the right direction, I think #427

@hthetiot
Copy link
Contributor

Pushed https://github.com/cordova-rtc/cordova-plugin-iosrtc/tree/task/m75 with master merged if you want to rebase @akilude

@hthetiot
Copy link
Contributor

hthetiot commented Feb 25, 2020

@akilude Can you merge akilude#1
This PR fix the m75 support in your PR (PR inception) :)

To test task/m75

cordova plugin remove cordova-plugin-iosrtc --verbose
cordova plugin add https://github.com/cordova-rtc/cordova-plugin-iosrtc#task/m75 --verbose
cordova platform remove ios --no-save
cordova platform add ios@latest --no-save

Test Capture

Image from iOS (1)

cc @panassidi

How can I remove debug and custom patches?

The only issue was to expose the missing RTCEAGLVideoViewDelegate via src/cordova-plugin-iosrtc-Bridging-Header.h, All I had to do was to understand the error and instead of patching WebRTC I used cordova-plugin-iosrtc-Bridging-Header.h to expose RTCEAGLVideoViewDelegate to Swift.
akilude@639873c

…reamTrack only if rtcMediaStream.streamId or rtcMediaStreamTrack.trackId start with 'janus' to fix PeerConnection.addStream|addTrack regression
…reamTrack only if rtcMediaStream.streamId or rtcMediaStreamTrack.trackId start with 'janus' to fix PeerConnection.addStream|addTrack regression
…o populate foundation, component, priority, type, address, ip, protocol, port, relatedAddress and relatedPort RTCIceCandidate values
@akilude
Copy link
Contributor Author

akilude commented Feb 25, 2020

@hthetiot it's done, thank you.

@hthetiot
Copy link
Contributor

@akilude let me know if your test work, with akilude/cordova-plugin-iosrtc@639873c change it mean we should not need to patch WebRTC on the next update.

@akilude
Copy link
Contributor Author

akilude commented Feb 26, 2020

Hi, @hthetiot , little busy with work, also will get an iphone to test a little later, so might take a day or two to test it.

@hthetiot
Copy link
Contributor

No problem @akilude

@akilude
Copy link
Contributor Author

akilude commented Mar 2, 2020

Hi @hthetiot , It works!

@hthetiot hthetiot changed the base branch from master to task/7.0.0 March 2, 2020 11:21
@hthetiot hthetiot merged commit e0e3805 into cordova-rtc:task/7.0.0 Mar 2, 2020
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.

4 participants