diff --git a/dashboard-ui/bower_components/emby-webcomponents/.bower.json b/dashboard-ui/bower_components/emby-webcomponents/.bower.json
index ab9c8a073d..2749bde151 100644
--- a/dashboard-ui/bower_components/emby-webcomponents/.bower.json
+++ b/dashboard-ui/bower_components/emby-webcomponents/.bower.json
@@ -15,12 +15,12 @@
},
"devDependencies": {},
"ignore": [],
- "version": "1.4.107",
- "_release": "1.4.107",
+ "version": "1.4.108",
+ "_release": "1.4.108",
"_resolution": {
"type": "version",
- "tag": "1.4.107",
- "commit": "924bb12b6d7c3536ee00fc1a58ac4c492c36f559"
+ "tag": "1.4.108",
+ "commit": "42932aca23d729123c468fa71c73d84483025aca"
},
"_source": "https://github.com/MediaBrowser/emby-webcomponents.git",
"_target": "^1.2.0",
diff --git a/dashboard-ui/bower_components/emby-webcomponents/alert/alert.js b/dashboard-ui/bower_components/emby-webcomponents/alert/alert.js
index 2bb5d361b7..25a65a1ec4 100644
--- a/dashboard-ui/bower_components/emby-webcomponents/alert/alert.js
+++ b/dashboard-ui/bower_components/emby-webcomponents/alert/alert.js
@@ -1,95 +1,32 @@
-define(['dialogHelper', 'layoutManager', 'globalize', 'material-icons', 'css!./../prompt/style.css', 'emby-button', 'paper-icon-button-light'], function (dialogHelper, layoutManager, globalize) {
+define(['dialog', 'globalize'], function (dialog, globalize) {
- function getIcon(icon, cssClass, canFocus, autoFocus) {
+ return function (text, title) {
- var tabIndex = canFocus ? '' : ' tabindex="-1"';
- autoFocus = autoFocus ? ' autofocus' : '';
- return '' + icon + ' ';
- }
-
- return function (options) {
-
- if (typeof options === 'string') {
+ var options;
+ if (typeof text === 'string') {
options = {
- title: '',
- text: options
+ title: title,
+ text: text
};
- }
-
- var dialogOptions = {
- removeOnClose: true
- };
-
- var backButton = false;
- var raisedButtons = false;
- var isFullscreen = false;
-
- if (layoutManager.tv) {
- dialogOptions.size = 'fullscreen';
- backButton = true;
- raisedButtons = true;
- isFullscreen = true;
} else {
-
- dialogOptions.modal = false;
- dialogOptions.entryAnimationDuration = 160;
- dialogOptions.exitAnimationDuration = 200;
+ options = text;
}
- var dlg = dialogHelper.createDialog(dialogOptions);
+ var items = [];
- dlg.classList.add('promptDialog');
-
- var html = '';
-
- html += '
';
- if (backButton) {
- html += getIcon('', 'btnPromptExit', false);
- }
-
- if (options.title) {
- html += '
';
- html += options.title;
- html += ' ';
- } else if (!isFullscreen) {
- // Add a little space so it's not hugging the border
- html += '
';
- }
-
- var text = options.html || options.text;
-
- if (text) {
-
- if (options.title) {
- html += '
';
- } else {
- html += '
';
- }
-
- html += text;
- html += '
';
- }
-
- var buttonText = options.type == 'error' ? 'sharedcomponents#ButtonOk' : 'sharedcomponents#ButtonGotIt';
- if (raisedButtons) {
- html += '
check ' + globalize.translate(buttonText) + ' ';
- } else {
- html += '
';
- html += '' + globalize.translate(buttonText) + ' ';
- html += '
';
- }
-
- html += '
';
-
- dlg.innerHTML = html;
-
- document.body.appendChild(dlg);
-
- dlg.querySelector('.btnSubmit').addEventListener('click', function (e) {
-
- dialogHelper.close(dlg);
+ items.push({
+ name: globalize.translate('sharedcomponents#ButtonOk'),
+ id: 'ok'
});
- return dialogHelper.open(dlg);
+ options.buttons = items;
+
+ return dialog(options).then(function (result) {
+ if (result == 'ok') {
+ return Promise.resolve();
+ }
+
+ return Promise.reject();
+ });
};
});
\ No newline at end of file
diff --git a/dashboard-ui/bower_components/emby-webcomponents/voice/commands/playcommands.js b/dashboard-ui/bower_components/emby-webcomponents/voice/commands/playcommands.js
index dcc659584c..6cdfefef2f 100644
--- a/dashboard-ui/bower_components/emby-webcomponents/voice/commands/playcommands.js
+++ b/dashboard-ui/bower_components/emby-webcomponents/voice/commands/playcommands.js
@@ -10,13 +10,15 @@
items = shuffleArray(items);
}
- items = items.map(function (i) {
- return i.Id;
- });
-
if (items.length) {
+ var serverId = items[0].ServerId;
+ items = items.map(function (i) {
+ return i.Id;
+ });
+
playbackManager.play({
- ids: items
+ ids: items,
+ serverId: serverId
});
}
else {
@@ -63,6 +65,7 @@
}
var apiClient = connectionManager.currentApiClient();
+
if (result.item.sourceid === 'nextup') {
apiClient.getNextUpEpisodes(query).then(function (queryResult) {
@@ -90,7 +93,6 @@
query.Filters = 'IsFavorite';
}
-
apiClient.getItems(apiClient.getCurrentUserId(), query).then(function (queryResult) {
playItems(queryResult.Items, result.item.shuffle);
diff --git a/dashboard-ui/bower_components/emby-webcomponents/voice/grammarprocessor.js b/dashboard-ui/bower_components/emby-webcomponents/voice/grammarprocessor.js
index 4b0bbca76b..f1a7921272 100644
--- a/dashboard-ui/bower_components/emby-webcomponents/voice/grammarprocessor.js
+++ b/dashboard-ui/bower_components/emby-webcomponents/voice/grammarprocessor.js
@@ -85,7 +85,6 @@ define([], function () {
},
command: null,
text: text,
- userId: Dashboard.getCurrentUserId(),
success: false
};
diff --git a/dashboard-ui/bower_components/emby-webcomponents/voice/voicedialog.js b/dashboard-ui/bower_components/emby-webcomponents/voice/voicedialog.js
index fe63ca6297..7006dc38e0 100644
--- a/dashboard-ui/bower_components/emby-webcomponents/voice/voicedialog.js
+++ b/dashboard-ui/bower_components/emby-webcomponents/voice/voicedialog.js
@@ -1,4 +1,4 @@
-define(['dialogHelper', './voicereceiver', './voiceprocessor', 'globalize', 'emby-button', 'css!./voice.css', 'material-icons', 'css!./../formdialog'], function (dialogHelper, voicereceiver, voiceprocessor, globalize) {
+define(['dialogHelper', 'voiceReceiver', 'voiceProcessor', 'globalize', 'emby-button', 'css!./voice.css', 'material-icons', 'css!./../formdialog'], function (dialogHelper, voicereceiver, voiceprocessor, globalize) {
var lang = 'en-US';
@@ -244,7 +244,11 @@ define(['dialogHelper', './voicereceiver', './voiceprocessor', 'globalize', 'emb
listen();
}
function listen() {
- voicereceiver.listenForCommand(lang || "en-US").then(processInput).then(function (result) {
+ voicereceiver.listen({
+
+ lang: lang || "en-US"
+
+ }).then(processInput).then(function (result) {
closeDialog();
diff --git a/dashboard-ui/bower_components/emby-webcomponents/voice/voiceprocessor.js b/dashboard-ui/bower_components/emby-webcomponents/voice/voiceprocessor.js
index dfb8732ce2..e8956b3712 100644
--- a/dashboard-ui/bower_components/emby-webcomponents/voice/voiceprocessor.js
+++ b/dashboard-ui/bower_components/emby-webcomponents/voice/voiceprocessor.js
@@ -23,24 +23,27 @@
/// .
function processTranscript(text) {
if (text) {
- var processor = grammarprocessor(commandgroups, text);
- if (processor && processor.command) {
- console.log("Command from Grammar Processor", processor);
- return voicecommands(processor)
- .then(function (result) {
- console.log("Result of executed command", result);
- if (result.item.actionid === 'show' && result.item.sourceid === 'group') {
- return Promise.resolve({ error: "group", item: result.item, groupName: result.name, fn: result.fn });
- } else {
- return Promise.resolve({ item: result.item, fn: result.fn });
- }
- }, function () {
- return Promise.reject({ error: "unrecognized-command", text: text });
- });
- } else {
- return Promise.reject({ error: "unrecognized-command", text: text });
- }
+ return getCommandGroups().then(function (commandgroups) {
+ var processor = grammarprocessor(commandgroups, text);
+ if (processor && processor.command) {
+ console.log("Command from Grammar Processor", processor);
+ return voicecommands(processor)
+ .then(function (result) {
+
+ console.log("Result of executed command", result);
+ if (result.item.actionid === 'show' && result.item.sourceid === 'group') {
+ return Promise.resolve({ error: "group", item: result.item, groupName: result.name, fn: result.fn });
+ } else {
+ return Promise.resolve({ item: result.item, fn: result.fn });
+ }
+ }, function () {
+ return Promise.reject({ error: "unrecognized-command", text: text });
+ });
+ } else {
+ return Promise.reject({ error: "unrecognized-command", text: text });
+ }
+ });
} else {
return Promise.reject({ error: "empty" });
diff --git a/dashboard-ui/bower_components/emby-webcomponents/voice/voicereceiver.js b/dashboard-ui/bower_components/emby-webcomponents/voice/voicereceiver.js
index d25bd115fb..9c96a8c721 100644
--- a/dashboard-ui/bower_components/emby-webcomponents/voice/voicereceiver.js
+++ b/dashboard-ui/bower_components/emby-webcomponents/voice/voicereceiver.js
@@ -1,10 +1,15 @@
-define([], function () {
- var currentRecognition = null;
+define(['events'], function (events) {
+ var receiver = {
+
+ };
+
+ var currentRecognition = null;
/// Starts listening for voice commands
/// .
- function listenForCommand(lang) {
+ function listen(options) {
+
return new Promise(function (resolve, reject) {
cancelListener();
@@ -13,13 +18,28 @@
window.mozSpeechRecognition ||
window.oSpeechRecognition ||
window.msSpeechRecognition)();
- recognition.lang = lang;
+
+ recognition.lang = options.lang;
+ recognition.continuous = options.continuous || false;
+
+ var resultCount = 0;
recognition.onresult = function (event) {
console.log(event);
if (event.results.length > 0) {
- var resultInput = event.results[0][0].transcript || '';
- resolve(resultInput);
+
+ var resultInput = event.results[resultCount][0].transcript || '';
+ resultCount++;
+
+ if (options.continuous) {
+ events.trigger(receiver, 'input', [
+ {
+ text: resultInput
+ }
+ ]);
+ } else {
+ resolve(resultInput);
+ }
}
};
@@ -36,7 +56,6 @@
});
}
-
/// Cancel listener.
/// .
function cancelListener() {
@@ -48,10 +67,9 @@
}
- /// An enum constant representing the window. voice input manager option.
- return {
- listenForCommand: listenForCommand,
- cancel: cancelListener
- };
+ receiver.listen = listen;
+ receiver.cancel = cancelListener;
+ /// An enum constant representing the window. voice input manager option.
+ return receiver;
});
\ No newline at end of file
diff --git a/dashboard-ui/scripts/site.js b/dashboard-ui/scripts/site.js
index 24ee0a92e8..1baa1b53af 100644
--- a/dashboard-ui/scripts/site.js
+++ b/dashboard-ui/scripts/site.js
@@ -1830,6 +1830,8 @@ var AppInfo = {};
define("tvguide", [embyWebComponentsBowerPath + "/guide/guide", 'embyRouter'], returnFirstDependency);
define("voiceDialog", [embyWebComponentsBowerPath + "/voice/voicedialog"], returnFirstDependency);
+ define("voiceReceiver", [embyWebComponentsBowerPath + "/voice/voicereceiver"], returnFirstDependency);
+ define("voiceProcessor", [embyWebComponentsBowerPath + "/voice/voiceprocessor"], returnFirstDependency);
define("viewManager", [embyWebComponentsBowerPath + "/viewmanager/viewmanager"], function (viewManager) {
window.ViewManager = viewManager;