display framerate in media view, fixes #416

This commit is contained in:
j 2015-03-05 12:12:45 +00:00
parent 9ac5dc7ba9
commit 8afe1257ac
1 changed files with 18 additions and 0 deletions

View File

@ -202,6 +202,24 @@ pandora.ui.mediaView = function(options) {
visible: true,
width: 90
},
{
align: 'right',
format: function(value) {
value = value.split(':').map(function(v) {
return Math.round(v);
});
console.log(value);
return (value[1] != 1
? Ox.formatNumber(value[0] / (value[1] || 1), 2)
: value[0]
) + ' fps';
},
id: 'framerate',
operator: '-',
title: Ox._('Framerate'),
visible: true,
width: 70
},
{
align: 'right',
format: {type: 'duration', args: [0, 'short']},