java – Youtube API:搜索可在移动设备上播放的视频

我正在使用youtube api按关键字查询视频.结果必须可以在Android Youtube应用程序上播放,但有时我会收到一个错误,视频在移动设备上不可用.

是否有参数/选项来搜索可在移动设备上播放的视频?

解决方法:

如你所见:
http://code.google.com/apis/youtube/2.0/developers_guide_protocol_api_query_parameters.html
您可以为查询指定格式参数.

1   RTSP streaming URL for mobile video playback. H.263 video (up to 176x144) and AMR audio.
5   HTTP URL to the embeddable player (SWF) for this video. This format is not available for a video that is not embeddable. Developers commonly add &format=5 to their queries to restrict results to videos that can be embedded on their sites.
6   RTSP streaming URL for mobile video playback. MPEG-4 SP video (up to 176x144) and AAC audio.
上一篇:如何使用openCV python阅读Youtube直播流?


下一篇:Youtube python:获取缩略图