【发布时间】:2015-09-15 12:08:40
【问题描述】:
如何将 ChromeCast 传递给 Google 云端硬盘文件
根据 Drive Docs https://developers.google.com/drive/web/manage-downloads
GET https://www.googleapis.com/drive/v2/files/<myFileID>?alt=media
Authorization: Bearer ya29.AHESVbXTUv5mHMo3RYfmS1YJonjzzdTOFZwvyOAUVhrs
但是 Chromecast 的初始化程序不允许我传递标头。
* @param contentID The content ID.
* @param streamType The stream type.
* @param contentType The content (MIME) type.
* @param metadata The media item metadata.
* @param streamDuration The stream duration.
* @param mediaTracks The media tracks, if any, otherwise <code>nil</code>.
* @param textTrackStyle The text track style, if any, otherwise <code>nil</code>.
* @param customData The custom application-specific data.
*/
- (instancetype)initWithContentID:(NSString *)contentID
streamType:(GCKMediaStreamType)streamType
contentType:(NSString *)contentType
metadata:(GCKMediaMetadata *)metadata
streamDuration:(NSTimeInterval)streamDuration
mediaTracks:(NSArray *)mediaTracks
textTrackStyle:(GCKMediaTextTrackStyle *)textTrackStyle
customData:(id)customData;
我已尝试将 refresh 令牌作为 &access_token=%@ 传递,但 Google 云端硬盘似乎不接受此令牌
【问题讨论】:
-
您尝试将哪种类型的驱动器文件传递给您的 chromecast?
-
照片、视频和音乐。最终,目前我只尝试了照片
标签: android ios google-drive-api chromecast google-cast