cast api get device ip address

时间:2016-01-30 21:45:24

标签: google-chrome casting google-cast

处理将视频从Chrome应用转换为chrome-cast的项目时,我无法决定决定将哪个网络适配器IP地址传递给chrome.cast的最佳方法。 .media.MediaInfo api方法(我有多个以192.168开头的地址......)

我可以使用以下命令列出所有适配器:chrome.system.network.getNetworkInterfaces。

并且能够使用此方法找到设备,但它不是很稳定,并且每次尝试都不会列出设备:

chrome.mdns.onServiceList.addListener(function (e)
{
    console.log('mdns.onServiceList', e);
},
{
    'serviceType': '_googlecast._tcp.local'
});

我想也许可以选择使用强制转换扩展程序获取用户选择的设备的IP,但无法找到任何设备。

那么,决定哪个网络调整/地址是chrome-cast设备可访问的最佳方式是什么。

谢谢!

0 个答案:

没有答案