From ee3d2332ec97487893ae5f1f46b599c550b25eb6 Mon Sep 17 00:00:00 2001 From: Bernhard Posselt Date: Mon, 30 Mar 2015 16:20:05 +0200 Subject: fix #156 --- js/controller/AppController.js | 4 ++++ js/controller/ContentController.js | 10 ++++++++++ 2 files changed, 14 insertions(+) (limited to 'js/controller') diff --git a/js/controller/AppController.js b/js/controller/AppController.js index 7cf7976ef..31a288540 100644 --- a/js/controller/AppController.js +++ b/js/controller/AppController.js @@ -16,4 +16,8 @@ function (Loading, FeedResource, FolderResource) { this.isFirstRun = function () { return FeedResource.size() === 0 && FolderResource.size() === 0; }; + + this.play = function (item) { + this.playingItem = item; + }; }); \ No newline at end of file diff --git a/js/controller/ContentController.js b/js/controller/ContentController.js index 5e29a5932..dfee837d5 100644 --- a/js/controller/ContentController.js +++ b/js/controller/ContentController.js @@ -191,4 +191,14 @@ function (Publisher, FeedResource, ItemResource, SettingsResource, data, $route.reload(); }; + this.getMediaType = function (type) { + if (type && type.indexOf('audio') === 0) { + return 'audio'; + } else if (type && type.indexOf('video') === 0) { + return 'video'; + } else { + return undefined; + } + }; + }); \ No newline at end of file -- cgit v1.2.3