octo-deno/make/files.js

46 lines
1.6 KiB
JavaScript
Raw Normal View History

2017-04-22 20:16:47 +00:00
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
2017-04-12 20:33:41 +00:00
make.files = {
image: function () {
2017-04-13 02:14:02 +00:00
return utils.quote(random.pick([
2017-04-12 20:33:41 +00:00
"data:image/gif;base64,R0lGODlhAQABAIAAAP///wAAACwAAAAAAQABAAACAkQBADs=",
"data:image/gif;base64,R0lGODlhAQABAIAAAP///wAAACH5BAEAAAAALAAAAAABAAEAAAICRAEAOw==",
"data:image/gif;base64,R0lGODlhAQABAAAAACwAAAAAAQABAAA=",
"data:image/gif;base64,R0lGODlhAQABAAAAACw=",
"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAAAAAA6fptVAAAACklEQVQYV2P4DwABAQEAWk1v8QAAAABJRU5ErkJggg==",
"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAQAAAC1HAwCAAAAC0lEQVQYV2NgYAAAAAMAAWgmWQ0AAAAASUVORK5CYII=",
"media/images/image1.jpg",
"media/images/image3.jpg"
]));
},
video: function () {
2017-04-13 02:14:02 +00:00
return utils.quote(random.pick([
2017-04-12 20:33:41 +00:00
"media/video/video1.webm",
"media/video/video2.webm"
]));
},
audio: function () {
2017-04-13 02:14:02 +00:00
return utils.quote(random.pick([
2017-04-12 20:33:41 +00:00
"media/audio/mono-uncompressed-8bit-8000hz.wav",
"media/audio/mono-uncompressed-8bit-44100hz.wav",
"media/audio/mono-uncompressed-32bit-8000hz.wav",
"media/audio/mono-uncompressed-32bit-44100hz.wav"
]));
},
webvtt: function () {
2017-04-13 02:14:02 +00:00
return utils.quote(random.pick([
2017-04-12 20:33:41 +00:00
//'data:text/vtt,' + encodeURIComponent('WEBVTT\n\n00:00:00.000 --> 00:00:00.001\ntest');,
"media/video/sample.vtt"
]));
},
file: function () {
return random.pick([
2017-04-22 19:02:38 +00:00
make.files.image,
make.files.video,
make.files.audio
2017-04-12 20:33:41 +00:00
]);
},
2017-04-13 02:14:02 +00:00
};