stasel / WebRTC-iOS

A simple native WebRTC demo iOS app using swift
Apache License 2.0
1.1k stars 239 forks source link

Stream local screen #46

Open iAkashlal opened 4 years ago

iAkashlal commented 4 years ago

This thread is more of a suggestion request than an issue. I am trying to make a teamviewer Pilot-type application where I can stream my screen to another person so that he can see it. I see you are hooking the camera feed directly, what would you recommend to stream screen instead?

I am thinking of recording the screen to a local file in bundle and using RTCFileVideoCapturer's startCapturing with the file name to capture the screen and send it over to another person at the same time.

Am I overseeing a more efficient way?

stasel commented 4 years ago

Hey @iAkashlal That's a very interesting addition. Unfortunately I don't have any experience with RPScreenRecorder or ReplayKit. I would try to investigate how to connect the screen capture stream buffer to one of the WebRTC media sources. If you find any working solution, let me know! I might add this to the demo project

iAkashlal commented 4 years ago

Sure thing @stasel , will investigate this for a few days and update here :)

dindin44 commented 4 years ago

Any update on this? I'm trying to do the same thing, but can't seem to see the stream on the second device. It is appearing in the local view of the first device so not sure whats going on.

ngoctamcb commented 3 years ago

i'm facing with same problem, currently i can screen share beetween 2 device (iphone) with WebRTC on foreground use ReplayKit, but can't do it on background, i'm try investigate and got a solution use Broadcast Upload Extension to get Local Screen but i don't know how to stream that to WebRTC cause this code located in Extension File, it's don't have config like WebRTCClient (peer, track, videosource...), any ideal for it ?

Bhoon-coding commented 1 year ago

any solution TT?