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

Implement screen track capabilities #60

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open

Implement screen track capabilities #60

wants to merge 1 commit into from

Conversation

Regaddi
Copy link
Collaborator

@Regaddi Regaddi commented Aug 30, 2024

This implements screen sharing capabilities for the local participant.

New APIs (on VoiceClient and Transport):

  • startScreenShare(): void
  • stopScreenShare(): void
  • isSharingScreen(): boolean

New events:

  • onScreenTrackStarted(track: MediaStreamTrack, participant: Participant)
  • onScreenTrackStopped(track: MediaStreamTrack, participant: Participant)
  • onScreenShareError(errorMessage: string)

React updates:

  • useVoiceClientMediaTrack now supports screenAudio and screenVideo
  • VoiceClientVideo now accepts an optional trackType prop, which can be "video" | "screenVideo" and defaults to "video"

This is minimalistic support without detailed controls over the screen share. We can add configurable options for getDisplayMedia later, if we need to. For now calling startScreenShare() will trigger the default screen share prompt.

@Regaddi Regaddi requested a review from jptaylor August 30, 2024 07:29
@Regaddi Regaddi self-assigned this Aug 30, 2024
@jptaylor
Copy link
Collaborator

Holding on this PR until RTVI supports it on the bot side

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