Upload m4a as audio/mp4; embed audio/mp4, x-flac, and x-m4a (#4470)
* 'audio/x-m4a' should be 'audio/mp4' * add handling for x-flac and x-m4a
This commit is contained in:
parent
4be9a282fa
commit
9dfb2a3fdb
@ -251,6 +251,8 @@ function parse(msg, chan, preview, res, client) {
|
|||||||
case "audio/x-mpeg":
|
case "audio/x-mpeg":
|
||||||
case "audio/x-mpeg-3":
|
case "audio/x-mpeg-3":
|
||||||
case "audio/flac":
|
case "audio/flac":
|
||||||
|
case "audio/x-flac":
|
||||||
|
case "audio/mp4":
|
||||||
case "audio/x-m4a":
|
case "audio/x-m4a":
|
||||||
if (!preview.link.startsWith("https://")) {
|
if (!preview.link.startsWith("https://")) {
|
||||||
break;
|
break;
|
||||||
|
@ -117,6 +117,8 @@ class Uploader {
|
|||||||
detectedMimeType = "audio/wav";
|
detectedMimeType = "audio/wav";
|
||||||
} else if (detectedMimeType === "audio/x-flac") {
|
} else if (detectedMimeType === "audio/x-flac") {
|
||||||
detectedMimeType = "audio/flac";
|
detectedMimeType = "audio/flac";
|
||||||
|
} else if (detectedMimeType === "audio/x-m4a") {
|
||||||
|
detectedMimeType = "audio/mp4";
|
||||||
}
|
}
|
||||||
|
|
||||||
res.setHeader("Content-Disposition", disposition);
|
res.setHeader("Content-Disposition", disposition);
|
||||||
|
Loading…
Reference in New Issue
Block a user