-
Notifications
You must be signed in to change notification settings - Fork 4
Description
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.