我想创建一个应用程序,它采用 YouTube URL 并在 iOS 的 chromecast 上播放它。
我按照 Google 的示例进行操作,但我的视频无法在 chromecast 上播放。
这是我用于 GCKMediaInformation 的代码:
GCKMediaInformation *mediaInformation =
[[GCKMediaInformation alloc] initWithContentID:
@"https://www.youtube.com/watch?v=t_WNRZ29WNI"
streamType:GCKMediaStreamTypeNone
contentType:@"video/mp4"
metadata:metadata
streamDuration:0
customData:nil];
有人可以帮我解决这个问题吗?
最佳答案
你不能那样做;您发送到 chromecast 的媒体 URL 是 YouTube 特定 URL;您需要发送一个指向支持的媒体格式的网址(请参阅支持的媒体格式列表here)
关于ios - 来自 YouTube 的 Chromecast iOS 发件人链接,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/31116320/