Added HTML5AudioFile class for loading audio with html5 audio tag

This commit is contained in:
Pavle Goloskokovic 2018-01-08 17:11:15 +01:00
parent e421d50996
commit a58b4020b5

View file

@ -0,0 +1,28 @@
var Class = require('../../utils/Class');
var File = require('../File');
var GetFastValue = require('../../utils/object/GetFastValue');
// Phaser.Loader.FileTypes.HTML5AudioFile
var HTML5AudioFile = new Class({
Extends: File,
initialize:
function HTML5AudioFile (key, url, path, config)
{
var fileConfig = {
type: 'audio',
extension: GetFastValue(url, 'type', ''),
key: key,
url: GetFastValue(url, 'uri', url),
path: path,
config: config
};
File.call(this, fileConfig);
}
});
module.exports = HTML5AudioFile;