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

Support "preferCurrentTab" option in screen sharing for Agora React SDK #7

Open
2 tasks done
AlissonEnz opened this issue Oct 30, 2024 · 0 comments
Open
2 tasks done

Comments

@AlissonEnz
Copy link

Description

We are using the Agora React SDK’s useLocalScreenTrack hook for screen sharing within our web application. To improve user experience, we need the ability to prioritize sharing of the current tab only.

Native browser APIs allow the use of preferCurrentTab: true in navigator.mediaDevices.getDisplayMedia, which directs users to share the active tab, ideal for applications restricted to a single tab view.

However, the useLocalScreenTrack hook in the Agora SDK does not currently support this option, making it impossible to limit users to current tab sharing only.

Suggested solution

Extend the useLocalScreenTrack hook to support the preferCurrentTab parameter in its screen-sharing configuration.

This addition would enable developers to guide users towards sharing only the active tab by default, aligning the SDK with native browser capabilities and improving screen-sharing control within single-tab applications.

Alternative

No response

Additional context

Our application is designed around single-tab functionality, making it essential to restrict sharing to the current tab for security and streamlined user interaction.

Enabling this configuration would reduce accidental full-screen sharing and simplify the user experience, aligning the Agora SDK with the browser's native capabilities. For reference, please see the Mozilla documentation on preferCurrentTab.

Validations

  • Read the docs.
  • Check that there isn't already an issue that request the same feature to avoid creating a duplicate.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant