From 8afe1257ac37bcbd6e3c3bcd91b51c1a55257bc5 Mon Sep 17 00:00:00 2001 From: j <0x006A@0x2620.org> Date: Thu, 5 Mar 2015 12:12:45 +0000 Subject: [PATCH] display framerate in media view, fixes #416 --- static/js/mediaView.js | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/static/js/mediaView.js b/static/js/mediaView.js index 2f0d1b9c5..7ff2778ab 100644 --- a/static/js/mediaView.js +++ b/static/js/mediaView.js @@ -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']},