summaryrefslogtreecommitdiffstats
path: root/js/controller
diff options
context:
space:
mode:
authorBernhard Posselt <dev@bernhard-posselt.com>2015-03-30 16:20:05 +0200
committerBernhard Posselt <dev@bernhard-posselt.com>2015-03-30 16:20:05 +0200
commitee3d2332ec97487893ae5f1f46b599c550b25eb6 (patch)
treee5a46f12fc027e3deb7c9436160595bb60d99356 /js/controller
parent026ccbc8875fc78b665dec95c308afe8a3c5899e (diff)
fix #156
Diffstat (limited to 'js/controller')
-rw-r--r--js/controller/AppController.js4
-rw-r--r--js/controller/ContentController.js10
2 files changed, 14 insertions, 0 deletions
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