mirror of
https://github.com/sile/hls_m3u8.git
synced 2025-01-10 20:25:25 +00:00
Update README.md
This commit is contained in:
parent
d97b737420
commit
c392170b2a
1 changed files with 29 additions and 4 deletions
33
README.md
33
README.md
|
@ -1,9 +1,34 @@
|
|||
hls_m3u8
|
||||
=========
|
||||
|
||||
References
|
||||
-----------
|
||||
[![Crates.io: hls_m3u8](http://meritbadge.herokuapp.com/hls_m3u8)](https://crates.io/crates/hls_m3u8)
|
||||
[![Documentation](https://docs.rs/hls_m3u8/badge.svg)](https://docs.rs/hls_m3u8)
|
||||
[![Build Status](https://travis-ci.org/sile/hls_m3u8.svg?branch=master)](https://travis-ci.org/sile/hls_m3u8)
|
||||
[![Code Coverage](https://codecov.io/gh/sile/hls_m3u8/branch/master/graph/badge.svg)](https://codecov.io/gh/sile/hls_m3u8/branch/master)
|
||||
[![License: MIT](https://img.shields.io/badge/license-MIT-blue.svg)](LICENSE)
|
||||
|
||||
- [HTTP Live Streaming][rfc8216]
|
||||
[HLS] m3u8 parser/generator.
|
||||
|
||||
[rfc8216]: https://tools.ietf.org/html/rfc8216
|
||||
[Documentation](https://docs.rs/hls_m3u8)
|
||||
|
||||
[HLS]: https://tools.ietf.org/html/rfc8216
|
||||
|
||||
Examples
|
||||
---------
|
||||
|
||||
```rust
|
||||
use hls_m3u8::MediaPlaylist;
|
||||
|
||||
let m3u8 = "#EXTM3U
|
||||
#EXT-X-TARGETDURATION:10
|
||||
#EXT-X-VERSION:3
|
||||
#EXTINF:9.009,
|
||||
http://media.example.com/first.ts
|
||||
#EXTINF:9.009,
|
||||
http://media.example.com/second.ts
|
||||
#EXTINF:3.003,
|
||||
http://media.example.com/third.ts
|
||||
#EXT-X-ENDLIST";
|
||||
|
||||
assert!(m3u8.parse::<MediaPlaylist>().is_ok());
|
||||
```
|
||||
|
|
Loading…
Reference in a new issue