androidyoutubechromecastvimeovimeo-android

How can I use CastCompanionLibrary for Android to show live Youtube or Vimeo video?


I have succeeded to cast buffered mp4 video (e.g. url like http://a.com/1.mp4) to my TV with the CastCompanionLibrary.

But I get "mApiClient or mRemoteMediaPlayer is null" in the debug log when I try to cast a youtube video to the TV. I guess it would be same problem for Vimeo's video stream too.

How can I do that? Can it be that my MediaInfo is wrong? Do you have any example for a MediaInfo object for the live video? Thanks!


Solution

  • You cannot use CCL to play YT videos; for CCL to cast a media, you need to provide the url to that media and you don't have such urls for YT content. The only solution to cast YT content is to use YT's embedded player on your receiver.