mirror of
https://github.com/sile/hls_m3u8.git
synced 2024-12-22 20:16:27 +00:00
HLS(RFC8216) m3u8 parser/generator
34df16f7d6
* fix EXT-X-MEDIA DEFAULT=yes wrt AUTOSELECT In 4.3.4.1. EXT-X-MEDIA section about AUTOSELECT is written If the AUTOSELECT attribute is present, its value MUST be YES if the value of the DEFAULT attribute is YES. That means, that if DEFAULT is YES and AUTOSELECT is *not present*, it ok. Before the patch, incorrect error is emitted If `DEFAULT` is true, `AUTOSELECT` has to be true too, Default: Some(true), Autoselect: None! Signed-off-by: Nikola Pajkovsky <nikola.pajkovsky@livesporttv.cz> * update src/tags/master_playlist/media.rs Co-authored-by: Nikola Pajkovsky <nikola.pajkovsky@livesporttv.cz> Co-authored-by: Lucas <24826124+Luro02@users.noreply.github.com> |
||
---|---|---|
.github/workflows | ||
src | ||
tests | ||
.gitignore | ||
.travis.yml | ||
Cargo.toml | ||
LICENSE-APACHE | ||
LICENSE-MIT | ||
README.md | ||
rustfmt.toml |
hls_m3u8
HLS m3u8 parser/generator.
Examples
use hls_m3u8::MediaPlaylist;
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";
assert!(m3u8.parse::<MediaPlaylist>().is_ok());
License
Licensed under either of
- Apache License, Version 2.0 (LICENSE-APACHE or http://www.apache.org/licenses/LICENSE-2.0)
- MIT license (LICENSE-MIT or http://opensource.org/licenses/MIT)
at your option.
Contribution
Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.