Hi duochang,
Thanks for the post. Direct share is a little bit different from the sharing screen, direct share means start sharing right after the meeting has started.
Below is a brief guide to start direct sharing on with Windows SDK:
Step 1: Set isDirectShareDesktop
to be true in the start or join meeting parameter
Step 2: Based on your scenario, configure the hDirectShareAppWnd
- To Share an app: 1. Use the system API to retrieve the window handle of the corresponding app, and assign it to hDirectShareAppWnd.
-
- To share a monitor
- Set hDirectShareAppWnd to NULL
- Use the system API EnumDisplayMonitors() to get the ID of the monitor that you would like to share.
- Use the interface IMeetingConfiguration.SetDirectShareMonitorID() and pass the monitor ID to tell SDK the monitor you would like to share.
Step 3: Start or join a meeting
The concept is the same on both Windows SDK and Electron SDK on Windows, hope this helps.
Thanks!