hls_parse
A Rust library for parsing m3u8 playlists (HTTP Live Streaming) link.
Installation
To use this library, add the following dependency to Cargo.toml:
[]
= "0.1.2"
Also available on crates.io
Examples
use HLS;
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";
let base_url = "http://media.example.com".to_string;
let mut hls = HLSnew;
hls.set_base_url;
hls.parse;