Skip to content
This repository has been archived by the owner on May 7, 2020. It is now read-only.

Support audio events #2314

Merged
merged 3 commits into from Oct 13, 2016
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,13 @@ angular.module('PaperUI.controllers', [ 'PaperUI.constants' ]).controller('BodyC
eventService.onEvent('smarthome/inbox/*/added', function(topic, discoveryResult) {
toastService.showDefaultToast('New Inbox Entry: ' + discoveryResult.label, 'Show Inbox', 'inbox/search');
});
eventService.onEvent('smarthome/webaudio/playurl', function(topic, audioUrl) {
if (audioUrl) {
var audio = new Audio(audioUrl);
audio.load();
audio.play();
}
});
eventService.onEvent('smarthome/items/*/state', function(topic, stateObject) {

var itemName = topic.split('/')[2];
Expand Down