0

I'm developing an iOS app with screensharing. Since screenshsring on iOS is not supported by Apple, the only way is to take screenshots and transmit them.

I'm using WebRTC DataChannel to share the screenshots to a browser. It works decent, but requires a good and stable upload speed to work.

My problem is when there is slower network or when it goes up and down in speed. Because I want the screensharing to be relatively real-time. There needs to be some kind of flow control implemented. Now there will be a delay on the receiver side when the connection slows down / lag spikes.

So when the speed is lower, I want to slow down the screenshots send per second. And vice versa. I'm syncing clocks with ntp, and have a naive implementation at the moment sending the time the screenshot was taken and with that does some naive algorithm I made up. However it doesn't work as well as I need.

Is there some real time flow control algorithm you can recommend me, or any other ideas?

Jakkra
  • 641
  • 8
  • 25
  • Send a screenshot_received message of some sort back and only send the next one when you receive that message? Could be expanded to only sending a new screenshot if less than x screenshots are still pending. – Kevin May 26 '16 at 12:16
  • Hi Jakkra, Me too working on a similar app for screen sharing. Are you able to implement it successfully? Do you have a sucessfull RTCDataChannel implementation in Objective C? I am not able to get it connected. – Adarsh V C Jun 21 '16 at 15:13
  • My RTCDataChannel implementation is available in this thread, Can you help me here? http://stackoverflow.com/questions/37850376/impelementation-of-rtcdatachannel-of-webrtc-in-ios – Adarsh V C Jun 21 '16 at 15:14

0 Answers0