mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-06-05 01:42:54 +00:00
LibMedia+everywhere: Remove superfluous and unused audio code
We had numerous NiH-based implementations of audio formats and metadata that we now no longer need because we either don't make use of the code, or we replaced its implementation by FFmpeg.
This commit is contained in:
parent
57783eff24
commit
233b4f2ca8
Notes:
github-actions[bot]
2024-09-30 16:49:08 +00:00
Author: https://github.com/gmta
Commit: 233b4f2ca8
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/1575
46 changed files with 12 additions and 6530 deletions
|
@ -195,20 +195,17 @@ Bindings::CanPlayTypeResult HTMLMediaElement::can_play_type(StringView type) con
|
|||
}
|
||||
|
||||
if (mime_type.has_value() && mime_type->type() == "audio"sv) {
|
||||
if (mime_type->subtype() == "flac"sv)
|
||||
return Bindings::CanPlayTypeResult::Probably;
|
||||
if (mime_type->subtype() == "mp3"sv)
|
||||
return Bindings::CanPlayTypeResult::Probably;
|
||||
// "Maybe" because we support mp3, but "mpeg" can also refer to MP1 and MP2.
|
||||
if (mime_type->subtype() == "mpeg"sv)
|
||||
return Bindings::CanPlayTypeResult::Maybe;
|
||||
if (mime_type->subtype() == "mp3"sv)
|
||||
if (mime_type->subtype() == "ogg"sv)
|
||||
return Bindings::CanPlayTypeResult::Probably;
|
||||
if (mime_type->subtype() == "wav"sv)
|
||||
return Bindings::CanPlayTypeResult::Probably;
|
||||
if (mime_type->subtype() == "flac"sv)
|
||||
return Bindings::CanPlayTypeResult::Probably;
|
||||
// "Maybe" because we support Ogg Vorbis, but "ogg" can contain other codecs
|
||||
if (mime_type->subtype() == "ogg"sv)
|
||||
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