mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-07-06 17:11:51 +00:00
LibMedia: Add ogg/vorbis support
Technically this supports any ogg/* audio stream, but it was at least tested successfully on ogg/vorbis :^)
This commit is contained in:
parent
1b267abf36
commit
d29797f118
Notes:
github-actions[bot]
2024-09-12 08:02:15 +00:00
Author: https://github.com/gmta
Commit: d29797f118
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/1369
9 changed files with 363 additions and 17 deletions
|
@ -204,12 +204,9 @@ Bindings::CanPlayTypeResult HTMLMediaElement::can_play_type(StringView type) con
|
|||
return Bindings::CanPlayTypeResult::Probably;
|
||||
if (mime_type->subtype() == "flac"sv)
|
||||
return Bindings::CanPlayTypeResult::Probably;
|
||||
// We don't currently support `ogg`. We'll also have to check parameters, e.g. from Bandcamp:
|
||||
// audio/ogg; codecs="vorbis"
|
||||
// audio/ogg; codecs="opus"
|
||||
// "Maybe" because we support Ogg Vorbis, but "ogg" can contain other codecs
|
||||
if (mime_type->subtype() == "ogg"sv)
|
||||
return Bindings::CanPlayTypeResult::Empty;
|
||||
// Quite OK Audio
|
||||
return Bindings::CanPlayTypeResult::Maybe;
|
||||
if (mime_type->subtype() == "qoa"sv)
|
||||
return Bindings::CanPlayTypeResult::Probably;
|
||||
return Bindings::CanPlayTypeResult::Maybe;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue