https://github.com/m3u8kit/m3u8parser
A light weight M3U8 parser. Support X-Key & X-Session-Key.
https://github.com/m3u8kit/m3u8parser
cocoapods hls ios m3u8 m3u8-parser objective-c parser
Last synced: 2 months ago
JSON representation
A light weight M3U8 parser. Support X-Key & X-Session-Key.
- Host: GitHub
- URL: https://github.com/m3u8kit/m3u8parser
- Owner: M3U8Kit
- License: mit
- Created: 2013-05-16T02:48:40.000Z (about 12 years ago)
- Default Branch: master
- Last Pushed: 2024-09-17T09:27:23.000Z (9 months ago)
- Last Synced: 2025-04-10T02:18:54.864Z (2 months ago)
- Topics: cocoapods, hls, ios, m3u8, m3u8-parser, objective-c, parser
- Language: Objective-C
- Homepage:
- Size: 231 KB
- Stars: 261
- Watchers: 10
- Forks: 84
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# M3U8Kit
[](https://github.com/M3U8Kit/M3U8Parser/actions)
[](https://img.shields.io/cocoapods/v/M3U8Kit.svg)
[](https://github.com/Carthage/Carthage)
[](https://github.com/apple/swift-package-manager)

[](https://raw.githubusercontent.com/M3U8Kit/M3U8Parser/master/LICENSE)
## TODO
- [ ] Rewrite with Swift## New Features
- EXT-X-Version:4 supported
- Add X-Key parser support that is now for each ts resource.
- Add support for AVERAGE-BANDWIDTH property## Installation
### [Cocoapods](https://cocoapods.org/pods/M3U8Kit)
#### Podfile
Specify it in your Podfile:
```ruby
pod 'M3U8Kit'
```Then, run the following command:
```bash
$ pod install
```### [SPM ⚠️](https://github.com/apple/swift-package-manager)
Released from [`0.4.1`](https://github.com/M3U8Kit/M3U8Parser/releases/tag/0.4.1)
### [Carthage](https://github.com/Carthage/Carthage)
#### Cartfile
Specify it in your `Cartfile`:
```ogdl
github "M3U8Kit/M3U8Parser" ~> 1.0.0
```Run `carthage` to build the framework and drag the built `M3U8Kit.framework` into your Xcode project.
### Manually
If you prefer not to use either of the above mentioned dependency managers, you can integrate `M3U8Parser` into your project manually by adding the files contained in the [Source](https://github.com/M3U8Kit/M3U8Parser/tree/master/Source) folder to your project.
## Usage
- Asynchronous
```objc
#import "NSURL+m3u8.h"[<#URL#> m3u_loadAsyncCompletion:^(M3U8PlaylistModel *model, NSError *error) {
}];
```- Synchronous
```objective-c
NSError *error = nil;
M3U8PlaylistModel *model = [[M3U8PlaylistModel alloc]
initWithURL:@"https://xxx.xxx.com/live.m3u8"
error:&error];
```## License
M3U8Kit is available under the MIT license. See the LICENSE file for more info.