summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSasha Andonov <s.andonnov@gmail.com>2023-01-24 08:20:04 -0500
committerHauke Mehrtens <hauke@hauke-m.de>2023-01-28 17:10:36 +0100
commit47561aa13574068403d48f13ea310f8511057b2b (patch)
tree1ff343c3e24403923dc4080a8a98b281a68a1c19
parent63413578a8e32e90cbb01d8bffff7f6db5a3a7a5 (diff)
downloaduhttpd2-master.tar.gz
mimetypes: add audio/video support for apple airplayHEADmaster
Airplay of a statically hosted video file from one Apple device to another fails due to unrecognized content-type. Let's assume we have url1: http://openwrt.local/luci-static/video.mp4. If url1 is passed to a HTML5 browser, it will download the file instead of playing it back as it thinks it is a binary (no entry for mp4 extension atm). Let's also assume we worked this around by wrapping url1 in HTML5 video tag, inside of an html file which we will put at url2: http://openwrt.local/luci-static/video.html. The playback starts as the browser now knows it is a video. However, if we now wanted to send the video over Airplay to a second device, it's not gonna share the html file found at url2, but rather the video file found at url1, and the playback on second device will fail as it thinks it is a binary. Adding Airplay supported extensions/mime types fixes the issue. Signed-off-by: Sasha Andonov <s.andonnov@gmail.com>
-rw-r--r--mimetypes.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/mimetypes.h b/mimetypes.h
index 1f5b92f..b01888f 100644
--- a/mimetypes.h
+++ b/mimetypes.h
@@ -74,10 +74,13 @@ static const struct mimetype uh_mime_types[] = {
{ "mp3", "audio/mpeg" },
{ "ogg", "audio/x-vorbis+ogg" },
{ "wav", "audio/x-wav" },
+ { "aac", "audio/aac" },
{ "mpg", "video/mpeg" },
{ "mpeg", "video/mpeg" },
{ "avi", "video/x-msvideo" },
+ { "mov", "video/quicktime" },
+ { "mp4", "video/mp4" },
{ "README", "text/plain" },
{ "log", "text/plain" },