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

@ -18,6 +18,7 @@
Utils = require('Common/Utils'),
Events = require('Common/Events'),
Translator = require('Common/Translator'),
Audio = require('Common/Audio'),
Cache = require('Common/Cache'),
@ -734,6 +735,18 @@
oEvent.stopPropagation();
}
})
.on('click', '.attachmentsPlace .showPreplay', function (oEvent) {
if (oEvent && oEvent.stopPropagation)
{
oEvent.stopPropagation();
}
var oAttachment = ko.dataFor(this);
if (oAttachment && oAttachment.isMp3() && Audio.supported)
{
Audio.playMp3(oAttachment.linkDownload(), oAttachment.fileName);
}
})
.on('click', '.thread-list .more-threads', function (e) {
var oLast = null;