diff --git a/dashboard-ui/bower_components/emby-apiclient/.bower.json b/dashboard-ui/bower_components/emby-apiclient/.bower.json index 257ccdae1e..2a2e13e443 100644 --- a/dashboard-ui/bower_components/emby-apiclient/.bower.json +++ b/dashboard-ui/bower_components/emby-apiclient/.bower.json @@ -16,12 +16,12 @@ }, "devDependencies": {}, "ignore": [], - "version": "1.0.21", - "_release": "1.0.21", + "version": "1.0.24", + "_release": "1.0.24", "_resolution": { "type": "version", - "tag": "1.0.21", - "commit": "e341b097c05c31ec012e04dfbd0455ae9dfc4929" + "tag": "1.0.24", + "commit": "4b9b655cad98bd908e78352d5bbed028644505d4" }, "_source": "git://github.com/MediaBrowser/Emby.ApiClient.Javascript.git", "_target": "~1.0.3", diff --git a/dashboard-ui/bower_components/emby-apiclient/connectionmanager.js b/dashboard-ui/bower_components/emby-apiclient/connectionmanager.js index 7f2e84ecaf..efa177a53b 100644 --- a/dashboard-ui/bower_components/emby-apiclient/connectionmanager.js +++ b/dashboard-ui/bower_components/emby-apiclient/connectionmanager.js @@ -1123,7 +1123,7 @@ if (options.updateDateLastAccessed !== false) { server.DateLastAccessed = new Date().getTime(); - if (server.LastConnectionMode == ConnectionMode.Local) { + if (connectionMode == ConnectionMode.Local) { server.DateLastLocalConnection = new Date().getTime(); } } @@ -1466,6 +1466,17 @@ self.getRegistrationInfo = function (feature, apiClient) { + if (isConnectUserSupporter()) { + return new Promise(function (resolve, reject) { + + resolve({ + Name: feature, + IsRegistered: true, + IsTrial: false + }); + }); + } + return self.getAvailableServers().then(function (servers) { var matchedServers = servers.filter(function (s) { @@ -1498,6 +1509,19 @@ }); }; + function isConnectUserSupporter() { + + if (self.isLoggedIntoConnect()) { + + var connectUser = self.connectUser(); + + if (connectUser && connectUser.IsSupporter) { + return true; + } + } + return false; + } + function updateDateLastLocalConnection(serverId) { var credentials = credentialProvider.credentials(); diff --git a/dashboard-ui/bower_components/emby-webcomponents/.bower.json b/dashboard-ui/bower_components/emby-webcomponents/.bower.json index 3fb667849b..7bf42bfb1c 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.0.14", - "_release": "1.0.14", + "version": "1.0.16", + "_release": "1.0.16", "_resolution": { "type": "version", - "tag": "1.0.14", - "commit": "a7a8baf260ab509c5f9b1750cbf6fe921883141c" + "tag": "1.0.16", + "commit": "8058a1a93ad995fd3b7f56019719c33654698df6" }, "_source": "git://github.com/MediaBrowser/emby-webcomponents.git", "_target": "~1.0.0", diff --git a/dashboard-ui/bower_components/emby-webcomponents/browserdeviceprofile.js b/dashboard-ui/bower_components/emby-webcomponents/browserdeviceprofile.js index a7b6658b30..b85ea791f5 100644 --- a/dashboard-ui/bower_components/emby-webcomponents/browserdeviceprofile.js +++ b/dashboard-ui/bower_components/emby-webcomponents/browserdeviceprofile.js @@ -103,12 +103,23 @@ profile.DirectPlayProfiles = []; + var videoAudioCodecs = []; + if (canPlayMp3) { + videoAudioCodecs.push('mp3'); + } + if (canPlayAac) { + videoAudioCodecs.push('aac'); + } + if (canPlayAc3) { + videoAudioCodecs.push('ac3'); + } + if (supportedFormats.indexOf('h264') != -1) { profile.DirectPlayProfiles.push({ Container: 'mp4,m4v', Type: 'Video', VideoCodec: 'h264', - AudioCodec: 'aac' + (canPlayMp3 ? ',mp3' : '') + (canPlayAc3 ? ',ac3' : '') + AudioCodec: videoAudioCodecs.join(',') }); } @@ -117,7 +128,7 @@ Container: 'mkv,mov', Type: 'Video', VideoCodec: 'h264', - AudioCodec: 'aac' + (canPlayMp3 ? ',mp3' : '') + (canPlayAc3 ? ',ac3' : '') + AudioCodec: videoAudioCodecs.join(',') }); } @@ -268,24 +279,6 @@ ] }); - profile.CodecProfiles.push({ - Type: 'VideoAudio', - Codec: 'aac,mp3', - Conditions: [ - { - Condition: 'LessThanEqual', - Property: 'AudioChannels', - Value: videoAudioChannels - }, - { - Condition: 'Equals', - Property: 'IsSecondaryAudio', - Value: 'false', - IsRequired: 'false' - } - ] - }); - profile.CodecProfiles.push({ Type: 'VideoAudio', Conditions: [ diff --git a/dashboard-ui/bower_components/emby-webcomponents/visibleinviewport.js b/dashboard-ui/bower_components/emby-webcomponents/visibleinviewport.js new file mode 100644 index 0000000000..74202df5b0 --- /dev/null +++ b/dashboard-ui/bower_components/emby-webcomponents/visibleinviewport.js @@ -0,0 +1,34 @@ +define([], function () { + + /** + * Copyright 2012, Digital Fusion + * Licensed under the MIT license. + * http://teamdf.com/jquery-plugins/license/ + * + * @author Sam Sehnert + * @desc A small plugin that checks whether elements are within + * the user visible viewport of a web browser. + * only accounts for vertical position, not horizontal. + */ + function visibleInViewport(elem, partial, thresholdX, thresholdY) { + + thresholdX = thresholdX || 0; + thresholdY = thresholdY || 0; + + var vpWidth = window.innerWidth, + vpHeight = window.innerHeight; + + // Use this native browser method, if available. + var rec = elem.getBoundingClientRect(), + tViz = rec.top >= 0 && rec.top < vpHeight + thresholdY, + bViz = rec.bottom > 0 && rec.bottom <= vpHeight + thresholdY, + lViz = rec.left >= 0 && rec.left < vpWidth + thresholdX, + rViz = rec.right > 0 && rec.right <= vpWidth + thresholdX, + vVisible = partial ? tViz || bViz : tViz && bViz, + hVisible = partial ? lViz || rViz : lViz && rViz; + + return vVisible && hVisible; + } + + return visibleInViewport; +}); \ No newline at end of file diff --git a/dashboard-ui/bower_components/iron-a11y-keys-behavior/.bower.json b/dashboard-ui/bower_components/iron-a11y-keys-behavior/.bower.json index 9bc69e84d1..ce8190653a 100644 --- a/dashboard-ui/bower_components/iron-a11y-keys-behavior/.bower.json +++ b/dashboard-ui/bower_components/iron-a11y-keys-behavior/.bower.json @@ -1,6 +1,6 @@ { "name": "iron-a11y-keys-behavior", - "version": "1.1.0", + "version": "1.1.1", "description": "A behavior that enables keybindings for greater a11y.", "keywords": [ "web-components", @@ -31,11 +31,11 @@ }, "ignore": [], "homepage": "https://github.com/polymerelements/iron-a11y-keys-behavior", - "_release": "1.1.0", + "_release": "1.1.1", "_resolution": { "type": "version", - "tag": "v1.1.0", - "commit": "cd8c972278c0d916bef57209d7dce5b81e67687c" + "tag": "v1.1.1", + "commit": "12af7cb19b2c6b3887e37a5ea1501ffe676d1e8a" }, "_source": "git://github.com/polymerelements/iron-a11y-keys-behavior.git", "_target": "^1.0.0", diff --git a/dashboard-ui/bower_components/iron-a11y-keys-behavior/bower.json b/dashboard-ui/bower_components/iron-a11y-keys-behavior/bower.json index 961303bbef..11b6c5c663 100644 --- a/dashboard-ui/bower_components/iron-a11y-keys-behavior/bower.json +++ b/dashboard-ui/bower_components/iron-a11y-keys-behavior/bower.json @@ -1,6 +1,6 @@ { "name": "iron-a11y-keys-behavior", - "version": "1.1.0", + "version": "1.1.1", "description": "A behavior that enables keybindings for greater a11y.", "keywords": [ "web-components", diff --git a/dashboard-ui/bower_components/iron-a11y-keys-behavior/demo/x-key-aware.html b/dashboard-ui/bower_components/iron-a11y-keys-behavior/demo/x-key-aware.html index 8e5dc466ee..16b9b2a518 100644 --- a/dashboard-ui/bower_components/iron-a11y-keys-behavior/demo/x-key-aware.html +++ b/dashboard-ui/bower_components/iron-a11y-keys-behavior/demo/x-key-aware.html @@ -86,7 +86,8 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN keyBindings: { '* pageup pagedown left right down up home end space enter @ ~ " $ ? ! \\ + : # backspace': '_updatePressed', 'a': '_updatePressed', - 'shift+a alt+a': '_updatePressed' + 'shift+a alt+a': '_updatePressed', + 'shift+tab shift+space': '_updatePressed' }, _updatePressed: function(event) { diff --git a/dashboard-ui/bower_components/iron-a11y-keys-behavior/iron-a11y-keys-behavior.html b/dashboard-ui/bower_components/iron-a11y-keys-behavior/iron-a11y-keys-behavior.html index 3d656c1107..50331d9151 100644 --- a/dashboard-ui/bower_components/iron-a11y-keys-behavior/iron-a11y-keys-behavior.html +++ b/dashboard-ui/bower_components/iron-a11y-keys-behavior/iron-a11y-keys-behavior.html @@ -65,6 +65,15 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN 'meta': 'metaKey' }; + /** + * KeyboardEvent.key is mostly represented by printable character made by + * the keyboard, with unprintable keys labeled nicely. + * + * However, on OS X, Alt+char can make a Unicode character that follows an + * Apple-specific mapping. In this case, we fall back to .keyCode. + */ + var KEY_CHAR = /[a-z0-9*]/; + /** * Matches a keyIdentifier string. */ @@ -81,14 +90,22 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN */ var SPACE_KEY = /^space(bar)?/; - function transformKey(key) { + /** + * Transforms the key. + * @param {string} key The KeyBoardEvent.key + * @param {Boolean} [noSpecialChars] Limits the transformation to + * alpha-numeric characters. + */ + function transformKey(key, noSpecialChars) { var validKey = ''; if (key) { var lKey = key.toLowerCase(); if (lKey === ' ' || SPACE_KEY.test(lKey)) { validKey = 'space'; } else if (lKey.length == 1) { - validKey = lKey; + if (!noSpecialChars || KEY_CHAR.test(lKey)) { + validKey = lKey; + } } else if (ARROW_KEY.test(lKey)) { validKey = lKey.replace('arrow', ''); } else if (lKey == 'multiply') { @@ -139,17 +156,29 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN return validKey; } - function normalizedKeyForEvent(keyEvent) { - // fall back from .key, to .keyIdentifier, to .keyCode, and then to - // .detail.key to support artificial keyboard events - return transformKey(keyEvent.key) || + /** + * Calculates the normalized key for a KeyboardEvent. + * @param {KeyboardEvent} keyEvent + * @param {Boolean} [noSpecialChars] Set to true to limit keyEvent.key + * transformation to alpha-numeric chars. This is useful with key + * combinations like shift + 2, which on FF for MacOS produces + * keyEvent.key = @ + * To get 2 returned, set noSpecialChars = true + * To get @ returned, set noSpecialChars = false + */ + function normalizedKeyForEvent(keyEvent, noSpecialChars) { + // Fall back from .key, to .keyIdentifier, to .keyCode, and then to + // .detail.key to support artificial keyboard events. + return transformKey(keyEvent.key, noSpecialChars) || transformKeyIdentifier(keyEvent.keyIdentifier) || transformKeyCode(keyEvent.keyCode) || - transformKey(keyEvent.detail.key) || ''; + transformKey(keyEvent.detail.key, noSpecialChars) || ''; } - function keyComboMatchesEvent(keyCombo, event, eventKey) { - return eventKey === keyCombo.key && + function keyComboMatchesEvent(keyCombo, event) { + // For combos with modifiers we support only alpha-numeric keys + var keyEvent = normalizedKeyForEvent(event, keyCombo.hasModifiers); + return keyEvent === keyCombo.key && (!keyCombo.hasModifiers || ( !!event.shiftKey === !!keyCombo.shiftKey && !!event.ctrlKey === !!keyCombo.ctrlKey && @@ -286,9 +315,8 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN keyboardEventMatchesKeys: function(event, eventString) { var keyCombos = parseEventString(eventString); - var eventKey = normalizedKeyForEvent(event); for (var i = 0; i < keyCombos.length; ++i) { - if (keyComboMatchesEvent(keyCombos[i], event, eventKey)) { + if (keyComboMatchesEvent(keyCombos[i], event)) { return true; } } @@ -388,11 +416,10 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN return; } - var eventKey = normalizedKeyForEvent(event); for (var i = 0; i < keyBindings.length; i++) { var keyCombo = keyBindings[i][0]; var handlerName = keyBindings[i][1]; - if (keyComboMatchesEvent(keyCombo, event, eventKey)) { + if (keyComboMatchesEvent(keyCombo, event)) { this._triggerKeyHandler(keyCombo, handlerName, event); // exit the loop if eventDefault was prevented if (event.defaultPrevented) { diff --git a/dashboard-ui/bower_components/iron-a11y-keys-behavior/test/basic-test.html b/dashboard-ui/bower_components/iron-a11y-keys-behavior/test/basic-test.html index fc29597a21..1631ff4625 100644 --- a/dashboard-ui/bower_components/iron-a11y-keys-behavior/test/basic-test.html +++ b/dashboard-ui/bower_components/iron-a11y-keys-behavior/test/basic-test.html @@ -97,7 +97,8 @@ suite('Polymer.IronA11yKeysBehavior', function() { ], keyBindings: { - 'space': '_keyHandler' + 'space': '_keyHandler', + '@': '_keyHandler' } }); @@ -179,6 +180,13 @@ suite('Polymer.IronA11yKeysBehavior', function() { expect(keys.keyCount).to.be.equal(1); }); + test('handles special character @', function() { + var event = new CustomEvent('keydown'); + event.key = '@'; + keys.dispatchEvent(event); + expect(keys.keyCount).to.be.equal(1); + }); + test('do not trigger the handler for non-specified keys', function() { MockInteractions.pressEnter(keys); @@ -284,6 +292,19 @@ suite('Polymer.IronA11yKeysBehavior', function() { expect(keys.keyCount).to.be.equal(1); }); + test('check if KeyBoardEvent.key is alpha-numberic', function() { + var event = new CustomEvent('keydown'); + + event.ctrlKey = true; + event.shiftKey = true; + event.key = 'å'; + event.keyCode = event.code = 65; + + keys.dispatchEvent(event); + + expect(keys.keyCount).to.be.equal(1); + }); + test('trigger also bindings without modifiers', function() { var event = new CustomEvent('keydown'); // Combo `shift+enter`. @@ -305,6 +326,7 @@ suite('Polymer.IronA11yKeysBehavior', function() { expect(shiftEnterSpy.called).to.be.true; expect(enterSpy.calledAfter(shiftEnterSpy)).to.be.true; }); + }); suite('alternative event keys', function() { diff --git a/dashboard-ui/bower_components/iron-flex-layout/.bower.json b/dashboard-ui/bower_components/iron-flex-layout/.bower.json index 0985b733c6..846bf5c150 100644 --- a/dashboard-ui/bower_components/iron-flex-layout/.bower.json +++ b/dashboard-ui/bower_components/iron-flex-layout/.bower.json @@ -28,14 +28,14 @@ "iron-component-page": "polymerelements/iron-component-page#^1.0.0" }, "ignore": [], - "homepage": "https://github.com/PolymerElements/iron-flex-layout", + "homepage": "https://github.com/polymerelements/iron-flex-layout", "_release": "1.2.2", "_resolution": { "type": "version", "tag": "v1.2.2", "commit": "41c4f35be1368afb770312b907a258175565dbdf" }, - "_source": "git://github.com/PolymerElements/iron-flex-layout.git", + "_source": "git://github.com/polymerelements/iron-flex-layout.git", "_target": "^1.0.0", - "_originalSource": "PolymerElements/iron-flex-layout" + "_originalSource": "polymerelements/iron-flex-layout" } \ No newline at end of file diff --git a/dashboard-ui/bower_components/iron-icons/.bower.json b/dashboard-ui/bower_components/iron-icons/.bower.json index 6ac4cbc7f5..34ce317a74 100644 --- a/dashboard-ui/bower_components/iron-icons/.bower.json +++ b/dashboard-ui/bower_components/iron-icons/.bower.json @@ -1,6 +1,6 @@ { "name": "iron-icons", - "version": "1.1.0", + "version": "1.1.1", "description": "A set of icons for use with iron-icon", "authors": [ "The Polymer Authors" @@ -34,11 +34,11 @@ "util", "update-icons.sh" ], - "_release": "1.1.0", + "_release": "1.1.1", "_resolution": { "type": "version", - "tag": "v1.1.0", - "commit": "623d8dae77cd8658ce1f6834b30a4f3f6e2100ea" + "tag": "v1.1.1", + "commit": "77a8e0190d6c481d8b5df0495fa484928880ea53" }, "_source": "git://github.com/PolymerElements/iron-icons.git", "_target": "^1.0.0", diff --git a/dashboard-ui/bower_components/iron-icons/bower.json b/dashboard-ui/bower_components/iron-icons/bower.json index f408676a28..cd678f1a5e 100644 --- a/dashboard-ui/bower_components/iron-icons/bower.json +++ b/dashboard-ui/bower_components/iron-icons/bower.json @@ -1,6 +1,6 @@ { "name": "iron-icons", - "version": "1.1.0", + "version": "1.1.1", "description": "A set of icons for use with iron-icon", "authors": [ "The Polymer Authors" diff --git a/dashboard-ui/bower_components/iron-icons/demo/index.html b/dashboard-ui/bower_components/iron-icons/demo/index.html index 8e0df6ce17..acfbf36cc7 100644 --- a/dashboard-ui/bower_components/iron-icons/demo/index.html +++ b/dashboard-ui/bower_components/iron-icons/demo/index.html @@ -30,6 +30,7 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN + + +
+ + + + +