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:
Jelle Raaijmakers 2024-09-30 14:49:59 +02:00 committed by Andreas Kling
parent 57783eff24
commit 233b4f2ca8
Notes: github-actions[bot] 2024-09-30 16:49:08 +00:00
46 changed files with 12 additions and 6530 deletions

View file

@ -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;
}