mirror of https://github.com/calzoneman/sync.git
Whitelist m4a/aac for ffmpeg
This commit is contained in:
parent
041d50cb23
commit
d21943ecc7
|
@ -2,7 +2,7 @@
|
||||||
"author": "Calvin Montgomery",
|
"author": "Calvin Montgomery",
|
||||||
"name": "CyTube",
|
"name": "CyTube",
|
||||||
"description": "Online media synchronizer and chat",
|
"description": "Online media synchronizer and chat",
|
||||||
"version": "3.25.0",
|
"version": "3.25.1",
|
||||||
"repository": {
|
"repository": {
|
||||||
"url": "http://github.com/calzoneman/sync"
|
"url": "http://github.com/calzoneman/sync"
|
||||||
},
|
},
|
||||||
|
|
|
@ -6,6 +6,7 @@ codecToMimeType = (codec) ->
|
||||||
when 'ogg/theora' then 'video/ogg'
|
when 'ogg/theora' then 'video/ogg'
|
||||||
when 'mp3' then 'audio/mp3'
|
when 'mp3' then 'audio/mp3'
|
||||||
when 'vorbis' then 'audio/ogg'
|
when 'vorbis' then 'audio/ogg'
|
||||||
|
when 'aac' then 'audio/aac'
|
||||||
else 'video/flv'
|
else 'video/flv'
|
||||||
|
|
||||||
window.FilePlayer = class FilePlayer extends VideoJSPlayer
|
window.FilePlayer = class FilePlayer extends VideoJSPlayer
|
||||||
|
|
|
@ -20,7 +20,8 @@ var acceptedCodecs = {
|
||||||
|
|
||||||
var acceptedAudioCodecs = {
|
var acceptedAudioCodecs = {
|
||||||
"mp3": true,
|
"mp3": true,
|
||||||
"vorbis": true
|
"vorbis": true,
|
||||||
|
"aac": true
|
||||||
};
|
};
|
||||||
|
|
||||||
var audioOnlyContainers = {
|
var audioOnlyContainers = {
|
||||||
|
|
|
@ -733,6 +733,8 @@
|
||||||
return 'audio/mp3';
|
return 'audio/mp3';
|
||||||
case 'vorbis':
|
case 'vorbis':
|
||||||
return 'audio/ogg';
|
return 'audio/ogg';
|
||||||
|
case 'aac':
|
||||||
|
return 'audio/aac';
|
||||||
default:
|
default:
|
||||||
return 'video/flv';
|
return 'video/flv';
|
||||||
}
|
}
|
||||||
|
|
|
@ -446,7 +446,7 @@ $("#mediaurl").keyup(function(ev) {
|
||||||
queue("end", "url");
|
queue("end", "url");
|
||||||
} else {
|
} else {
|
||||||
var url = $("#mediaurl").val().split("?")[0];
|
var url = $("#mediaurl").val().split("?")[0];
|
||||||
if (url.match(/^https?:\/\/(.*)?\.(flv|mp4|og[gv]|webm|mp3|mov)$/) ||
|
if (url.match(/^https?:\/\/(.*)?\.(flv|mp4|og[gv]|webm|mp3|mov|m4a)$/) ||
|
||||||
url.match(/^fi:/)) {
|
url.match(/^fi:/)) {
|
||||||
var title = $("#addfromurl-title");
|
var title = $("#addfromurl-title");
|
||||||
if (title.length === 0) {
|
if (title.length === 0) {
|
||||||
|
|
|
@ -1426,7 +1426,7 @@ function parseMediaLink(url) {
|
||||||
/* Raw file */
|
/* Raw file */
|
||||||
var tmp = url.split("?")[0];
|
var tmp = url.split("?")[0];
|
||||||
if (tmp.match(/^https?:\/\//)) {
|
if (tmp.match(/^https?:\/\//)) {
|
||||||
if (tmp.match(/\.(mp4|flv|webm|og[gv]|mp3|mov)$/)) {
|
if (tmp.match(/\.(mp4|flv|webm|og[gv]|mp3|mov|m4a)$/)) {
|
||||||
return {
|
return {
|
||||||
id: url,
|
id: url,
|
||||||
type: "fi"
|
type: "fi"
|
||||||
|
@ -1435,8 +1435,9 @@ function parseMediaLink(url) {
|
||||||
Callbacks.queueFail({
|
Callbacks.queueFail({
|
||||||
link: url,
|
link: url,
|
||||||
msg: "The file you are attempting to queue does not match the supported " +
|
msg: "The file you are attempting to queue does not match the supported " +
|
||||||
"file extensions mp4, flv, webm, ogg, ogv, mp3, mov."
|
"file extensions mp4, flv, webm, ogg, ogv, mp3, mov, m4a."
|
||||||
});
|
});
|
||||||
|
// Lol I forgot about this hack
|
||||||
throw new Error("ERROR_QUEUE_UNSUPPORTED_EXTENSION");
|
throw new Error("ERROR_QUEUE_UNSUPPORTED_EXTENSION");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue