嗨,我正在开发一个android应用程序。我使用的是Youtube API v3。正如我在题目中提到的,有没有办法?因为我向Youtube服务器发送命令,所以他们返回视频和直播流。
我试图找到排除直播视频的选项,但我做不到。
发布于 2016-10-02 23:38:32
尝试使用videos.list
检索Youtube上的非直播视频。使用HTTP请求
GET https://www.googleapis.com/youtube/v3/videos
来执行该操作。
现在就让Try-it在你的浏览器中查看结果。
由于您使用的是Android,来自同一页面的以下代码片段可能会让您有所了解:
// Call the YouTube Data API's youtube.videos.list method to
// retrieve the resources that represent the specified videos.
YouTube.Videos.List listVideosRequest = youtube.videos().list("snippet, recordingDetails").setId(videoId);
VideoListResponse listResponse = listVideosRequest.execute();
List<Video> videoList = listResponse.getItems();
https://stackoverflow.com/questions/39803989
复制相似问题