Skip to content
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

fix: set setScreenShareEnabled when detect replaykit state changed #398

Merged

Conversation

lambiengcode
Copy link
Contributor

I found that the example app is missing the active Broadcast Extension tracking or is disabled. This PR fix the #242 and #392.

I'll set setScreenShareEnabled is true if detect function broadcastStarted() called in SampleHandler and isScreenShareEnabled() == false or set setScreenShareEnabled is false if detect function broadcastFinished() called in SampleHandler and isScreenShareEnabled() == false

_replayKitChannel.setMethodCallHandler((call) async {
      if (call.method == 'closeReplayKitFromNative') {
        if (!(room.localParticipant?.isScreenShareEnabled() ?? false)) return;

        await room.localParticipant?.setScreenShareEnabled(false);
      } else if (call.method == 'hasSampleBroadcast') {
        if (room.localParticipant?.isScreenShareEnabled() ?? true) return;

        await room.localParticipant?.setScreenShareEnabled(true);
      }
    });

@CLAassistant
Copy link

CLAassistant commented Nov 9, 2023

CLA assistant check
All committers have signed the CLA.

Copy link
Contributor

@cloudwebrtc cloudwebrtc left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@patrikheinonen
Copy link

Is it possible to add something about this to the readme.md @cloudwebrtc

@cloudwebrtc
Copy link
Contributor

Will create PR for README.md later

@cloudwebrtc cloudwebrtc merged commit 7f5c0ba into livekit:main Dec 12, 2023
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants