Simple mp3 player

This commit is contained in:
RainLoop Team 2015-04-10 12:17:49 +04:00
parent 351c12c002
commit 1d943356f5
23 changed files with 336 additions and 121 deletions

View file

@ -10,6 +10,7 @@
Globals = require('Common/Globals'),
Utils = require('Common/Utils'),
Links = require('Common/Links'),
Audio = require('Common/Audio'),
AbstractModel = require('Knoin/AbstractModel')
;
@ -109,6 +110,14 @@
);
};
/**
* @return {boolean}
*/
AttachmentModel.prototype.isMp3 = function ()
{
return Audio.supported && '.mp3' === this.fileName.toLowerCase().substr(-4);
};
/**
* @return {boolean}
*/
@ -151,6 +160,14 @@
return this.isImage() || this.isPdf() || this.isText() || this.isFramed();
};
/**
* @return {boolean}
*/
AttachmentModel.prototype.hasPreplay = function ()
{
return this.isMp3();
};
/**
* @return {string}
*/
@ -223,14 +240,6 @@
return sResult;
};
/**
* @return {boolean}
*/
AttachmentModel.prototype.hasPreview = function ()
{
return this.isImage() || this.isPdf() || this.isText() || this.isFramed();
};
/**
* @return {string}
*/