如何将应用程序用作播放接收器 [英] How to use an application as playto receiver
问题描述
我想在metro应用中使用playto功能。然而,我使用我的应用程序作为播放源/发送者和Windows媒体播放器成功播放播放器。但我想知道使用我的应用程序作为播放接收器的过程。我google了很多次。
,但不幸的是每次我最终都会讨论只讨论playto来源的事情。
I wanted to use playto functionality in metro app. However I used my app as playto source / sender and windows media player as playto receiver successfully. but I am trying to know the procedure to use my app as playto receiver. I googled a lot of times. but unfortunately every time I end up with the same thing that discuss only playto source.
任何形式的帮助都很明显。
Any kind of help is appreciable.
提前完成。
推荐答案
您将使用
PlayToReceiver 课程。处理其SourceChanged事件以获取MediaElement的源流 MediaPlayer及其Play,Pause等事件可以播放,暂停等MediaElement。
You will use the PlayToReceiver class. Handle its SourceChanged event to get the source stream for your MediaElement MediaPlayer, and its Play, Pause, etc. events to Play, Pause, etc. the MediaElement.
JavaScript Media PlayTo示例在场景3中演示了这一点。确切的语法与C#不同,但它使用相同的Windows.Media.PlayTo.PlayToReceiver类,因此一般流程和事件将是相同的。
There JavaScript Media PlayTo sample demonstrates this in Scenario 3. The exact syntax differs from C#, but it uses the same Windows.Media.PlayTo.PlayToReceiver class so the general flow and events will be the same.
- Rob
这篇关于如何将应用程序用作播放接收器的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!