Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
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: 27 days 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 (over 11 years ago)
- Default Branch: master
- Last Pushed: 2024-09-17T09:27:23.000Z (3 months ago)
- Last Synced: 2024-11-09T14:50:19.181Z (about 1 month ago)
- Topics: cocoapods, hls, ios, m3u8, m3u8-parser, objective-c, parser
- Language: Objective-C
- Homepage:
- Size: 231 KB
- Stars: 260
- Watchers: 10
- Forks: 84
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- awesome-video - M3U8Kit/M3U8Parser - A light weight M3U8 parser. Support X-Key & X-Session-Key. - M3U8Kit/M3U8Parser (HLS / Talks Presentations Podcasts)
README
# M3U8Kit
[![Build Status](https://github.com/M3U8Kit/M3U8Parser/workflows/Validation/badge.svg?branch=master&event=push)](https://github.com/M3U8Kit/M3U8Parser/actions)
[![CocoaPods Compatible](https://img.shields.io/cocoapods/v/M3U8Kit.svg)](https://img.shields.io/cocoapods/v/M3U8Kit.svg)
[![Carthage compatible](https://img.shields.io/badge/Carthage-compatible-4BC51D.svg?style=flat)](https://github.com/Carthage/Carthage)
[![SPM supported](https://img.shields.io/badge/SPM-supported-4BC51D.svg?style=flat)](https://github.com/apple/swift-package-manager)
![Platform](https://img.shields.io/cocoapods/p/M3U8Kit.svg?style=flat)
[![MIT license](https://img.shields.io/cocoapods/l/M3U8Kit.svg?style=flat)](https://raw.githubusercontent.com/M3U8Kit/M3U8Parser/master/LICENSE)
![Compatiable with EXT-X-VERSION:4](https://img.shields.io/badge/EXT_X_Version:4-supported-4BC51D.svg?style=flat)## 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.