livekit / client-sdk-android

LiveKit SDK for Android
https://docs.livekit.io
Apache License 2.0
165 stars 64 forks source link

The setScreenShareEnabled(true) not work #338

Open farsunset opened 7 months ago

farsunset commented 7 months ago

Describe the bug localParticipant.setScreenShareEnabled(true,shareIntent) not work. the data is callback intent and Foreground notication is showing.

To Reproduce Get shareIntent and call localParticipant.setScreenShareEnabled(true,shareIntent) ; image

Screenshots But remote side the screen not display. The camera video display is normal image

Device Info:

Additional context Add any other context about the problem here.

farsunset commented 7 months ago
@Override
            public void resumeWith(@NonNull Object o) {
                LocalTrackPublication publication = localParticipant.getTrackPublication(Track.Source.SCREEN_SHARE);
                if (publication != null && publication.getTrack() instanceof LocalScreencastVideoTrack){
                    ((LocalScreencastVideoTrack)publication.getTrack()).startCapture();
                }
            }

Is need to startCapture() on resumeWith?