我可以用我自己的白名单网址喂我的Chromecast视频,但我可以把它直接从我的应用程序流YouTube视频?
I'm able to use my own whitelisted url for feeding my chromecast videos, but can I make it stream a YouTube video directly from my app?
我承担所有我需要的是远程启动YouTube应用程序,并以某种方式喂给它的视频ID,但我不能找出如何做到这一点。
I assume all I would need is to launch the YouTube app remotely and feed it a video ID somehow, but I can't find out how to do that.
有没有人从一个Android应用程序做到了这一点?
Has anyone done this from an Android app?
感谢。
不知道,如果你还在寻找一个解决方案。做到这一点的方法如下:
Not sure if you are still looking for a solution for this. The way to do it is as follows:
MimeData data = new MimeData("v=g1LsT1PVjUA", MimeData.TYPE_TEXT);
mSession.startSession("YouTube", data);
以上应创建一个YouTube的会话,并播放视频。
The above should create a YouTube session and play the video.