1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-27 13:57:35 +00:00

LibWeb/MimeSniff: Add sniffing in an audio or video context

This commit is contained in:
Kemal Zebari 2023-11-09 15:32:34 -08:00 committed by Andrew Kaster
parent 02ea85da2c
commit 3a820ddbdf
3 changed files with 86 additions and 7 deletions

View file

@ -13,7 +13,8 @@ namespace Web::MimeSniff {
enum class SniffingContext {
None,
Browsing,
Image
Image,
AudioOrVideo
};
struct SniffingConfiguration {
@ -42,6 +43,7 @@ private:
ErrorOr<void> mime_type_sniffing_algorithm();
ErrorOr<void> context_specific_sniffing_algorithm(SniffingContext sniffing_context);
ErrorOr<void> rules_for_sniffing_images_specifically();
ErrorOr<void> rules_for_sniffing_audio_or_video_specifically();
// https://mimesniff.spec.whatwg.org/#supplied-mime-type
// A supplied MIME type, the MIME type determined by the supplied MIME type detection algorithm.