[−][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:
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 | Builder structs |
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 |
Traits
Decryptable | Signals that a type or some of the asssociated data might need to be decrypted. |
Type Definitions
Result | This crate specific |