aws-samples / amazon-chime-react-native-demo

A React Native demo application for Android and iOS using the Amazon Chime SDK.
MIT No Attribution
101 stars 24 forks source link

iOS-React-Native-Bridge for Broadcast-ScreenShare #130

Closed saurabhghadi0401 closed 2 years ago

saurabhghadi0401 commented 2 years ago

Hello,

I am trying to create a bridge for entire screen share on Chime-React-Native-Demo, and have setup broadcast extension as per the guide (https://github.com/aws/amazon-chime-sdk-ios/blob/master/guides/content_share.md#device-level-screen-sharing). I create a custom-bridge to render RPSystemBroadcastPickerView in our code. But when I click it, it doesn't show me the app to broadcast it. image image

image

I tried to run chime native iOS code and it installed the extension, but when I tried to do the same on react-native side, it's not getting installed. is there any method I need to setup so that extension will get installed When I join the meeting? Kindly please suggest any way to install/invoke the extension.

Thanks, Saurabh

hokyungh commented 2 years ago

It might be hard to help without what you have implemented. Based on the guide, device level screen share requires at least Add App Groups Capability, RPSystemBroadcastPickerView, SampleHander, ReplayKitSource. Do you have all the implementation?

saurabhghadi0401 commented 2 years ago

Hi @hokyungh , Thanks for quick-reply. Yeah, I have already setup App Groups Capability for extension and for target. image I have created a bridge-file like RNVideoRenderView.js to call RPSystemBroadcastPickerView from native to react-native. image image Also, I have setup SampleHandler too. image And I use ScreenshareModel, BroadcastModel swift classes and initialize it when meeting session is created. image image

This file will call the swift classes in NativemobileSDKBridge file. In the same file, i have mentioned broadcast class too. image Can you please let me know what steps I am missing ?

I have attached SDK logs : Native-bridge-SDK-logs.txt

saurabhghadi0401 commented 2 years ago

I see in AWS-Chime-sdk-ios (https://github.com/aws/amazon-chime-sdk-ios/blob/master/AmazonChimeSDKDemo/AmazonChimeSDKDemo/MeetingViewController.swift#:~:text=self%2C%20action%3A%20%23selector(-,broadcastButtonTapped,-)%2C%20for%3A%20.touchUpInside)) isBlocked property of BroadcastScreenCaptureModel is set and then it'll invoke saveMeetingSessionConfigToUserDefaults function to set appGroupUserDefaults values. Can I set those values when meetingSession is generated?

saurabhghadi0401 commented 2 years ago

I configured saveMeetingSessionConfigToUserDefaults function when meetingSession is created but it didn't show me the app in broadcast list. I checked the logs and saw this error log -> Couldn't read values in CFPrefsPlistSource which means App extension is not getting installed right? image

stale[bot] commented 2 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

saurabhghadi0401 commented 2 years ago

@hokyungh , I figured out the way to integrate screen-share in iOS. I will post the solution once everything is ready.

ziyiz-amzn commented 2 years ago

@saurabhghadi0401 Glad to see you found the way. Feel free to share it in this thread, so that we may add it into our demo app. Closing this for now.