jitsi / jitsi-meet

Jitsi Meet - Secure, Simple and Scalable Video Conferences that you use as a standalone app or embed in your web application.
https://jitsi.org/meet
Apache License 2.0
22.79k stars 6.67k forks source link

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

Open CacdiWilsonHsu opened 8 months ago

CacdiWilsonHsu commented 8 months ago

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>
  5. 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"
    }
  6. 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,
    }}
    />
    ...
  7. 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:

Additional information:

saghul commented 8 months ago

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.

github-actions[bot] commented 6 months 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.

dawei101 commented 6 months ago

I get same issue, and debugging it .

saghul commented 6 months ago

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

dawei101 commented 6 months ago

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?

CacdiWilsonHsu commented 5 months ago

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

saghul commented 5 months ago

Not yet, sorry.

AndrewTotsky commented 5 months ago

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?

saghul commented 5 months ago

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

CacdiWilsonHsu commented 4 months ago

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.

saghul commented 4 months ago

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

Jiayuwalker commented 2 months ago

Still following this issue. Comment for keeping it active!

Jiayuwalker commented 1 month ago

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

saghul commented 1 month ago

No, it doesn't.