简体   繁体   English

使用 Miracast 以编程方式在 Windows 上添加无线显示器

[英]Programmatically add a wireless display on Windows using Miracast

I am looking to develop a WPF application, if not UWP app, that will programmatically add a specific device (a Samsung Tablet) as a wireless display device for Win10.我希望开发一个 WPF 应用程序,如果不是 UWP 应用程序,它将以编程方式添加特定设备(三星平板电脑)作为 Win10 的无线显示设备。 Eg.例如。 I have only 1 screen now, I want to add the tablet as my Screen 2 (extend my current Desktop).我现在只有 1 个屏幕,我想将平板电脑添加为我的屏幕 2(扩展我当前的桌面)。

It is basically what the 'Win key + K' does, minus the device selection part.基本上就是'Win key + K'的作用,减去设备选择部分。 Both the Win 10 system and the tablet will be on the same Wifi network. Win 10 系统和平板电脑将在同一个 Wifi 网络上。

I have checked out the following samples from Windows UWP samples.我已经从 Windows UWP 示例中查看了以下示例。

https://github.com/microsoft/Windows-universal-samples/tree/main/Samples/BasicMediaCasting https://github.com/Microsoft/Windows-universal-samples/tree/main/Samples/AdvancedCasting https://github.com/microsoft/Windows-universal-samples/tree/main/Samples/Projection https://github.com/microsoft/Windows-universal-samples/tree/main/Samples/BasicMediaCasting https://github.com/Microsoft/Windows-universal-samples/tree/main/Samples/AdvancedCasting https://开头github.com/microsoft/Windows-universal-samples/tree/main/Samples/Projection

Using 'Win + K', or using 'add a wireless display' option from Display Settings I am able to find the tablet and connect to it, and enable UIBC, so that I can use the tablet stylus to work on tablet for Windows program such as Whiteboard.使用“Win + K”,或使用“显示设置”中的“添加无线显示”选项我能够找到平板电脑并连接到它,并启用 UIBC,这样我就可以使用平板电脑手写笔在 Windows 程序的平板电脑上工作比如白板。

With BasicMedia Casting and AdvanceCasting samples, I am either unable to find the tablet device, or find the device with a 'Phone' icon/category in front.使用 BasicMedia Casting 和 AdvanceCasting 示例,我要么找不到平板设备,要么找不到前面带有“电话”图标/类别的设备。 (For 'Win +K' option, the tablet is showed as a 'display' category. ) And I am unable to connect to the tablet with the 2 samples. (对于“Win +K”选项,平板电脑显示为“显示器”类别。)而且我无法连接到带有 2 个样本的平板电脑。

With Projection sample, I am able to find and connect to the tablet, but no way to enable UIBC.使用投影示例,我能够找到并连接到平板电脑,但无法启用 UIBC。 In addition, Project sample projects a particular application to the tablet, not showing a desktop, although I find out that it does add the tablet as a 2nd screen.此外,项目示例将一个特定的应用程序投影到平板电脑,没有显示桌面,尽管我发现它确实将平板电脑添加为第二个屏幕。

May I know if there is any sample that is suitable for me?我可以知道是否有任何适合我的样品吗? Or can point me to any documentation on this topic?或者可以指向我有关此主题的任何文档? And how to enable UIBC programmatically in Windows?以及如何在 Windows 中以编程方式启用 UIBC?

TIA TIA

Programmatically add a wireless display on Windows using Miracast使用 Miracast 以编程方式在 Windows 上添加无线显示器

I have to say, wireless display is system level, there no such api could manage it within UWP platform.不得不说,无线显示是系统级的,UWP平台没有这样的api可以管理。 BasicMedia Casting is used to cast the media for SMTC, and the receive device need to support casting. BasicMedia Casting 用于为 SMTC 投放媒体,接收设备需要支持投放。

Projection sample shows how to display two different views of your app UI on different screens, as users might do when projecting your app in a meeting or conference.投影示例展示了如何在不同的屏幕上显示应用程序 UI 的两个不同视图,就像用户在会议中投影应用程序时可能做的那样。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM