3

I'm exploring WebRTC, I made a demo using it and it works perfectly, but now I want to share my app screen using WebRTC in my native project.

Is it possible?. I searched many documents but I didn't find any solution.

DiegoQ
  • 1,114
  • 11
  • 20
  • 1
    Questions asking "Is there a way to do X?" / "Can I do X?" / "Is it possible to do X?" are rarely appropriate for the Stack Exchange format. The answer is usually "yes", but sometimes "no". Either way, the question is usually not very effective. In addition, what is usually meant is "How can I do X?", which will often, but not always, be too broad for Stack Overflow. Please [edit] your question to clarify what it is you want. Right now, this is a "yes"/"no" question. Please see: [Why is “Is it possible to…” a poorly worded question?](//softwareengineering.meta.stackexchange.com/q/7273) – Makyen Aug 01 '18 at 03:19
  • For future references, Yes, WebRTC implements Broadcast Extension which lets user to share screen. – Adil Soomro Jul 31 '19 at 12:39

3 Answers3

2

Yes, it is possible (not sure about existing open source projects). But you can refactor the apprtc-ios into streaming the screen snapshots instead of the camera feed. Here are some useful resources:

ssk
  • 9,045
  • 26
  • 96
  • 169
  • 1
    I have seen these examples before but they don't have examples or documentation about how to streaming the phone screen instead of using the camera. – DiegoQ Jul 21 '18 at 00:30
2

Apple's ReplayKit/ReplayKit2 allows you to stream from the screen or the camera to the air. You should try using that with WebRTC.

Have a look here :- https://github.com/StraaS/StraaS-iOS-sdk/wiki/Live-Streaming-with-Apple's-ReplayKit

jblflip
  • 21
  • 7
  • Just linking to some library or tutorial is not a good answer. Linking to it, [explaining why it solves the problem and providing code on how to do so](https://meta.stackoverflow.com/questions/251602/recommending-off-site-resources-when-questions-dont-ask-for-it/251605#251605) makes for a better answer. – Makyen Jul 29 '18 at 16:14
0

You may want to look Apple's ReplayKit. Since iOS 11, you can record your screen but also choose to which ReplayKit Provider. I think TeamViewer already uses this on iOS.

https://developer.apple.com/documentation/replaykit/rpscreenrecorder https://forums.developer.apple.com/thread/89165

Jason Pierna
  • 331
  • 1
  • 3
  • 10