mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-08-29 20:19:22 +03:00
Simple mp3 player
This commit is contained in:
parent
351c12c002
commit
1d943356f5
23 changed files with 336 additions and 121 deletions
|
|
@ -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}
|
||||
*/
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue