Google Cast SDK RemoteMediaPlayer网络视频投放,例如的YouTube [英] Google Cast SDK RemoteMediaPlayer web video casting e.g. YouTube

查看:81
本文介绍了Google Cast SDK RemoteMediaPlayer网络视频投放,例如的YouTube的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我是google cast开发的新手。目前,我已经成功开发了可以投放在线媒体的应用程序(例如此mp3 ),方法是使用RemoteMediaPlayer类。

i am new to the google cast development. Currently i've successfully developed an app that can cast online media (e.g. this mp3) by using the RemoteMediaPlayer class.

现在,我尝试投放YouTube视频(此视频),但使用相同的技术,但不会开始投放。

Now i have tried to cast an YouTube video (this video) by using the same technique but it won't start casting. The callback of GoogleApiClient.load() says that the operation was not successful.

因此,是否可以投放YouTube视频(或其他流式平台视频,如vimeo)? )(使用RemoteMediaPlayer类)?

So, is it possible to cast a YouTube video (or another streaming platform videos such as vimeo) by using the RemoteMediaPlayer class?

推荐答案

您需要具有指向媒体的链接,并且媒体应位于其中之一可在Chromecast上支付的格式(有关可接受的格式,请参见我们的文档)。否则您将无法进行。特别是对于YouTube,您无权访问mp4文件(至少不能通过YouTube API),因此您无法在应用的接收器中播放YouTube内容;有些人曾尝试使用嵌入式iframe,但它并不总是成功,而且受到限制。

You need to have a link to the media, and media should be in one of the formats that is payable on Chromecast (see our documentation for accepted formats). Otherwise you will not be possible. For YouTube specifically, you don't have access to the mp4 files (at least not through YouTube APIs) so you cannot play a YT content in your app's receiver; some have tried using the embedded iframe but it is not always successful and it is limited.

这篇关于Google Cast SDK RemoteMediaPlayer网络视频投放,例如的YouTube的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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