1
0
Fork 0
mirror of https://github.com/jellyfin/jellyfin-web synced 2025-03-30 19:56:21 +00:00

update behavior with restricted transcoding access

This commit is contained in:
Luke Pulverenti 2016-07-25 01:12:38 -04:00
parent c3875ebe73
commit 8d4a41bd7d
7 changed files with 2 additions and 191 deletions

View file

@ -1,4 +1,4 @@
define(['isMobile'], function (isMobile) {
define([], function () {
function isTv() {
@ -128,7 +128,7 @@
browser.tv = true;
}
if (isMobile.any) {
if (userAgent.toLowerCase().indexOf("mobi") != -1) {
browser.mobile = true;
}

View file

@ -1,22 +0,0 @@
{
"name": "isMobile",
"version": "0.3.9",
"main": "isMobile.js",
"ignore": [
"**/.*",
"CONTRIBUTORS.md",
"Gruntfile.js",
"tests"
],
"homepage": "https://github.com/kaimallea/isMobile",
"_release": "0.3.9",
"_resolution": {
"type": "version",
"tag": "0.3.9",
"commit": "84c93a48e09506267241f9f33fd3ae97743f52db"
},
"_source": "git://github.com/kaimallea/isMobile.git",
"_target": "~0.3.9",
"_originalSource": "isMobile",
"_direct": true
}

View file

@ -1,11 +0,0 @@
{
"name": "isMobile",
"version": "0.3.9",
"main": "isMobile.js",
"ignore": [
"**/.*",
"CONTRIBUTORS.md",
"Gruntfile.js",
"tests"
]
}

View file

@ -1,126 +0,0 @@
/**
* isMobile.js v0.3.9
*
* A simple library to detect Apple phones and tablets,
* Android phones and tablets, other mobile devices (like blackberry, mini-opera and windows phone),
* and any kind of seven inch device, via user agent sniffing.
*
* @author: Kai Mallea (kmallea@gmail.com)
*
* @license: http://creativecommons.org/publicdomain/zero/1.0/
*/
(function (global) {
var apple_phone = /iPhone/i,
apple_ipod = /iPod/i,
apple_tablet = /iPad/i,
android_phone = /(?=.*\bAndroid\b)(?=.*\bMobile\b)/i, // Match 'Android' AND 'Mobile'
android_tablet = /Android/i,
amazon_phone = /(?=.*\bAndroid\b)(?=.*\bSD4930UR\b)/i,
amazon_tablet = /(?=.*\bAndroid\b)(?=.*\b(?:KFOT|KFTT|KFJWI|KFJWA|KFSOWI|KFTHWI|KFTHWA|KFAPWI|KFAPWA|KFARWI|KFASWI|KFSAWI|KFSAWA)\b)/i,
windows_phone = /IEMobile/i,
windows_tablet = /(?=.*\bWindows\b)(?=.*\bARM\b)/i, // Match 'Windows' AND 'ARM'
other_blackberry = /BlackBerry/i,
other_blackberry_10 = /BB10/i,
other_opera = /Opera Mini/i,
other_chrome = /(CriOS|Chrome)(?=.*\bMobile\b)/i,
other_firefox = /(?=.*\bFirefox\b)(?=.*\bMobile\b)/i, // Match 'Firefox' AND 'Mobile'
seven_inch = new RegExp(
'(?:' + // Non-capturing group
'Nexus 7' + // Nexus 7
'|' + // OR
'BNTV250' + // B&N Nook Tablet 7 inch
'|' + // OR
'Kindle Fire' + // Kindle Fire
'|' + // OR
'Silk' + // Kindle Fire, Silk Accelerated
'|' + // OR
'GT-P1000' + // Galaxy Tab 7 inch
')', // End non-capturing group
'i'); // Case-insensitive matching
var match = function(regex, userAgent) {
return regex.test(userAgent);
};
var IsMobileClass = function(userAgent) {
var ua = userAgent || navigator.userAgent;
// Facebook mobile app's integrated browser adds a bunch of strings that
// match everything. Strip it out if it exists.
var tmp = ua.split('[FBAN');
if (typeof tmp[1] !== 'undefined') {
ua = tmp[0];
}
this.apple = {
phone: match(apple_phone, ua),
ipod: match(apple_ipod, ua),
tablet: !match(apple_phone, ua) && match(apple_tablet, ua),
device: match(apple_phone, ua) || match(apple_ipod, ua) || match(apple_tablet, ua)
};
this.amazon = {
phone: match(amazon_phone, ua),
tablet: !match(amazon_phone, ua) && match(amazon_tablet, ua),
device: match(amazon_phone, ua) || match(amazon_tablet, ua)
};
this.android = {
phone: match(amazon_phone, ua) || match(android_phone, ua),
tablet: !match(amazon_phone, ua) && !match(android_phone, ua) && (match(amazon_tablet, ua) || match(android_tablet, ua)),
device: match(amazon_phone, ua) || match(amazon_tablet, ua) || match(android_phone, ua) || match(android_tablet, ua)
};
this.windows = {
phone: match(windows_phone, ua),
tablet: match(windows_tablet, ua),
device: match(windows_phone, ua) || match(windows_tablet, ua)
};
this.other = {
blackberry: match(other_blackberry, ua),
blackberry10: match(other_blackberry_10, ua),
opera: match(other_opera, ua),
firefox: match(other_firefox, ua),
chrome: match(other_chrome, ua),
device: match(other_blackberry, ua) || match(other_blackberry_10, ua) || match(other_opera, ua) || match(other_firefox, ua) || match(other_chrome, ua)
};
this.seven_inch = match(seven_inch, ua);
this.any = this.apple.device || this.android.device || this.windows.device || this.other.device || this.seven_inch;
// excludes 'other' devices and ipods, targeting touchscreen phones
this.phone = this.apple.phone || this.android.phone || this.windows.phone;
// excludes 7 inch devices, classifying as phone or tablet is left to the user
this.tablet = this.apple.tablet || this.android.tablet || this.windows.tablet;
if (typeof window === 'undefined') {
return this;
}
};
var instantiate = function() {
var IM = new IsMobileClass();
IM.Class = IsMobileClass;
return IM;
};
if (typeof module != 'undefined' && module.exports && typeof window === 'undefined') {
//node
module.exports = IsMobileClass;
} else if (typeof module != 'undefined' && module.exports && typeof window !== 'undefined') {
//browserify
module.exports = instantiate();
} else if (typeof define === 'function' && define.amd) {
//AMD
define('isMobile', [], global.isMobile = instantiate());
} else {
global.isMobile = instantiate();
}
})(this);

View file

@ -1 +0,0 @@
!function(a){var b=/iPhone/i,c=/iPod/i,d=/iPad/i,e=/(?=.*\bAndroid\b)(?=.*\bMobile\b)/i,f=/Android/i,g=/(?=.*\bAndroid\b)(?=.*\bSD4930UR\b)/i,h=/(?=.*\bAndroid\b)(?=.*\b(?:KFOT|KFTT|KFJWI|KFJWA|KFSOWI|KFTHWI|KFTHWA|KFAPWI|KFAPWA|KFARWI|KFASWI|KFSAWI|KFSAWA)\b)/i,i=/IEMobile/i,j=/(?=.*\bWindows\b)(?=.*\bARM\b)/i,k=/BlackBerry/i,l=/BB10/i,m=/Opera Mini/i,n=/(CriOS|Chrome)(?=.*\bMobile\b)/i,o=/(?=.*\bFirefox\b)(?=.*\bMobile\b)/i,p=new RegExp("(?:Nexus 7|BNTV250|Kindle Fire|Silk|GT-P1000)","i"),q=function(a,b){return a.test(b)},r=function(a){var r=a||navigator.userAgent,s=r.split("[FBAN");return"undefined"!=typeof s[1]&&(r=s[0]),this.apple={phone:q(b,r),ipod:q(c,r),tablet:!q(b,r)&&q(d,r),device:q(b,r)||q(c,r)||q(d,r)},this.amazon={phone:q(g,r),tablet:!q(g,r)&&q(h,r),device:q(g,r)||q(h,r)},this.android={phone:q(g,r)||q(e,r),tablet:!q(g,r)&&!q(e,r)&&(q(h,r)||q(f,r)),device:q(g,r)||q(h,r)||q(e,r)||q(f,r)},this.windows={phone:q(i,r),tablet:q(j,r),device:q(i,r)||q(j,r)},this.other={blackberry:q(k,r),blackberry10:q(l,r),opera:q(m,r),firefox:q(o,r),chrome:q(n,r),device:q(k,r)||q(l,r)||q(m,r)||q(o,r)||q(n,r)},this.seven_inch=q(p,r),this.any=this.apple.device||this.android.device||this.windows.device||this.other.device||this.seven_inch,this.phone=this.apple.phone||this.android.phone||this.windows.phone,this.tablet=this.apple.tablet||this.android.tablet||this.windows.tablet,"undefined"==typeof window?this:void 0},s=function(){var a=new r;return a.Class=r,a};"undefined"!=typeof module&&module.exports&&"undefined"==typeof window?module.exports=r:"undefined"!=typeof module&&module.exports&&"undefined"!=typeof window?module.exports=s():"function"==typeof define&&define.amd?define("isMobile",[],a.isMobile=s()):a.isMobile=s()}(this);

View file

@ -1,28 +0,0 @@
{
"name": "ismobilejs",
"version": "0.3.9",
"description": "A simple JS library that detects mobile devices.",
"keywords": [
"ismobile",
"device detection",
"mobile devices",
"useragent"
],
"homepage": "https://github.com/kaimallea/isMobile",
"license": "CC0-1.0",
"author": {
"name": "Kai Mallea",
"email": "kmallea@gmail.com"
},
"repository": {
"type": "git",
"url": "https://github.com/kaimallea/isMobile.git"
},
"main": "./isMobile",
"devDependencies": {
"grunt": "0.4.x",
"grunt-contrib-jshint": "0.11.x",
"grunt-contrib-uglify": "0.9.x",
"grunt-contrib-jasmine": "0.8.x"
}
}

View file

@ -205,7 +205,6 @@
var alphaPickerElement = tabContent.querySelector('.alphaPicker');
alphaPickerElement.addEventListener('alphavaluechanged', function (e) {
var newValue = e.detail.value;
alert(newValue);
var query = getQuery(tabContent);
query.NameStartsWithOrGreater = newValue;
query.StartIndex = 0;