MediaRouterProvider在网络中不可见 [英] MediaRouterProvider not visible in the network

查看:200
本文介绍了MediaRouterProvider在网络中不可见的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我创建了 https中给出的 SampleMediaRouteProvider : //github.com/googlesamples/android-MediaRouter 。在此示例中,还有一个 MediaRouter ,它发现网络中的所有 MediaRouteProviders
SampleMediaRouteProvider 在同一设备上对其他应用程序可见,但对同一网络中其他设备上的应用程序不可见。

I created a SampleMediaRouteProvider as given in https://github.com/googlesamples/android-MediaRouter. In this sample there is also a MediaRouter that discovers all MediaRouteProviders in the network. This SampleMediaRouteProvider is visible in the same device to other apps but its not visible to apps on other device in the same network.

能否请我让 MediaRouteProvider 在wifi网络中可见。
我想在Android设备上创建 MediaRenderer ,我可以用它来投射其他Android设备的音频。

Can you please help me to get MediaRouteProvider visible in wifi network. Iam looking to create a MediaRenderer on a Android device that I could use to cast audio from other Android devices.

推荐答案

MediaRouteProvider并没有真正满足您的要求。

MediaRouteProvider doesn't really do what you're asking.

您编写的MediaRouteProvider的作用是允许手机上的应用程序-设备A-查找网络上的其他设备(设备B或C) 。设备B和C可以播放您在设备A上拥有的媒体。设备A可以直接流式传输/镜像(例如到设备B)或广播(例如到设备C)。

The MediaRouteProvider, which you've written, has the role of allowing apps on your phone - device A - to find other devices on the network (device B or C). Device B and C can play the media you have on device A. Device A might stream/mirror directly (say to device B) or 'cast' (say to device C).

在镜像时,您将音频内容从设备A发送到设备B。在投射时,您仅将URL发送到设备C,例如,指向youtube.com上视频的链接。设备C直接到达源以获取内容。

When mirroring, you send the audio content out of device A to device B. When casting, you only send a URL to device C, for example, the link to a video on youtube.com. And device C goes directly to the source to get the content.

我认为您需要:


  • 将MediaRouteProvider放置在每台设备上。

  • 实施发现机制


    • 例如,基于使用SSDP,mDNS等的方式。

    • 具有不适当的媒体路由器发现功能


    • 或使用nanohttpd

    这篇关于MediaRouterProvider在网络中不可见的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆