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

Local screenshare support #69

Merged
merged 2 commits into from
Sep 14, 2023

Conversation

thyal
Copy link
Member

@thyal thyal commented Sep 12, 2023

Adds support for starting/stopping local screenshare.
This is done in the room connection hook - not the local media hook.
The local screenshare will be added to the array of screenshares, but it will have a isLocal: true prop, so it's easy to filter on your own screenshare.

Minimal example of usage:

const { actions } = useRoomConnection(...);

const { startScreenshare, stopScreenshare } = actions;

return (
  <button onClick={() => startScreenshare()}>Start Screen Share</button>
  <button onClick={() => stopScreenshare()}>Stop Screen Share</button>
);

@thyal thyal force-pushed the thomas/PAN-252-local-screenshare-support branch from cc44f57 to db0b59d Compare September 12, 2023 10:15
src/lib/LocalMedia.ts Show resolved Hide resolved
@thyal thyal force-pushed the thomas/PAN-252-local-screenshare-support branch from db0b59d to e142a94 Compare September 14, 2023 07:12
@thyal thyal merged commit 73c3111 into development Sep 14, 2023
1 check passed
@thyal thyal deleted the thomas/PAN-252-local-screenshare-support branch September 14, 2023 07:34
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.

2 participants