New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[iOS] getDisplayMedia()
not working
#1175
Comments
Might want to have a look over here as the issue has been discussed before. |
@8BallBomBom thanks! I've seen that before but I still don't understand what to do to get it working. If there are extra steps that need to be taken, there should be documentation backing this up, otherwise the feature is just unusable. |
We need to document this better indeed. In the meantime: https://jitsi.github.io/handbook/docs/dev-guide/dev-guide-ios-sdk/#screen-sharing-integration |
@saghul Thanks!! Let me read through all of that and see if I can get something going... |
On Android it will work out of the box but for Android >= 9 you need a foreground service with the MEDIA_PROJECTION permission. |
There will be a better documentation up at some point but you can follow this if you plan to support Android 10+ screen sharing. |
Ok, I managed to get Android screen sharing working after following the docs suggested by @8BallBomBom. There was just one step that I didn't do, related to As for the JS code, the only thing I'm doing is Any ideas what I could be missing? |
Finally got it to work on iOS. I guess I was missing the whole Even though I got it working, a few notes:
Either way, thanks for the help!! I'll close this issue for now, but would like to see this better documented so everyone can understand exactly what to do to get screen capture working. I'd be happy to help in whatever I can... |
A PR with the steps you followed, adapted to a generic project would be welcome. Note the low fps is intentional, since gDM is designed for mostly static content. |
@saghul I'll get something going once I iron this out. I've been looking into |
We do call it, but it's a few layers down, inside lib-jitsi-meet. |
FYI, I've created this demo app which contains a couple of Expo config plugins to configure both iOS and Android projects for screen capture automatically. In the future I still intend to clean this up and make it more generic, but for now this is a good starting point. |
I didn't know that was possible with Expo plugins, nice! |
bro, in the end, i dont know how to set Can you help me. ? |
I have this RN app which was setup via Expo SDK 46 and, after realizing screen capture is provided by this package, I've decided to give it a try.
I already had a working webrtc display app (using PeerJS), so I've created a simple RN client app with a button for obtaining a stream and connecting to the display and share it.
If I use
getUserMedia({ video: true })
then I can see my camera feed being shared on the screen. However, if I usegetDisplayMedia()
, I get a blank stream.The call to
getDisplayMedia()
doesn't seem to fail and I get a stream though:I also couldn't spot anything obvious on iOS syslog.
Expected Behavior
I would expect some sort of pop-up to ask for permissions to record screen, and then would expect to see my phone screen being shared on my display app.
Observed Behavior
Instead I get a blank stream, which reports 0 FPS on the display side.
Steps to reproduce the issue
react-native-webrtc
and@config-plugins/react-native-webrtc
app.json
expo start --dev-client
)Platform Information
The text was updated successfully, but these errors were encountered: