You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
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
innavigator.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 thepreferCurrentTab
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
The text was updated successfully, but these errors were encountered: