MPMoviePlayerController & .m3u8 playlist
I would like to use a .m3u8 playlist containing remote mp4 files with MPMoviePlayerCon开发者_高级运维troller, did you success with this ?
Does the .m3u8 must contain .ts file ?
If not what is the purpose of .ts ?Does next / previous buttons will be enable once the playlist be loaded ?
If not, what is the purpose of these buttons ?And last question, do you have a .m3u8 sample file with remote mp4 file to test ?
Thanks a lot for your help.
Thierry
Since you're talking about .m3u8
and .ts
files, can I assume you're interested in HTTP Live Streaming, as supported by iPhone OS 3.0 and Snow Leopard? There is more info about HTTP Live Streaming in the documentation.
- In HTTP Live Streaming, the
.m3u8
file lists other files that are to be downloaded and played in order. If the.m3u8
file doesn't contain an#EXT-X-ENDLIST
directive, then the client assumes the source is a live stream, and periodically re-fetches the.m3u8
to find new media files to download. The.ts
files are MPEG-2 trasnsport stream files that contain muxed audio and video (despite the fact that the transport stream is part of the MPEG-2 spec, the contents should be H.264 and AAC, the audio and video codecs usually associated with MPEG-4). You sometimes see other contents, like.aac
for audio-only streams. A server will segment a video stream into many.ts
files, the.m3u8
file will provide URLs for these.ts
files, and a client will download and play the.ts
files in order. As an iPhone developer, all you have to do is provide the.m3u8
URL to theMPMoviePlayerController
, which will handle the rest. - Don't know about the prev/next buttons... don't seem like they'd make sense in a stream context, and I'm not sure whether the the
MPMoviePlayerController
even shows them. You can use themovieControlMode
property to set what controls are offered to the user. - Apple's docs provide links to some sample test pattern streams.
精彩评论