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:
backtrace
(optional)- Enables the backtrace feature for the
Error
type. - This feature depends on the following dependencies:
- Enables the backtrace feature for the
chrono
(optional)- Enables parsing dates and verifying them.
- This feature depends on the following dependencies:
- The following things will change:
ExtXProgramDateTime::date_time
will change fromString
toDateTime<FixedOffset>
ExtXDateRange::start_date
will change fromString
toDateTime<FixedOffset>
ExtXDateRange::end_date
will change fromString
toDateTime<FixedOffset>
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
MediaSegment
s, 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 Aliases§
- This crate specific
Result
type.