How do I ensure that the YouTube API only returns videos that can be transferred to iPhone?

I am creating some YouTube search features in the iPhone app and want me to get only the results that will play on the device. According to the Video Search section of the API reference document , this looks relatively simple:

The format parameter indicates that the video should be available in a specific video format. You can specify any of the following formats in your request:

I tried setting "format = 1" to restrict:

RTSP URL for playing mobile video. H.263 (up to 176x144) and AMR audio.

This provides a high proportion of the videos being played, but some of them are still not playing, and I am concerned that it does not return others to be played.

When I leave the format field blank, I get an even higher proportion of non-stream URLs.

+3
source share
2 answers

This does not fit. I understand that iPhone does not transmit RTSP, but supports Apple HTTP Streaming segmented files for streaming MPEG4 video and streaming video through range requests. I also expected the video to be H.264 and AAC sound.

. , 176x144 - QCIF, -.

+2

XML,

http://gdata.youtube.com/feeds/api/videos/<your video id>

, , iPhone, :

<yt:state name='restricted' reasonCode='limitedSyndication'>Syndication of this video was restricted by its owner.</yt:state>

, , .

+1

Source: https://habr.com/ru/post/1740337/


All Articles