mirror of
https://github.com/fergalmoran/ladybird.git
synced 2025-12-26 11:20:03 +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:
committed by
Andreas Kling
parent
57783eff24
commit
233b4f2ca8
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user