-
-
Notifications
You must be signed in to change notification settings - Fork 338
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
Incompatibility with Janus WebRTC gateway when using WebRTC-adapter >= 7.6.0 #505
Comments
I had an issue, but remote audio works fine from the start. The only event that I get is 'addtrack' and it doesn't have stream. |
Notice that it worked before. Just saying... |
Regression on Janus or iosrtc or non proper usage or webrtc-adater: @DaveLomber can you confirm you do include webrtc-adapter ? |
@oscarvadillog @akilude Can you confirm if it works with Janus for you guys? Every 2 release we get a new issue with Janus, I'm starting to think that this one is not an "incompatibility" but more a issue with last Janus or Adapter not used. |
@DaveLomber please avoid "Plugin version: |
@hthetiot sorry, I have updated the plugin version. We tried with 6.0.11 Re For the adapter - we use :
I'm investigation for more. |
I have just checked the adapter code https://webrtchacks.github.io/adapter/adapter-latest.js
So I think it explains it - the adapter treats Safari as 'ontrack' compatible and does not add any shim here. But, in fact - iOS Cordova plugin does not have the 'ontrack' implemented. |
Please provide the version of Janus you are using it @DaveLomber |
We use 0.9.1 gateway version |
Just to prove my above statement about a shim I guess I made it working well now and the 'onremotestream' callback is firing now What I did - https://webrtchacks.github.io/adapter/adapter-latest.js I have applied the
|
Thank you @DaveLomber I will see what I can do to make it working out of the box, thank you for investigating that help a lot. |
@DaveLomber feel free to make a PR to add ConnectyCube to https://github.com/cordova-rtc/cordova-plugin-iosrtc/blob/master/WHO_USES_IT.md |
@DaveLomber do you get working video? If so, could you provide more information, please? I'm stuck on video with Janus, and I didn't get how you fix this. Thank you! |
@hthetiot sorry didn't see your message, with my old version of my app with Janus 7.4 and iosrtc 6.0.7 it works, will get back when i try the latest versions. |
If my memory is correct, i also had a similar issue when using unified plan with this deprecated branch of janus meetecho/janus-gateway#1459 , it started working when i added the onaddstream to janus.js |
@akilude exactly. Adding |
@ekzotech Here is what I ended up with as a working solution (see
taken from here https://github.com/ConnectyCube/connectycube-cordova-samples/blob/master/sample-videochat-conf-cordova/www/index.js#L32 |
I will try to update iosRTC to shim ontrack properly without the need to import the shim manualy. |
iOSRTC WebRTC swift bridge already implement What is missing is the event support for I somewhat beleive that |
@hthetiot this WebRTC ontrack stuff is a bit confusing.. In fact it should be and also it should be a Just to let you know about it |
@DaveLomber Yes, I'm on it :) |
To be clear the issue I think, was that I Implemented |
@DaveLomber thank you very much! With your 'applyShimOnTrack' I'm able to get remote video. |
@DaveLomber I think it might be ready, give it a shot and let me know. |
@hthetiot cool thanks! I will give it a try and let you know |
The fix from #508 has been tested using the new The test was made using only Local-Peer not Janus, because I dot have access to a Janus instance. Some tuning over this |
@hthetiot I was able to test it against Janus seems the fix works and I can get a janus 'onremotestream' callback now which is good The only one thing which is now I need to fix my app code is that in 'onremotestream' I'm getting a stream with audio track only at first place, but what I expect is to have both audio and video tracks. |
And what worries me more is that same code works well under Safari browser, This is something to investigate at my side |
@DaveLomber I think the issue is might be that in the #508 I create a new even.streams[stream] for each track instead of reusing the same stream to add track compare to the polyfill, and that Janus use event.streams instead of event.track, I will see what I can do. |
@DaveLomber I made some ajustement to #508 to make event.streams more reliable. Can you test again, please. |
Twilio tester will also re-test to double check see #497 (comment) |
Just checked - seems it does not fire 'pc.ontrack' anymore, https://github.com/meetecho/janus-gateway/blob/master/html/janus.js#L1772 |
Shit |
@DaveLomber Do you still have you shim in place? I'm not sure the Shim will play nice with #508 It's possible that was a regression on #508 that has been fixed by 44e5b8b |
Confirmed the regression of track event support come from webrtc-adapter 7.6.0 + see issue webrtcHacks/adapter#1041 |
@hthetiot appologize for the delayed feedback I just tried latest master and all is working fine thanks for you effort on this matter! |
\0/ |
Expected behavior
Using Janus Video Room plugin, it should be possible to have a call between Web browser and iOS Cordova app.
Observerd behavior
According to janus.js implementation, it implements a 'ontrack' callback of RTCPeerConnection where it obtains a remote stream and passes it to app via 'onremotestream' callback.
https://github.com/meetecho/janus-gateway/blob/master/html/janus.js#L1772
But, cordova-plugin-iosrtc does not implement the 'ontrack' callback - instead it provides a legacy one - 'onaddstream'
https://github.com/cordova-rtc/cordova-plugin-iosrtc/blob/master/js/RTCPeerConnection.js#L97
hence the incompatibility issue arises
As for a solution - the cordova-plugin-iosrtc plugin should support both 'ontrack' property https://developer.mozilla.org/en-US/docs/Web/API/RTCPeerConnection/ontrack and 'track' event https://developer.mozilla.org/en-US/docs/Web/API/RTCPeerConnection/track_event
Steps to reproduce the problem
To run VideoRoom demo app on Web and Cordova https://github.com/meetecho/janus-gateway/blob/master/html/videoroomtest.html
Platform information
Cordova version:
9, 8.1.2
Plugin version:
6.0.11
iOS version:
13.3.1
Xcode version:
11.2.1
The text was updated successfully, but these errors were encountered: