twilio / twilio-video-ios

Programmable Video SDK by Twilio
http://twilio.com/video
Other
65 stars 22 forks source link

Live screen sharing in iOS #27

Closed Perachi closed 3 years ago

Perachi commented 6 years ago

Hi ,

https://drive.google.com/file/d/1laasE2uC6OFulKqrh3e3SaItiUi-E01v/view?usp=sharing

In this video, we have called android phone and during the call, an Android device has shared its screen(using Twilio) and during screen iOS device can see every actions and activity of android. We want to implement the same things in iOS. How iOS can share or broadcast its mirror screen to other devices? We have used TVIScreenCapturer.init(view: view) but it broadcasts only current view. We want to share the entire device with an opponent.

Thanks

ceaglest commented 6 years ago

Hi @Perachi,

The only way to capture the entire screen (including home, and other apps) is to use a ReplayKit broadcasting extension. We are just getting ready to merge a PR which adds this example.

Please have a look. https://github.com/twilio/video-quickstart-swift/pull/287

Regards, Chris

awerudev commented 5 years ago

Hi Chris,

I have integrated the Twilio Video iOS SDK for multi-video chat app. It is working great. I am just wondering when the screen sharing would be implemented using ReplayKit.

Looking forward to hearing from you as quickly as possible.

Best, Urban

ceaglest commented 5 years ago

Hi @myProductBucket,

We have an example app which uses ReplayKit available now. We aren't immediately planning on adding a dedicated ReplayKit capturer to our SDK, but we do encourage you to try the sample code, and consider using it in your application.

https://github.com/twilio/video-quickstart-swift/tree/master/ReplayKitExample

Thanks, Chris

awerudev commented 5 years ago

Hi Chris,

Thank you for your info! I have been building the app using Objective-C. Could you let me know the example app for Objective-C? Anyway let me check the ReplayKitExample quickly.

Regards, Urban

awerudev commented 5 years ago

Hi Chris,

https://github.com/twilio/video-quickstart-swift/tree/master/ReplayKitExample

Is there any Objective-C example ?

Thanks, Urban

ceaglest commented 5 years ago

Hi @myProductBucket,

Sorry for the slow response.

Unfortunately we do not have an Objective-C example demonstrating integration with ReplayKit. While I do ❤️ Objective-C (and write a lot of Objective-C++), the iOS team does not have the resources to maintain each of our examples in multiple languages at this time. You'll notice that some of our Swift examples include audio classes written in Objective-C. We will continue to mix and match languages as needed, but lean primarily towards Swift.

Is there any particular part that you are having the most issues with, perhaps I could help? Or are you looking for a shipping (TVI prefixed) solution for ReplayKit without having to roll any of your own Objective-C?

Regards, Chris

awerudev commented 5 years ago

Hi Chris,

Thank you for your reply!

I was trying to create class for Objective-C. By the way, I am not sure about some code lines. var downscaleYPlaneBuffer: UnsafeMutableRawPointer? // --

Could you help me?

Regards, Urban

awerudev commented 5 years ago

Actually, I want the class ReplayKitVideoSource for Objective-C

awerudev commented 5 years ago

Hi Chris,

Please help me. Looking forward to hearing from you as soon as possible.

Thanks, Urban

ceaglest commented 5 years ago

Hi Urban,

Actually, I want the class ReplayKitVideoSource for Objective-C

We are working on a new generation of Video capturing APIs, so I don't want to take the Swift example into our SDK at this time. Once we have introduced the new APIs later this quarter, we will consider your request.

By the way, I am not sure about some code lines. var downscaleYPlaneBuffer: UnsafeMutableRawPointer? // --

In the meantime I would suggest that, if you want to convert the example capturer to Objective-C then you should remove all of the downscaling code and frame dropping code. Without that, the class is a lot simpler.

Best, Chris

etown commented 5 years ago

@ceaglest so great to hear about the next gen capturing APIs coming soon! Can you confirm you guys are on track for releasing in Q4? Very much looking forward to it!

piyushtank commented 5 years ago

@etown This week @ceaglest is out on vacation, he will be back on Monday. I work with Chris in iOS Video SDK team.

Yes, we are currently working on new Video Source based capturer APIs, and we are planning to ship the first preview release with new APIs in a few days (most likely early next week). We have a work-in-progress PR for updating the quickstart sample app which uses the new APIs.

We will keep you posted when we release the first preview.

ceaglest commented 5 years ago

Hi @etown,

@ceaglest so great to hear about the next gen capturing APIs coming soon! Can you confirm you guys are on track for releasing in Q4? Very much looking forward to it!

You are in luck, we have recently published 2.6.0-preview1 which introduces the new TVIVideoSource APIs. We have updated the ReplayKit Example and will be working on others during the preview period.

Regards, Chris

ceaglest commented 5 years ago

Hi Urban,

With our preview release and the Video Source APIs, we are one step closer to moving ReplayKit capture into our SDK. This is still something we are considering but I do not have any concrete plans to share at this time.

However, you mentioned that you were having trouble writing an Objective-C class for capturing. You should take a look at our updated Swift example, which has now lost several hundred lines of code. This should be easier to grok if you still want to try to convert it to Objective-C.

Regards, Chris

PrashantKT commented 5 years ago

Hello Every one ,

I have a question With twilio is it possible to share ARKit screen with other person using calling like VOIP

I am searching for feature with that Two Person can do screen sharing which is ARKit based. and both can draw ARKit Content (free hand drawing like circle lines squares etc) on screen and both able to see it.

Is it possible with this SDK

Looking forward to hear from you

Best, Prashant

ceaglest commented 5 years ago

Hi @PrashantKT,

The short answer is that it can be done, and you don't want to use ReplayKit to achieve this. Can you please open a separate issue so that we can help you further?

Thanks, Chris

yaalisri commented 4 years ago

I don't want to share the entire device screen but only the current view to other users connected to the same room. I am using Twilio Programmable Video now in my app. How to achieve this? I don 't want to integrate another ReplayKit for this.

piyushtank commented 3 years ago

Closing an old ticket. Feel free to reopen this or open a new ticket.