Black video screen on iOS with the use of cordova-plugin-iosrtc

642 views
Skip to first unread message

ma...@mobilea.nl

unread,
Mar 17, 2016, 6:48:17 AM3/17/16
to kurento
Hi all,

Based on some earlier tests we did with https://github.com/m59peacemaker/kurento-one2many-iOS. We thought we could use this solution for a group call. Although the github repo works a group call doesn't.
We are trying to get cordova-plugin-iosrtc working with a Kurento group call (multiple one2many situations). At this moment all is working fine on Android, Chrome and Firefox. But we would like to add iOS also with the plugin.
When we use cordova-plugin-iosrtc all works fine as long as we don't send and receive streams. If we only send or only receive streams all works like a charm. When combining the two, the received stream on iOS keeps black for video and audio sometimes comes true.

To give more debugging information I have setup some tests and gathered all information. For the base of the tests I did the following:
Always started call from calling from iOS to Chrome browser. For the iOS part I changed the code sometimes (discribed in the tests) to enable/disable sending/receiving streams. On Chrome all stayed the same regarding the code. For all tests you can see the attached debug logging from the consoles.

Test 01:
iOS is only sending stream and does nothing with remote stream. On iOS I see my own cam and not the remote (because we disabled this). On Chrome I can see both perfectly. But all works perfectly.
To disable sending stream we added a return statement to https://gist.github.com/mark-veenstra/4ae0db342bc6a400629c#file-kurento-iosrtc-L32 for only iOS code.

Test 02: 
iOS is only using remote stream and is not sending stream. Result is that on iOS I see the remote stream and not own cam becuase not sending it. On Chrome I see my own cam and not remote because not sending it. But all works perfectly.
To disable sending stream we added a return statement to https://gist.github.com/mark-veenstra/4ae0db342bc6a400629c#file-kurento-iosrtc-L28 for only iOS code.

Test 03:
iOS is sending stream and using remote stream. Result is that on iOS I see my own cam but remote stream remains black, sometimes some audio comes true. On Chrome I can see all perfectly. During this test XCode crashed (see xcode-debug.png).

Test 04:
Same test as 03, but not attached to XCode. No crash, but a lot of iceCandidates floating around on iOS.

We do have followed on build steps described at the iosrtc plugin. Like the hook and the ios-websocket-hack. They are also loaded.

Hopefully someone could point us to the right direction.

Regards,

Mark
01-Console-ios-onlysend.txt
01-console-laptop-sendandreceive.log
02-Console-ios-onlyrecv.txt
02-console-laptop-send-noreceive.log
03-Console-ios-sendrecv.txt
03-console-laptop-sendandreceive.log
04-Console-ios-sendrecv-noxcodedebug.txt
04-console-laptop-sendandreceive-noxcodedebug.log
xcode-debug.png

ma...@mobilea.nl

unread,
Mar 18, 2016, 6:44:34 AM3/18/16
to kurento, ma...@mobilea.nl
Hi all,

We have also created a example repository with working code and the problem described: https://github.com/Mobilea/kurento-presenterviewer-ios-withutils.
Does anyone have some time and or knowledge to help us out?

Regards,

Mark

Abhishek Gupta

unread,
Mar 18, 2016, 4:32:52 PM3/18/16
to kurento, ma...@mobilea.nl
There is a bug in libwebrtc implementation. For Ios , Sendonly and Recvonly does not work  the same way as Chrome or Mozilla . 
With IOS, Kurento does not change the media state even if Ice Gathering completes. You will have to fool Libwebrtc to believe that it is a SendRecv connection.
It took me 1 month to make ios work.

ronny.n...@gmail.com

unread,
Mar 19, 2016, 4:51:37 AM3/19/16
to kurento, ma...@mobilea.nl
Hello Abhishek,

Do you have any tips/suggestions or maybe some example code how we could fool Libwebrtc? Do we need to make changes in their code? Or can we fool it by changing our Javascript code?

I am really curious how you made it work.

Kind regards,

Ron

ma...@mobilea.nl

unread,
Mar 20, 2016, 9:56:55 AM3/20/16
to kurento, ma...@mobilea.nl
Hi Abhishek,

Can you share any code or any link to the libwebrtc bug?
And maybe as Ronny asked could you share or tell us your solution? Did you fool libwebrtc with any changes in the libwebrtc code or with Javascript code?

Regards,

Mark


On Friday, March 18, 2016 at 9:32:52 PM UTC+1, Abhishek Gupta wrote:

ma...@mobilea.nl

unread,
Mar 22, 2016, 5:37:35 AM3/22/16
to kurento, ma...@mobilea.nl
Today we had a breakthrough. It seems that this PR: https://github.com/eface2face/cordova-plugin-iosrtc/pull/119 solves all of our issues.
If someone has the same issue, make sure to apply this PR and all works with Kurento.
I will update our public repository to show how it will work..
Reply all
Reply to author
Forward
0 new messages