如何在IOS应用程序中下载m3u视频? [英] how to download m3u video in IOS app?

查看:603
本文介绍了如何在IOS应用程序中下载m3u视频?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在开发一个IOS应用程序,它会将一些视频下载到本地,以便用户可以离线观看这些视频。但目前很多视频都是m3u和m3u8格式。我知道m3u和m3u8只是一个视频列表。所以我的问题是如何将真实的视频文件下载到本地并播放它们为m3u和m3u8格式。

I'm developing an IOS application which will download some videos to local so that users can watch those videos offline. But currently, a lot of videos are m3u and m3u8 format. As I know m3u and m3u8 is just a video list. So my question is how I can download the real video file into local and play them for m3u and m3u8 format.

推荐答案

首先, m3u m3u8 是一个播放列表,不包含音乐数据。

First of all, m3u or m3u8 is a playlist, does not contain music data.

要解析文件,您可以按照here 。解析文件后,您可以获取真正的媒体URL并将其加载到媒体播放器。

To parse the file, you can follow the answer here. After you parsed the file, you can fetch the real media URL and load it with media player.

维基百科中的M3U文件格式参考: http://en.wikipedia.org/wiki/M3U

Reference of M3U file format in Wikipedia : http://en.wikipedia.org/wiki/M3U

更新:此外,另一个人正在做类似的事情。您可以查看他的代码此处

UPDATE: Furthermore, another guy is doing similar thing. You can review his code here.

这篇关于如何在IOS应用程序中下载m3u视频?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆