Merge pull request #40 from sdroege/type-closed-captions

The `TYPE` attribute uses `CLOSED-CAPTIONS` and not `CLOSEDCAPTIONS`
This commit is contained in:
rutgersc 2022-02-19 13:37:26 +01:00 committed by GitHub
commit 5ee1273f7c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -279,7 +279,7 @@ impl FromStr for AlternativeMediaType {
"AUDIO" => Ok(AlternativeMediaType::Audio),
"VIDEO" => Ok(AlternativeMediaType::Video),
"SUBTITLES" => Ok(AlternativeMediaType::Subtitles),
"CLOSEDCAPTIONS" => Ok(AlternativeMediaType::ClosedCaptions),
"CLOSED-CAPTIONS" => Ok(AlternativeMediaType::ClosedCaptions),
_ => Err(format!(
"Unable to create AlternativeMediaType from {:?}",
s
@ -303,7 +303,7 @@ impl fmt::Display for AlternativeMediaType {
AlternativeMediaType::Audio => "AUDIO",
AlternativeMediaType::Video => "VIDEO",
AlternativeMediaType::Subtitles => "SUBTITLES",
AlternativeMediaType::ClosedCaptions => "CLOSEDCAPTIONS",
AlternativeMediaType::ClosedCaptions => "CLOSED-CAPTIONS",
}
)
}