blob: 973bd15d90904be916288800b2b7d472ae988866 [file] [log] [blame]
var audioCodecs = [
["audio/wav", "wav"],
["audio/aac", "m4a"],
["audio/mpeg", "mp3"],
["audio/ogg", "oga"]
];
var videoCodecs = [
["video/mp4", "mp4"],
["video/mpeg", "mpg"],
["video/quicktime", "mov"],
["video/ogg", "ogv"]
];
function findMediaFile(tagName, name) {
var codecs;
if (tagName == "audio")
codecs = audioCodecs;
else
codecs = videoCodecs;
var element = document.getElementsByTagName(tagName)[0];
if (!element)
element = document.createElement(tagName);
for (var i = 0; i < codecs.length; ++i) {
if (element.canPlayType(codecs[i][0]))
return name + "." + codecs[i][1];
}
return "";
}
function mimeTypeForExtension(extension) {
for (var i = 0; i < videoCodecs.length; ++i) {
if (extension == videoCodecs[i][1])
return videoCodecs[i][0];
}
for (var i = 0; i < audioCodecs.length; ++i) {
if (extension == audioCodecs[i][1])
return audioCodecs[i][0];
}
return "";
}
function mimeTypeForFile(filename) {
var lastPeriodIndex = filename.lastIndexOf(".");
if (lastPeriodIndex > 0)
return mimeTypeForExtension(filename.substring(lastPeriodIndex + 1));
return "";
}
function setSrcByTagName(tagName, src) {
var elements = document.getElementsByTagName(tagName);
if (elements) {
for (var i = 0; i < elements.length; ++i)
elements[i].src = src;
}
}
function setSrcById(id, src) {
var element = document.getElementById(id);
if (element)
element.src = src;
}
function stripExtension(filename) {
var lastPeriodIndex = filename.lastIndexOf(".");
if (lastPeriodIndex > 0)
return filename.substring(0, lastPeriodIndex);
return filename;
}
function handlePromise(promise) {
function handle() { }
return promise.then(handle, handle);
}
// The base64'd data below was generated from the corresponding content/test.{mp4,ogv} files with:
// rm -f test-frame.ogv test-frame.mp4 && \
// ~/tmp/ffmpeg/ffmpeg -i test.mp4 -an -vframes 1 test-frame.png && \
// pngtopnm test-frame.png > test-frame.pnm && pnmscale 0.25 test-frame.pnm|pnmtopng > test-frame.png && \
// ~/tmp/ffmpeg/ffmpeg -i test-frame.png -an -vframes 1 -s 80x60 test-frame.mp4 && \
// ffmpeg2theora test-frame.mp4 -o test-frame.ogv && rm test-frame.png test-frame.pnm
// Followed by [base64 -w 120 test-frame.ogv] and [base64 -w 120 test-frame.mp4].
//
const dataURLs = {
"mp4" : `data:video/mp4;base64,
AAAAHGZ0eXBpc29tAAACAGlzb21pc28ybXA0MQAAAAhmcmVlAAAHuG1kYXQAAAGzABAHAAABthBgdgpU4Bg8SyD1tWXqqBr13UzOZBxmb/64MV3Y2OWRzRBZ
vxztjdtC0aswA4S201VqgQ/Np60Xf8OUmDifBg+95svvk+lsTg4EMuv6x9WzQbpfFfpARTAuyg4uzeDkGWlUS9HIed50tZ6pNjlvoEfjd6hclYB4KApmDwRr
AZTg4Zawfliu78GzrSRSn2346BT23GdS+aoN6cTJARID4MA79lWcA4kA03AYcp4mBVsNlk9hYqEJW20JJePwNxJqthUyX/HNYEHS8P79hhLN0z88EBKyOd+B
1NqZkSmM3f98PYrSpxGVM3yYDZa0O1fh/5O2X+YZUK2WVYfe/n3HgYtxtM0pHQkA8H/zsj2RQX80S0+Kh2rBCgMv2gdVpR+r98t6k36bRyJE2B8AxqxLxhod
7g6EhYQ8T3vi/jReXfANEtMOmQZcHg/+cG6IybfRqtMAigG43g6Z1uA+D/0/aXh2JCpWr94eCSlZrbKZU1oKZujuwvCGCnA1qcvxZJ/BJmgxb9VRA6Boch+D
AJF7KUeYOvCXiYEVpOCmEDGmmByrBhy3GFUgf6x6DnR3VI5/6SMt3auZC58DgjfA2pLsBxfufZsv8t3N/+XLmysB62z/RALC37Kv/1Ost0zGiEOtD/qbAYri
TG1CnwPBwC96PlF9crWpNK1WtFmtbJuWXJXfMuPghiUJbPmPD5vitVGYrbYTRq62XKh3U1AzrIfgiBDjegrA+o5V5Fe/LTAuD5igwiNL96HmL9LeoEIgs9Nj
n4EdPlGBGHSZmK1SRppvFUSZfLTGMxr0zPB1A8VKvXZimtKlXrb5hqGI+2HzFBhEaX70PMX6W9QIRBZ6bHPwI6ftWqYrDIKxq9abBkGb1TjfVh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/v0lKe/O7777/urfwDuRL4vnLC2W8VNKmlTXI85zhb9Tzg5Pq3b4MHGJys
A0vsJbIsiyLIsEXpf8Fvh9ve5rMuDmsFkgjCv6z0V/RCArnWZw2pL3cs2uKgHydecWhDe3OxQXkRfRz3haf8V7+0/u7FiQDyfSCDxnf/uIhzK8RYGDCXYRMY
qVpiJEi6iqzlnq91PbMvN7rqyqfI2QlKUpAgQIcDeBvA3afsV8/MqBxcDH6z8DKVq+fDeHyLb9bk1SlLLSZV5sj6vR9c+ZoSzmUe7nFIY77Io1uY7TGlp67W
1xSRjyffmuz+ZZnIo6iK81o5jPqjLad2pJVNlxcrFNTU1NxMGZmYZLw9FOO1MMyzMZOXW2i5f+SZOTWvXrxbvWtF9F/qpM8k7VWZ1srpVdmc/rNt5671q/4o
aPLioDn63vKe+3TsR1QdT3cbbX29dJhFWxGfPji8uow/RvEdxN26QXd3d3dmltxmvn9xX41q7lJ+EyZMmTJk5d7e2lt4T80idGzp5p4ZOwcwt9MfSg2px6rr
OjC7dunTLPnPm37py9tZjaU10a2lujlPd5ZYZbWZmZmYa7t76epZjI6IyFSpUiRI6tO81MJ+FSshXxUNo2qCYteb6DTfQ7eWHcYqrx8q3N+WmphpSJJJJM/j
1au8t2/m25K9evXr169fcx23mLqG6yrVvctNSdG9PTPz32j10DtUeJJJCiPs2L3slpLcg3LLLJJJQaTfR9IalPOLMvdptttts9C1Q35jwWm306Lp06dOnTp0
aWtuFpwSSSSHPcIguQA=`,
};
function dataURL(type)
{
const url = dataURLs[type];
if (!url)
console.log(`No base64 url for type ${type}`)
return url;
}
function findDataURL(tagName) {
let element = document.getElementsByTagName(tagName)[0];
if (!element)
element = document.createElement(tagName);
for (let type in dataURLs) {
if (element.canPlayType(`${tagName}/${type}`))
return dataURLs[type];
}
console.log(`No base64 url for type ${type}`)
return '';
}