jitsi-meet icon indicating copy to clipboard operation
jitsi-meet copied to clipboard

[React native SDK] [iOS] - Cannot share screen after pressing share screen button

Open CacdiWilsonHsu opened this issue 1 year ago • 14 comments

Description:

I'm currently using the Jitsi Meet React Native SDK on iOS, after pressing the screen sharing button in Jitsi function list, it will show an alert to tell the user it will record everything on your screen. Then, after pressing the share screen extension button, there is no sharing screen in meeting room, but the phone shows recording screen status. For other participant, nothing happens in meeting room.

For iOS, i have checked the following the official documentation (dev-guide-ios-sdk/#tldr) and set it for Screen Sharing integration.

Detailed steps to set screen sharing integration

  1. Open my own react native project in Xcode, select File > New > Target in menu bar.
  2. Create broadcast upload extension.
  3. Copy SampleUploader.swift, SocketConnection.swift, DarwinNotificationCenter.swift, and Atomic.swift files from jitsi-meet-sdk-samples to my upload extension's folder
  4. Add some key and value in app's info as below
<key>RTCScreenSharingExtension</key>
<string>org.reactjs.native.example.xxxxx.Broadcast-Extension</string>
<key>RTCAppGroupIdentifier</key>
<string>group.com.xxxxx.Broadcast-Extension</string>
<key>UIBackgroundModes</key>
<array>
<string>voip</string>
</array>
  1. Update appGroupIdentifier in SampleHandler.swift, and it is same as the value of the key RTCScreenSharingExtension in app's info.plist
private enum Constants {
    // the App Group ID value that the app and the broadcast extension targets are setup with. It differs for each app.
    static let appGroupIdentifier = "group.com.xxxxx.Broadcast-Extension"
}
  1. Set flags property to enabled
import { JitsiMeeting } from '@jitsi/react-native-sdk/index';
...
<JitsiMeeting
  ref={jitsiMeeting}
  style={styles.jitsiMeet}
  eventListeners={eventListeners as any}
  config={{
    domain: `meet.jit.si/${conferenceUrl}`,
    startWithVideoMuted: false,
    prejoinConfig: {
      enabled: false,
      hideDisplayName: false,
      hideExtraJoinButtons: ['no-audio', 'by-phone'],
      hideRoomName: true,
    },
    startScreenSharing: true,
    screenshotCapture: {
      enabled: true,
    },
  }}
  room={conferenceUrl}
  flags={{
    'ios.screensharing.enabled': true,
  }}
/>
...
  1. Set app groups for both app and extension, it is also same as the value of the key RTCScreenSharingExtension in app's info.plist image

Any steps did i miss?

Steps to reproduce:

  1. Launch the project by Xcode and run it on an physical phone.
  2. Join a meeting and click on the screen sharing button.
  3. Click on the screen sharing button.
  4. Click on the share screen extension button.

Actual behavior:

sharing screen process: image

nothing on participant's meeting room: image

Expected behavior:

The participant in meeting room should see the shared screen projected by iOS user.

Client information:

  • Operating System: Apple M1 Pro (macOS 14.1.1)
  • Physical phone: phone X

Additional information:

  • "@jitsi/react-native-sdk": "1.0.2"
  • "react-native": "0.72.3"
  • "xcode version": "15.0.1"

CacdiWilsonHsu avatar Dec 22 '23 07:12 CacdiWilsonHsu

I don't think we fully wired up the SDK side of things for the RN SDK.

Some work is needed in that area to make it work.

saghul avatar Dec 22 '23 07:12 saghul

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.

github-actions[bot] avatar Feb 21 '24 01:02 github-actions[bot]

I get same issue, and debugging it .

dawei101 avatar Feb 22 '24 05:02 dawei101

It doesn't work yet, the native parts are not wired in the rn sdk at the moment.

saghul avatar Feb 22 '24 07:02 saghul

It doesn't work yet, the native parts are not wired in the rn sdk at the moment.

I guess I can spend some time to contribute it , could you help to give some clue?

dawei101 avatar Feb 22 '24 09:02 dawei101

Hi @saghul @dawei101 Thanks for paying attention to this issue. I was wondering if any update release would be scheduled?

CacdiWilsonHsu avatar Mar 29 '24 09:03 CacdiWilsonHsu

Not yet, sorry.

saghul avatar Mar 29 '24 10:03 saghul

When starting screen sharing in lib-jitsi-meet, an error is thrown Replacing a track of videoType=camera with a track of videoType=desktop is not supported in this mode. in JitsiConference.js

What is meant by mode? Why can't camera/desktop tracks be replaced? Any ideas how to get round this?

AndrewTotsky avatar Apr 02 '24 04:04 AndrewTotsky

Please open a new issue, your problem has nothing to do with the originally reported one.

saghul avatar Apr 02 '24 05:04 saghul

Hi @saghul @dawei101 If you have any further update for this issue, please feel free to let us know. We are still following up on this issue.

CacdiWilsonHsu avatar Apr 29 '24 06:04 CacdiWilsonHsu

We have no update on screen-sharing on iOS. It's still not supported.

saghul avatar Apr 29 '24 06:04 saghul

Still following this issue. Comment for keeping it active!

Jiayuwalker avatar Jun 19 '24 03:06 Jiayuwalker

I saw there was new release for react-native-sdk, dose it solve this issue?

Jiayuwalker avatar Aug 09 '24 08:08 Jiayuwalker

No, it doesn't.

saghul avatar Aug 09 '24 08:08 saghul