Open Chromecast YouTube video from my Android app

前端 未结 2 1648
無奈伤痛
無奈伤痛 2020-12-14 04:36

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?

I assume all I would need is

2条回答
  •  萌比男神i
    2020-12-14 05:13

    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);
    

    The above should create a YouTube session and play the video.

提交回复
热议问题