# How can I solve the quality issues of screen sharing on Web clients? (/en/api-reference/faq/quality/web_screen_share_issues)

> For AI agents: see the complete documentation index at [llms.txt](/llms.txt).

When a Web client shares the screen, the screen freezes or blurs.

## Solution [#solution]

Find the solution that corresponds to the version of the Web SDK you are using.

### Web 3.x [#web-3x]

Troubleshoot the problem by following the steps below:

1. Ask the user to use the latest official version of the Chrome browser on desktop.
2. Set codec as `vp8` when calling `createClient`.
3. Check whether the user is sharing an application window.
   * If so, ask the user to share the browser tab or the entire screen instead.
   * If not, check the encoding configurations you set in `setScreenProfile`.
4. Upgrade the SDK to 3.2.0 or later versions, and set [`optimizationMode`](https://api-ref.agora.io/en/video-sdk/web/3.x/interfaces/agorartc.streamspec.html#optimizationmode) when creating the stream for screen-sharing. Choose the appropriate transmission optimization mode according to the shared content:
   * If the shared content is mainly slides, texts, or static images, set [`optimizationMode`](https://api-ref.agora.io/en/video-sdk/web/3.x/interfaces/agorartc.streamspec.html#optimizationmode) as `"details"`.
   * If the shared content is mainly videos or games, set [`optimizationMode`](https://api-ref.agora.io/en/video-sdk/web/3.x/interfaces/agorartc.streamspec.html#optimizationmode) as `"motion"`.

### Web 4.x [#web-4x]

Troubleshoot the problem by following the steps below:

1. Ask the user to use the latest official version of the Chrome browser on desktop.
2. Set codec as `vp8` when calling `createClient`.
3. Check whether the user is sharing an application window.
   * If so, ask the user to share a browser tab or the entire screen.
   * If not, check the encoding configurations you set in `createScreenVideoTrack`.
4. Set [`optimizationMode`](https://api-ref.agora.io/en/video-sdk/web/4.x/interfaces/screenvideotrackinitconfig.html#optimizationmode) when creating the video track for screen sharing, and choose the appropriate transmission optimization mode according to the shared content:

   * If the shared content is mainly slides, texts, or static images, set [`optimizationMode`](https://api-ref.agora.io/en/video-sdk/web/4.x/interfaces/screenvideotrackinitconfig.html#optimizationmode) as "details".
   * If the shared content is mainly videos or games, set [`optimizationMode`](https://api-ref.agora.io/en/video-sdk/web/4.x/interfaces/screenvideotrackinitconfig.html#optimizationmode) as `"motion"`.

As of v4.2.0, you can change the transmission optimization mode during a screen sharing session by calling [`setOptimizationMode`](https://api-ref.agora.io/en/video-sdk/web/4.x/interfaces/ilocalvideotrack.html#setoptimizationmode).

## See also [#see-also]

* [Share Screen (Web 3.x)](/en/3.x/interactive-live-streaming/introduction/product-overview)
* [Share Screen (Web 4.x)](/en/interactive-live-streaming/core-functionality/screen-sharing)
* [How can I switch between the screen-sharing stream and the camera stream?](/en/api-reference/faq/integration/switch_screen_camera_web)
