mirror of
https://github.com/faisalman/ua-parser-js.git
synced 2025-11-16 23:21:52 +03:00
Merge pull request #41 from radiocicletta/master
Added Audio players and crawlers/bots
This commit is contained in:
125
src/ua-parser.js
125
src/ua-parser.js
@@ -28,7 +28,8 @@
|
||||
ARCHITECTURE= 'architecture',
|
||||
CONSOLE = 'console',
|
||||
MOBILE = 'mobile',
|
||||
TABLET = 'tablet';
|
||||
TABLET = 'tablet',
|
||||
SMARTTV = 'smarttv';
|
||||
|
||||
|
||||
///////////
|
||||
@@ -278,7 +279,109 @@
|
||||
/(gobrowser)\/?((\d+)?[\w\.]+)*/i, // GoBrowser
|
||||
/(ice\s?browser)\/v?((\d+)?[\w\._]+)/i, // ICE Browser
|
||||
/(mosaic)[\/\s]((\d+)?[\w\.]+)/i // Mosaic
|
||||
], [NAME, VERSION, MAJOR]
|
||||
], [NAME, VERSION, MAJOR], [
|
||||
|
||||
/(apple(?:coremedia|))\/((\d+)[\w\._]+)/i, // Generic Apple CoreMedia
|
||||
/(coremedia) v((\d+)[\w\._]+)/i
|
||||
], [NAME, VERSION, MAJOR], [
|
||||
|
||||
/(aqualung|lyssna|bsplayer)\/([\w\.-]+)/i // Aqualung/Lyssna/BSPlayer
|
||||
], [NAME, VERSION], [
|
||||
|
||||
/(ares|ossproxy)\s((\d+)[\w\.-]+)/i // Ares/OSSProxy
|
||||
], [NAME, VERSION, MAJOR], [
|
||||
|
||||
/(audacious|audimusicstream|amarok|bass|core|dalvik|gnomemplayer|music on console|nsplayer|psp-internetradioplayer|videos)\/((\d+)[\w\.-]+)/i,
|
||||
// Audacious/AudiMusicStream/Amarok/BASS/OpenCORE/Dalvik/GnomeMplayer/MoC
|
||||
// NSPlayer/PSP-InternetRadioPlayer/Videos
|
||||
/(clementine|music player daemon)\s((\d+)[\w\.-]+)/i, // Clementine/MPD
|
||||
/(lg player|nexplayer)\s((\d+)[\d\.]+)/i,
|
||||
/player\/(nexplayer|lg player)\s((\d+)[\w\.-]+)/i // NexPlayer/LG Player
|
||||
], [NAME, VERSION, MAJOR], [
|
||||
/(nexplayer)\s((\d+)[\w\.-]+)/i // Nexplayer
|
||||
], [NAME, VERSION, MAJOR], [
|
||||
|
||||
/(flrp)\/((\d+)[\w\.-]+)/i // Flip Player
|
||||
], [[NAME, 'Flip Player'], VERSION, MAJOR], [
|
||||
|
||||
/(fstream|nativehost|queryseekspider|ia-archiver|facebookexternalhit)/i
|
||||
// FStream/NativeHost/QuerySeekSpider/IA Archiver/facebookexternalhit
|
||||
], [NAME], [
|
||||
|
||||
/(gstreamer) souphttpsrc (?:\([^\)]+\)){0,1} libsoup\/((\d+)[\w\.-]+)/i
|
||||
// Gstreamer
|
||||
], [NAME, VERSION, MAJOR], [
|
||||
|
||||
/(htc streaming player)\s[\w_]+\s\/\s((\d+)[\d\.]+)/i, // HTC Streaming Player
|
||||
/(java|python-urllib|python-requests|wget|libcurl)\/((\d+)[\w\.-_]+)/i,
|
||||
// Java/urllib/requests/wget/cURL
|
||||
/(lavf)((\d+)[\d\.]+)/i // Lavf (FFMPEG)
|
||||
], [NAME, VERSION, MAJOR], [
|
||||
|
||||
/(htc_one_s)\/((\d+)[\d\.]+)/i, // HTC One S
|
||||
], [[NAME, /_/g, ' '], VERSION, MAJOR], [
|
||||
|
||||
/(mplayer)(?:\s|\/)(?:(?:sherpya-){0,1}svn)(?:-|\s)(r\d+(?:-\d+[\w\.-]+){0,1})/i,
|
||||
// MPlayer SVN
|
||||
], [NAME, VERSION], [
|
||||
|
||||
/(mplayer)(?:\s|\/)((\d+)[\w\.-]+)/i, // MPlayer
|
||||
/(mplayer) unknown-((\d+)[\w\.\-]+)/i // MPlayer UNKNOWN
|
||||
], [NAME, VERSION, MAJOR], [
|
||||
|
||||
/(mplayer)/i, // MPlayer (no other info)
|
||||
/(yourmuze)/i, // YourMuze
|
||||
/(media player classic|nero showtime)/i // Media Player Classic/Nero ShowTime
|
||||
], [NAME], [
|
||||
|
||||
/(nero (?:home|scout))\/((\d+)[\w\.-]+)/i // Nero Home/Nero Scout
|
||||
], [NAME, VERSION, MAJOR], [
|
||||
|
||||
/(nokia\d+)\/((\d+)[\w\.-]+)/i // Nokia
|
||||
], [NAME, VERSION, MAJOR], [
|
||||
|
||||
/\s(songbird)\/((\d+)[\w\.-]+)/i // Songbird/Philips-Songbird
|
||||
], [NAME, VERSION, MAJOR], [
|
||||
|
||||
/(winamp)3 version ((\d+)[\w\.-]+)/i, // Winamp
|
||||
/(winamp)\s((\d+)[\w\.-]+)/i,
|
||||
/(winamp)mpeg\/((\d+)[\w\.-]+)/i
|
||||
], [NAME, VERSION, MAJOR], [
|
||||
|
||||
/(ocms-bot|tapinradio|tunein radio|unknown|winamp|inlight radio)/i // OCMS-bot/tap in radio/tunein/unknown/winamp (no other info)
|
||||
// inlight radio
|
||||
], [NAME], [
|
||||
|
||||
/(quicktime|rma|radioapp|radioclientapplication|soundtap|totem|stagefright|streamium)\/((\d+)[\w\.-]+)/i
|
||||
// QuickTime/RealMedia/RadioApp/RadioClientApplication/
|
||||
// SoundTap/Totem/Stagefright/Streamium
|
||||
], [NAME, VERSION, MAJOR], [
|
||||
|
||||
/(smp)((\d+)[\d\.]+)/i // SMP
|
||||
], [NAME, VERSION, MAJOR], [
|
||||
|
||||
/(vlc) media player - version ((\d+)[\w\.]+)/i, // VLC Videolan
|
||||
/(vlc)\/((\d+)[\w\.-]+)/i,
|
||||
/(xbmc|gvfs|xine|xmms|irapp)\/((\d+)[\w\.-]+)/i, // XBMC/gvfs/Xine/XMMS/irapp
|
||||
/(foobar2000)\/((\d+)[\d\.]+)/i, // Foobar2000
|
||||
/(itunes)\/((\d+)[\d\.]+)/i // iTunes
|
||||
], [NAME, VERSION, MAJOR], [
|
||||
|
||||
/(wmplayer)\/((\d+)[\w\.-]+)/i, // Windows Media Player
|
||||
/(windows-media-player)\/((\d+)[\w\.-]+)/i
|
||||
], [[NAME, /-/g, ' '], VERSION, MAJOR], [
|
||||
|
||||
/windows\/((\d+)[\w\.-]+) upnp\/[\d\.]+ dlnadoc\/[\d\.]+ (home media server)/i,
|
||||
// Windows Media Server
|
||||
], [VERSION, MAJOR, [NAME, 'Windows']], [
|
||||
|
||||
/(com\.riseupradioalarm)\/((\d+)[\d\.]*)/i // RiseUP Radio Alarm
|
||||
], [NAME, VERSION, MAJOR], [
|
||||
|
||||
/(rad.io)\s((\d+)[\d\.]+)/i, // Rad.io
|
||||
/(radio.(?:de|at|fr))\s((\d+)[\d\.]+)/i
|
||||
], [[NAME, 'rad.io'], VERSION, MAJOR]
|
||||
|
||||
],
|
||||
|
||||
cpu : [[
|
||||
@@ -286,6 +389,9 @@
|
||||
/(?:(amd|x(?:(?:86|64)[_-])?|wow|win)64)[;\)]/i // AMD64
|
||||
], [[ARCHITECTURE, 'amd64']], [
|
||||
|
||||
/(ia32(?=;))/i // IA32 (quicktime)
|
||||
], [[ARCHITECTURE, util.lowerize]], [
|
||||
|
||||
/((?:i[346]|x)86)[;\)]/i // IA32
|
||||
], [[ARCHITECTURE, 'ia32']], [
|
||||
|
||||
@@ -309,14 +415,22 @@
|
||||
/\((ipad|playbook);[\w\s\);-]+(rim|apple)/i // iPad/PlayBook
|
||||
], [MODEL, VENDOR, [TYPE, TABLET]], [
|
||||
|
||||
/applecoremedia\/[\w\.]+ \((ipad)/ // iPad
|
||||
], [MODEL, [VENDOR, 'Apple'], [TYPE, TABLET]], [
|
||||
|
||||
/(apple\s{0,1}tv)/i // Apple TV
|
||||
], [[MODEL, 'Apple TV'], [VENDOR, 'Apple']], [
|
||||
|
||||
/(hp).+(touchpad)/i, // HP TouchPad
|
||||
/(kindle)\/([\w\.]+)/i, // Kindle
|
||||
/\s(nook)[\w\s]+build\/(\w+)/i, // Nook
|
||||
/(dell)\s(strea[kpr\s\d]*[\dko])/i // Dell Streak
|
||||
], [VENDOR, MODEL, [TYPE, TABLET]], [
|
||||
|
||||
/\((ip[honed|\s\w*]+);.+(apple)/i // iPod/iPhone
|
||||
/\((ip[honed|\s\w*]+);.+(apple)/i // iPod/iPhone
|
||||
], [MODEL, VENDOR, [TYPE, MOBILE]], [
|
||||
/\((ip[honed|\s\w*]+);/i // iPod/iPhone
|
||||
], [MODEL, [VENDOR, 'Apple'], [TYPE, MOBILE]], [
|
||||
|
||||
/(blackberry)[\s-]?(\w+)/i, // BlackBerry
|
||||
/(blackberry|benq|palm(?=\-)|sonyericsson|acer|asus|dell|huawei|meizu|motorola)[\s_-]?([\w-]+)*/i,
|
||||
@@ -380,6 +494,9 @@
|
||||
/android.+((ideatab[a-z0-9\-\s]+))/i // Lenovo
|
||||
], [[VENDOR, 'Lenovo'], MODEL, [TYPE, TABLET]], [
|
||||
|
||||
/(lg) netcast\.tv/i // LG SmartTV
|
||||
], [VENDOR, [TYPE, SMARTTV]], [
|
||||
|
||||
/(mobile|tablet);.+rv\:.+gecko\//i // Unidentifiable
|
||||
], [TYPE, VENDOR, MODEL]
|
||||
],
|
||||
@@ -399,6 +516,8 @@
|
||||
os : [[
|
||||
|
||||
// Windows based
|
||||
/microsoft\s(windows)\s(vista|xp)/i, // Windows (iTunes)
|
||||
], [NAME, VERSION], [
|
||||
/(windows)\snt\s6\.2;\s(arm)/i, // Windows RT
|
||||
/(windows\sphone(?:\sos)*|windows\smobile|windows)[\s\/]?([ntce\d\.\s]+\w)/i
|
||||
], [NAME, [VERSION, mapper.str, maps.os.windows.version]], [
|
||||
|
||||
2
src/ua-parser.min.js
vendored
2
src/ua-parser.min.js
vendored
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user