[][src]Crate hls_m3u8

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

Builder structs

tags

4.3. Playlist Tags

types

Miscellaneous types.

Structs

Error

The Error type of this library.

MasterPlaylist

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

MediaPlaylist

Media playlist.

MediaSegment

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

Traits

Decryptable

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

Type Definitions

Result

This crate specific Result type.