From cc0d1ba51b41f575cb14188e0a25309c19e76362 Mon Sep 17 00:00:00 2001 From: jb-alvarado Date: Mon, 13 Apr 2020 21:34:47 +0200 Subject: [PATCH] add global filter --- ffplayout/frontend/plugins/filters.js | 7 +++++++ 1 file changed, 7 insertions(+) create mode 100644 ffplayout/frontend/plugins/filters.js diff --git a/ffplayout/frontend/plugins/filters.js b/ffplayout/frontend/plugins/filters.js new file mode 100644 index 00000000..f9c62896 --- /dev/null +++ b/ffplayout/frontend/plugins/filters.js @@ -0,0 +1,7 @@ +import Vue from 'vue' + +Vue.filter('toMin', function (sec) { + const minutes = Math.floor(sec / 60) + const seconds = Math.round(sec - minutes * 60) + return `${String(minutes).padStart(2, '0')}:${String(seconds).padStart(2, '0')} min` +})