diff --git a/dashboard-ui/bower_components/emby-webcomponents/.bower.json b/dashboard-ui/bower_components/emby-webcomponents/.bower.json index b3983fa08d..dbb3e4f967 100644 --- a/dashboard-ui/bower_components/emby-webcomponents/.bower.json +++ b/dashboard-ui/bower_components/emby-webcomponents/.bower.json @@ -14,12 +14,12 @@ }, "devDependencies": {}, "ignore": [], - "version": "1.4.123", - "_release": "1.4.123", + "version": "1.4.124", + "_release": "1.4.124", "_resolution": { "type": "version", - "tag": "1.4.123", - "commit": "9939e23191c1f45c2ea59e41a4e55c22c2839bb7" + "tag": "1.4.124", + "commit": "308546fe094fa18c356480d1d13c8790d43de971" }, "_source": "https://github.com/MediaBrowser/emby-webcomponents.git", "_target": "^1.2.0", diff --git a/dashboard-ui/bower_components/emby-webcomponents/browserdeviceprofile.js b/dashboard-ui/bower_components/emby-webcomponents/browserdeviceprofile.js index 3735f369ad..a296629528 100644 --- a/dashboard-ui/bower_components/emby-webcomponents/browserdeviceprofile.js +++ b/dashboard-ui/bower_components/emby-webcomponents/browserdeviceprofile.js @@ -53,12 +53,18 @@ define(['browser'], function (browser) { if (browser.tizen) { return true; } + if (isEdgeUniversal()) { + return true; + } } else if (format == 'wma') { if (browser.tizen) { return true; } + if (isEdgeUniversal()) { + return true; + } } else if (format == 'opus') { @@ -84,13 +90,31 @@ define(['browser'], function (browser) { return false; } - function testCanPlayMkv() { + function isEdgeUniversal() { + + if (browser.edge) { + + var userAgent = navigator.userAgent.toLowerCase(); + if (userAgent.indexOf('msapphost') != -1) { + return true; + } + } + + return false; + } + + function testCanPlayMkv(videoTestElement) { + + if (videoTestElement.canPlayType('video/x-matroska') || + videoTestElement.canPlayType('video/mkv')) { + return true; + } + + var userAgent = navigator.userAgent.toLowerCase(); // Unfortunately there's no real way to detect mkv support if (browser.chrome) { - var userAgent = navigator.userAgent.toLowerCase(); - // Not supported on opera tv if (browser.operaTv) { return false; @@ -108,6 +132,11 @@ define(['browser'], function (browser) { return true; } + if (isEdgeUniversal()) { + + return true; + } + return false; } @@ -122,9 +151,11 @@ define(['browser'], function (browser) { switch (container) { + case 'asf': + supported = browser.tizen || isEdgeUniversal(); + break; case '3gp': case 'avi': - case 'asf': case 'flv': case 'mpg': case 'mpeg': @@ -135,9 +166,11 @@ define(['browser'], function (browser) { supported = browser.tizen; break; case 'm2ts': - case 'wmv': supported = browser.tizen || browser.web0s; break; + case 'wmv': + supported = browser.tizen || browser.web0s || isEdgeUniversal(); + break; case 'ts': supported = browser.tizen || browser.web0s; if (supported) { @@ -199,7 +232,7 @@ define(['browser'], function (browser) { var canPlayWebm = videoTestElement.canPlayType('video/webm').replace(/no/, ''); - var canPlayMkv = testCanPlayMkv(); + var canPlayMkv = testCanPlayMkv(videoTestElement); var canPlayTs = testCanPlayTs(); var profile = {}; @@ -218,7 +251,7 @@ define(['browser'], function (browser) { // Only put mp3 first if mkv support is there // Otherwise with HLS and mp3 audio we're seeing some browsers - if (videoTestElement.canPlayType('audio/mp4; codecs="ac-3"').replace(/no/, '')) { + if (videoTestElement.canPlayType('audio/mp4; codecs="ac-3"').replace(/no/, '') || isEdgeUniversal()) { // safari is lying if (!browser.safari) { videoAudioCodecs.push('ac3'); @@ -266,7 +299,7 @@ define(['browser'], function (browser) { } // These are formats we can't test for but some devices will support - ['m2ts', 'wmv', 'ts'].map(getDirectPlayProfileForVideoContainer).filter(function (i) { + ['m2ts', 'wmv', 'ts', 'asf'].map(getDirectPlayProfileForVideoContainer).filter(function (i) { return i != null; }).forEach(function (i) { diff --git a/dashboard-ui/bower_components/emby-webcomponents/librarychangednotifications.js b/dashboard-ui/bower_components/emby-webcomponents/librarychangednotifications.js deleted file mode 100644 index aad549e8fe..0000000000 --- a/dashboard-ui/bower_components/emby-webcomponents/librarychangednotifications.js +++ /dev/null @@ -1,117 +0,0 @@ -define(['connectionManager', 'playbackManager', 'events', 'inputManager', 'focusManager', 'embyRouter'], function (connectionManager, playbackManager, events, inputManager, focusManager, embyRouter) { - - function onOneDocumentClick() { - - document.removeEventListener('click', onOneDocumentClick); - document.removeEventListener('keydown', onOneDocumentClick); - - if (window.Notification) { - Notification.requestPermission(); - } - } - document.addEventListener('click', onOneDocumentClick); - document.addEventListener('keydown', onOneDocumentClick); - - function onLibraryChanged(data, apiClient) { - - var newItems = data.ItemsAdded; - - if (!newItems.length || /*AppInfo.isNativeApp ||*/ !window.Notification || Notification.permission !== "granted") { - return; - } - - if (playbackManager.isPlayingVideo()) { - return; - } - - apiClient.getItems(apiClient.getCurrentUserId(), { - - Recursive: true, - Limit: 3, - IsFolder: false, - SortBy: "DateCreated", - SortOrder: "Descending", - ImageTypes: "Primary", - Ids: newItems.join(',') - - }).then(function (result) { - - var items = result.Items; - - for (var i = 0, length = items.length ; i < length; i++) { - - var item = items[i]; - - var notification = { - title: "New " + item.Type, - body: item.Name, - timeout: 15000, - vibrate: true, - - data: { - //options: { - // url: LibraryBrowser.getHref(item) - //} - } - }; - - var imageTags = item.ImageTags || {}; - - if (imageTags.Primary) { - - notification.icon = apiClient.getScaledImageUrl(item.Id, { - width: 80, - tag: imageTags.Primary, - type: "Primary" - }); - } - - var notif = new Notification(notification.title, notification); - - if (notif.show) { - notif.show(); - } - - if (notification.timeout) { - setTimeout(function () { - - if (notif.close) { - notif.close(); - } - else if (notif.cancel) { - notif.cancel(); - } - }, notification.timeout); - } - } - }); - } - - function onWebSocketMessageReceived(e, msg) { - - var apiClient = this; - - if (msg.MessageType === "LibraryChanged") { - var cmd = msg.Data; - onLibraryChanged(cmd, apiClient); - } - } - - function bindEvents(apiClient) { - - if (!apiClient) { - return; - } - - events.off(apiClient, "websocketmessage", onWebSocketMessageReceived); - events.on(apiClient, "websocketmessage", onWebSocketMessageReceived); - } - - bindEvents(connectionManager.currentApiClient()); - - events.on(connectionManager, 'apiclientcreated', function (e, newApiClient) { - - bindEvents(newApiClient); - }); - -}); \ No newline at end of file diff --git a/dashboard-ui/bower_components/emby-webcomponents/notifications/notificationicon.png b/dashboard-ui/bower_components/emby-webcomponents/notifications/notificationicon.png new file mode 100644 index 0000000000..38807c3343 Binary files /dev/null and b/dashboard-ui/bower_components/emby-webcomponents/notifications/notificationicon.png differ diff --git a/dashboard-ui/bower_components/emby-webcomponents/notifications/notifications.js b/dashboard-ui/bower_components/emby-webcomponents/notifications/notifications.js new file mode 100644 index 0000000000..8b933a41eb --- /dev/null +++ b/dashboard-ui/bower_components/emby-webcomponents/notifications/notifications.js @@ -0,0 +1,182 @@ +define(['serverNotifications', 'playbackManager', 'events', 'globalize', 'require'], function (serverNotifications, playbackManager, events, globalize, require) { + + function onOneDocumentClick() { + + document.removeEventListener('click', onOneDocumentClick); + document.removeEventListener('keydown', onOneDocumentClick); + + if (window.Notification) { + Notification.requestPermission(); + } + } + document.addEventListener('click', onOneDocumentClick); + document.addEventListener('keydown', onOneDocumentClick); + + function closeAfter(notification, timeoutMs) { + + setTimeout(function () { + + if (notification.close) { + notification.close(); + } + else if (notification.cancel) { + notification.cancel(); + } + }, timeoutMs); + } + + function show(title, options, timeoutMs) { + + try { + var notif = new Notification(title, options); + + if (notif.show) { + notif.show(); + } + + if (timeoutMs) { + closeAfter(notif, timeoutMs); + } + } catch (err) { + if (options.actions) { + options.actions = []; + show(title, options, timeoutMs); + } else { + throw err; + } + } + } + + function showNewItemNotification(item, apiClient) { + + var notification = { + title: "New " + item.Type, + body: item.Name, + vibrate: true, + tag: "newItem" + item.Id, + data: { + //options: { + // url: LibraryBrowser.getHref(item) + //} + } + }; + + var imageTags = item.ImageTags || {}; + + if (imageTags.Primary) { + + notification.icon = apiClient.getScaledImageUrl(item.Id, { + width: 80, + tag: imageTags.Primary, + type: "Primary" + }); + } + + show(notification.title, notification, 15000); + } + + function onLibraryChanged(data, apiClient) { + + var newItems = data.ItemsAdded; + + if (!newItems.length || !window.Notification || Notification.permission !== "granted") { + return; + } + + if (playbackManager.isPlayingVideo()) { + return; + } + + apiClient.getItems(apiClient.getCurrentUserId(), { + + Recursive: true, + Limit: 3, + IsFolder: false, + SortBy: "DateCreated", + SortOrder: "Descending", + ImageTypes: "Primary", + Ids: newItems.join(',') + + }).then(function (result) { + + var items = result.Items; + + for (var i = 0, length = items.length ; i < length; i++) { + + showNewItemNotification(items[i], apiClient); + } + }); + } + + function getIconUrl(name) { + return require.toUrl('.').split('?')[0] + '/' + name; + } + + function showPackageInstallNotification(apiClient, installation, status) { + + apiClient.getCurrentUser().then(function (user) { + + if (!user.Policy.IsAdministrator) { + return; + } + + var notification = { + tag: "install" + installation.Id, + data: {}, + icon: getIconUrl('/notificationicon.png') + }; + + if (status == 'completed') { + notification.title = globalize.translate('LabelPackageInstallCompleted').replace('{0}', installation.Name + ' ' + installation.Version); + notification.vibrate = true; + } + else if (status == 'cancelled') { + notification.title = globalize.translate('LabelPackageInstallCancelled').replace('{0}', installation.Name + ' ' + installation.Version); + } + else if (status == 'failed') { + notification.title = globalize.translate('LabelPackageInstallFailed').replace('{0}', installation.Name + ' ' + installation.Version); + notification.vibrate = true; + } + else if (status == 'progress') { + notification.title = globalize.translate('LabelInstallingPackage').replace('{0}', installation.Name + ' ' + installation.Version); + + notification.actions = + [ + { action: 'cancel', title: globalize.translate('ButtonCancel')/*, icon: 'https://example/like.png'*/ } + ]; + } + + if (status == 'progress') { + + var percentComplete = Math.round(installation.PercentComplete || 0); + + notification.body = percentComplete + '% complete.'; + } + + var timeout = status == 'cancelled' ? 5000 : 0; + + show(notification.title, notification, timeout); + }); + } + + events.on(serverNotifications, 'LibraryChanged', function (e, apiClient, data) { + onLibraryChanged(data, apiClient); + }); + + events.on(serverNotifications, 'PackageInstallationCompleted', function (e, apiClient, data) { + showPackageInstallNotification(apiClient, data, "completed"); + }); + + events.on(serverNotifications, 'PackageInstallationFailed', function (e, apiClient, data) { + showPackageInstallNotification(apiClient, data, "failed"); + }); + + events.on(serverNotifications, 'PackageInstallationCancelled', function (e, apiClient, data) { + showPackageInstallNotification(apiClient, data, "cancelled"); + }); + + events.on(serverNotifications, 'PackageInstalling', function (e, apiClient, data) { + showPackageInstallNotification(apiClient, data, "progress"); + }); + +}); \ No newline at end of file diff --git a/dashboard-ui/bower_components/emby-webcomponents/servernotifications.js b/dashboard-ui/bower_components/emby-webcomponents/servernotifications.js index d150a21fac..0bf4b2a3df 100644 --- a/dashboard-ui/bower_components/emby-webcomponents/servernotifications.js +++ b/dashboard-ui/bower_components/emby-webcomponents/servernotifications.js @@ -6,18 +6,7 @@ define(['connectionManager', 'events'], function (connectionManager, events) { var apiClient = this; - if (msg.MessageType === "LibraryChanged") { - } - else if (msg.MessageType === "ServerShuttingDown") { - events.trigger(serverNotifications, 'ServerShuttingDown', [apiClient]); - } - else if (msg.MessageType === "ServerRestarting") { - events.trigger(serverNotifications, 'ServerRestarting', [apiClient]); - } - else if (msg.MessageType === "RestartRequired") { - events.trigger(serverNotifications, 'RestartRequired', [apiClient]); - } - else if (msg.MessageType === "UserDataChanged") { + if (msg.MessageType === "UserDataChanged") { if (msg.Data.UserId == apiClient.getCurrentUserId()) { @@ -26,7 +15,7 @@ define(['connectionManager', 'events'], function (connectionManager, events) { } } } - else if (msg.MessageType === "TimerCreated" || msg.MessageType === "SeriesTimerCreated" || msg.MessageType === "TimerCancelled" || msg.MessageType === "SeriesTimerCancelled") { + else { events.trigger(serverNotifications, msg.MessageType, [apiClient, msg.Data]); } @@ -38,10 +27,10 @@ define(['connectionManager', 'events'], function (connectionManager, events) { events.on(apiClient, "websocketmessage", onWebSocketMessageReceived); } - //var current = connectionManager.currentApiClient(); - //if (current) { - // bindEvents(current); - //} + var current = connectionManager.currentApiClient(); + if (current) { + bindEvents(current); + } events.on(connectionManager, 'apiclientcreated', function (e, newApiClient) { diff --git a/dashboard-ui/bower_components/iron-location/.bower.json b/dashboard-ui/bower_components/iron-location/.bower.json index 33aead2456..201a62c6ca 100644 --- a/dashboard-ui/bower_components/iron-location/.bower.json +++ b/dashboard-ui/bower_components/iron-location/.bower.json @@ -1,6 +1,6 @@ { "name": "iron-location", - "version": "0.8.5", + "version": "0.8.6", "description": "Bidirectional data binding into the page's URL.", "private": true, "authors": [ @@ -37,11 +37,11 @@ "webcomponentsjs": "webcomponents/webcomponentsjs#^0.7.0", "iron-demo-helpers": "PolymerElements/iron-demo-helpers#^1.2.3" }, - "_release": "0.8.5", + "_release": "0.8.6", "_resolution": { "type": "version", - "tag": "v0.8.5", - "commit": "d7c5a9c991bf5e94094c16e94eb34e2eb30db4b0" + "tag": "0.8.6", + "commit": "8f628b3477fcba70da47d75e521a8afe8f12e4f7" }, "_source": "git://github.com/PolymerElements/iron-location.git", "_target": "^0.8.0", diff --git a/dashboard-ui/bower_components/iron-location/.travis.yml b/dashboard-ui/bower_components/iron-location/.travis.yml index fd5d0d0d5e..e62cd8a376 100644 --- a/dashboard-ui/bower_components/iron-location/.travis.yml +++ b/dashboard-ui/bower_components/iron-location/.travis.yml @@ -5,19 +5,19 @@ addons: firefox: '46.0' apt: sources: - - google-chrome + - google-chrome packages: - - google-chrome-stable + - google-chrome-stable sauce_connect: true before_script: - - npm install -g bower polylint web-component-tester - - bower install - - polylint +- npm install -g bower polylint web-component-tester +- bower install +- polylint script: - - xvfb-run wct - - "if [ \"${TRAVIS_PULL_REQUEST}\" = \"false\" ]; then wct -s 'default'; fi" +- xvfb-run wct +- if [ "${TRAVIS_PULL_REQUEST}" = "false" ]; then wct -s 'default'; fi env: global: - - secure: GQ+cUlta7BWa8Gq4YXrBStPzwRpHT2QG79T4pbDTz2Zs1RvT0GYQaEUksPQnsNCwnTF8ondXhUfMxHcC/r8p7YTCt2hSJSsKkx0lMertsjbKW38ZG28liaAN8msYGb9hnTs4qxhpVEX1pZtOI13RKBU85dw+jKbtxKDX/jVrMn42XCMhEmTeLxM4z8dW5nBu6LW6F3nwABQIUfdc/3OeIYG+2n+84zkXIsX1BFeejq28E6fYJAoMJgqfugLPgPu4IEVCWZJwYl2SgdXwxAcJ2auPph5GJ3DLd0fRRD1TZ94/u0A+eJcQ0OPiPu8hLpQNXOkCgAnO5jkpTCDERNQnB4nY8VfZeZdf1RLAB4VmxzOAbJwJcn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Ct6I50BINOLgjsfzCmnvv12g3FuRry2EBRxEultvPLRCNc2bJCPqol6kiWzs8ySOPXCYOcXqW5/6Z4DYLMTYevapkJZhErcTBuIH7rXEX4tGsdBjtGjTepcW7k2dsCElrul79czZA3AwdLEK/fuygxXR8eMCeS8Tdh4+Ba4M9TfXtAjjnR30NayTOCwyWW9IvTJeWeXKd6SilJcGVO7r546ayGWJ2G+Fltyi7RGixMplRMm8y6YfeM9k= dist: trusty diff --git a/dashboard-ui/bower_components/iron-location/bower.json b/dashboard-ui/bower_components/iron-location/bower.json index dd66b1474a..7e96f17533 100644 --- a/dashboard-ui/bower_components/iron-location/bower.json +++ b/dashboard-ui/bower_components/iron-location/bower.json @@ -1,6 +1,6 @@ { "name": "iron-location", - "version": "0.8.5", + "version": "0.8.6", "description": "Bidirectional data binding into the page's URL.", "private": true, "authors": [ diff --git a/dashboard-ui/bower_components/iron-location/iron-location.html b/dashboard-ui/bower_components/iron-location/iron-location.html index e80c0b0152..a13b070905 100644 --- a/dashboard-ui/bower_components/iron-location/iron-location.html +++ b/dashboard-ui/bower_components/iron-location/iron-location.html @@ -50,281 +50,287 @@ milliseconds. --> diff --git a/dashboard-ui/bower_components/iron-location/test/iron-location.html b/dashboard-ui/bower_components/iron-location/test/iron-location.html index c4fd4ee602..dc8c004430 100644 --- a/dashboard-ui/bower_components/iron-location/test/iron-location.html +++ b/dashboard-ui/bower_components/iron-location/test/iron-location.html @@ -19,8 +19,30 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN + + + +