Crate hls_m3u8[][src]

Expand description

HLS m3u8 parser/generator.

Examples

use hls_m3u8::MediaPlaylist;
use std::convert::TryFrom;

let m3u8 = MediaPlaylist::try_from(concat!(
    "#EXTM3U\n",
    "#EXT-X-TARGETDURATION:10\n",
    "#EXT-X-VERSION:3\n",
    "#EXTINF:9.009,\n",
    "http://media.example.com/first.ts\n",
    "#EXTINF:9.009,\n",
    "http://media.example.com/second.ts\n",
    "#EXTINF:3.003,\n",
    "http://media.example.com/third.ts\n",
    "#EXT-X-ENDLIST",
));

assert!(m3u8.is_ok());

Crate Feature Flags

The following crate feature flags are available:

They are configured in your Cargo.toml and can be enabled like this

hls_m3u8 = { version = "0.3", features = ["chrono", "backtrace"] }

Re-exports

pub use stable_vec;

Modules

Builder structs

Miscellaneous types.

Structs

The Error type of this library.

The master playlist describes all of the available variants for your content.

Media playlist.

A video is split into smaller chunks called MediaSegments, which are specified by a uri and optionally a byte range.

Traits

Signals that a type or some of the asssociated data might need to be decrypted.

Type Definitions

This crate specific Result type.