mirror of
https://github.com/faisalman/ua-parser-js.git
synced 2025-09-27 07:58:45 +03:00
[sub:extensions] Rearrange mediaplayer regexes
This commit is contained in:
parent
60cc84d58c
commit
c37f3863c0
@ -267,104 +267,48 @@ const InApps = Object.freeze({
|
|||||||
|
|
||||||
const MediaPlayers = Object.freeze({
|
const MediaPlayers = Object.freeze({
|
||||||
browser : [[
|
browser : [[
|
||||||
|
/(apple(?:coremedia|tv))\/([\w\._]+)/i, // Generic Apple CoreMedia
|
||||||
/(apple(?:coremedia|))\/([\w\._]+)/i, // Generic Apple CoreMedia
|
/(coremedia) v([\w\._]+)/i,
|
||||||
/(coremedia) v([\w\._]+)/i
|
// Ares/Nexplayer/OSSProxy
|
||||||
], [NAME, VERSION, [TYPE, MEDIAPLAYER]], [
|
/(ares|clementine|music player daemon|nexplayer|ossproxy) ([\w\.-]+)/i,
|
||||||
|
// Aqualung/Lyssna/BSPlayer/Clementine/MPD
|
||||||
/(aqualung|lyssna|bsplayer)\/([\w\.-]+)/i // Aqualung/Lyssna/BSPlayer
|
// Audacious/AudiMusicStream/Amarok/BASS/OpenCORE/GnomeMplayer/MoC
|
||||||
], [NAME, VERSION, [TYPE, MEDIAPLAYER]], [
|
|
||||||
|
|
||||||
/(ares|ossproxy)\s([\w\.-]+)/i // Ares/OSSProxy
|
|
||||||
], [NAME, VERSION, [TYPE, MEDIAPLAYER]], [
|
|
||||||
|
|
||||||
/(audacious|audimusicstream|amarok|bass|core|dalvik|gnomemplayer|music on console|nsplayer|psp-internetradioplayer|videos)\/([\w\.-]+)/i,
|
|
||||||
// Audacious/AudiMusicStream/Amarok/BASS/OpenCORE/Dalvik/GnomeMplayer/MoC
|
|
||||||
// NSPlayer/PSP-InternetRadioPlayer/Videos
|
// NSPlayer/PSP-InternetRadioPlayer/Videos
|
||||||
/(clementine|music player daemon)\s([\w\.-]+)/i, // Clementine/MPD
|
// Nero Home/Nero Scout/Nokia
|
||||||
/(lg player|nexplayer)\s([\d\.]+)/i,
|
// QuickTime/RealMedia/RadioApp/RadioClientApplication/
|
||||||
/player\/(nexplayer|lg player)\s([\w\.-]+)/i // NexPlayer/LG Player
|
// SoundTap/Totem/Stagefright/Streamium
|
||||||
], [NAME, VERSION, [TYPE, MEDIAPLAYER]], [
|
// XBMC/gvfs/Xine/XMMS/irapp
|
||||||
/(nexplayer)\s([\w\.-]+)/i // Nexplayer
|
/^(aqualung|audacious|audimusicstream|amarok|bass|bsplayer|core|gnomemplayer|gvfs|irapp|lyssna|music on console|nero (?:home|scout)|nokia\d+|nsplayer|psp-internetradioplayer|quicktime|rma|radioapp|radioclientapplication|soundtap|stagefright|streamium|totem|videos|xbmc|xine|xmms)\/([\w\.-]+)/i,
|
||||||
|
/(lg player|nexplayer) ([\d\.]+)/i,
|
||||||
|
/player\/(nexplayer|lg player) ([\w\.-]+)/i, // NexPlayer/LG Player
|
||||||
|
/(gstreamer) souphttpsrc.+libsoup\/([\w\.-]+)/i, // Gstreamer
|
||||||
|
/(htc streaming player) [\w_]+ \/ ([\d\.]+)/i, // HTC Streaming Player
|
||||||
|
/(lavf)([\d\.]+)/i, // Lavf (FFMPEG)
|
||||||
|
// MPlayer SVN
|
||||||
|
/(mplayer)(?: |\/)(?:(?:sherpya-){0,1}svn)(?:-| )(r\d+(?:-\d+[\w\.-]+))/i,
|
||||||
|
/ (songbird)\/([\w\.-]+)/i, // Songbird/Philips-Songbird
|
||||||
|
/(winamp)(?:3 version|mpeg| ) ([\w\.-]+)/i, // Winamp
|
||||||
|
/(vlc)(?:\/| media player - version )([\w\.-]+)/i, // VLC Videolan
|
||||||
|
/^(foobar2000|itunes|smp)\/([\d\.]+)/i, // Foobar2000/iTunes/SMP
|
||||||
|
/com\.(riseupradioalarm)\/([\d\.]*)/i, // RiseUP Radio Alarm
|
||||||
|
/(mplayer)(?:\s|\/| unknown-)([\w\.\-]+)/i, // MPlayer
|
||||||
|
// Windows Media Server
|
||||||
|
/(windows)\/([\w\.-]+) upnp\/[\d\.]+ dlnadoc\/[\d\.]+ home media server/i
|
||||||
], [NAME, VERSION, [TYPE, MEDIAPLAYER]], [
|
], [NAME, VERSION, [TYPE, MEDIAPLAYER]], [
|
||||||
|
|
||||||
/(flrp)\/([\w\.-]+)/i // Flip Player
|
/(flrp)\/([\w\.-]+)/i // Flip Player
|
||||||
], [[NAME, 'Flip Player'], VERSION, [TYPE, MEDIAPLAYER]], [
|
], [[NAME, 'Flip Player'], VERSION, [TYPE, MEDIAPLAYER]], [
|
||||||
|
|
||||||
/(fstream|nativehost|queryseekspider)/i
|
|
||||||
// FStream/NativeHost/QuerySeekSpider
|
// FStream/NativeHost/QuerySeekSpider
|
||||||
|
// MPlayer (no other info)/Media Player Classic/Nero ShowTime
|
||||||
|
// OCMS-bot/tap in radio/tunein/unknown/winamp (no other info)
|
||||||
|
// inlight radio / YourMuze
|
||||||
|
/(fstream|media player classic|inlight radio|mplayer|nativehost|nero showtime|ocms-bot|queryseekspider|tapinradio|tunein radio|winamp|yourmuze)/i
|
||||||
], [NAME, [TYPE, MEDIAPLAYER]], [
|
], [NAME, [TYPE, MEDIAPLAYER]], [
|
||||||
|
|
||||||
/(gstreamer) souphttpsrc.+libsoup\/([\w\.-]+)/i
|
/(htc_one_s|windows-media-player|wmplayer)\/([\w\.-]+)/i, // HTC One S / Windows Media Player
|
||||||
// Gstreamer
|
], [[NAME, /[_-]/g, ' '], VERSION, [TYPE, MEDIAPLAYER]], [
|
||||||
], [NAME, VERSION, [TYPE, MEDIAPLAYER]], [
|
|
||||||
|
|
||||||
/(htc streaming player)\s[\w_]+\s\/\s([\d\.]+)/i, // HTC Streaming Player
|
/(rad.io|radio.(?:de|at|fr)) ([\d\.]+)/i // Rad.io
|
||||||
/(lavf)([\d\.]+)/i // Lavf (FFMPEG)
|
|
||||||
], [NAME, VERSION, [TYPE, MEDIAPLAYER]], [
|
|
||||||
|
|
||||||
/(htc_one_s)\/([\d\.]+)/i, // HTC One S
|
|
||||||
], [[NAME, /_/g, ' '], VERSION, [TYPE, MEDIAPLAYER]], [
|
|
||||||
|
|
||||||
/(mplayer)(?:\s|\/)(?:(?:sherpya-){0,1}svn)(?:-|\s)(r\d+(?:-\d+[\w\.-]+))/i,
|
|
||||||
// MPlayer SVN
|
|
||||||
], [NAME, VERSION, [TYPE, MEDIAPLAYER]], [
|
|
||||||
|
|
||||||
/(mplayer)(?:\s|\/)([\w\.-]+)/i, // MPlayer
|
|
||||||
/(mplayer) unknown-([\w\.\-]+)/i // MPlayer UNKNOWN
|
|
||||||
], [NAME, VERSION, [TYPE, MEDIAPLAYER]], [
|
|
||||||
|
|
||||||
/(mplayer)/i, // MPlayer (no other info)
|
|
||||||
/(yourmuze)/i, // YourMuze
|
|
||||||
/(media player classic|nero showtime)/i // Media Player Classic/Nero ShowTime
|
|
||||||
], [NAME, [TYPE, MEDIAPLAYER]], [
|
|
||||||
|
|
||||||
/(nero (?:home|scout))\/([\w\.-]+)/i // Nero Home/Nero Scout
|
|
||||||
], [NAME, VERSION, [TYPE, MEDIAPLAYER]], [
|
|
||||||
|
|
||||||
/(nokia\d+)\/([\w\.-]+)/i // Nokia
|
|
||||||
], [NAME, VERSION, [TYPE, MEDIAPLAYER]], [
|
|
||||||
|
|
||||||
/\s(songbird)\/([\w\.-]+)/i // Songbird/Philips-Songbird
|
|
||||||
], [NAME, VERSION, [TYPE, MEDIAPLAYER]], [
|
|
||||||
|
|
||||||
/(winamp)3 version ([\w\.-]+)/i, // Winamp
|
|
||||||
/(winamp)\s([\w\.-]+)/i,
|
|
||||||
/(winamp)mpeg\/([\w\.-]+)/i
|
|
||||||
], [NAME, VERSION, [TYPE, MEDIAPLAYER]], [
|
|
||||||
|
|
||||||
/(ocms-bot|tapinradio|tunein radio|unknown|winamp|inlight radio)/i // OCMS-bot/tap in radio/tunein/unknown/winamp (no other info)
|
|
||||||
// inlight radio
|
|
||||||
], [NAME, [TYPE, MEDIAPLAYER]], [
|
|
||||||
|
|
||||||
/(quicktime|rma|radioapp|radioclientapplication|soundtap|totem|stagefright|streamium)\/([\w\.-]+)/i
|
|
||||||
// QuickTime/RealMedia/RadioApp/RadioClientApplication/
|
|
||||||
// SoundTap/Totem/Stagefright/Streamium
|
|
||||||
], [NAME, VERSION, [TYPE, MEDIAPLAYER]], [
|
|
||||||
|
|
||||||
/(smp)([\d\.]+)/i // SMP
|
|
||||||
], [NAME, VERSION, [TYPE, MEDIAPLAYER]], [
|
|
||||||
|
|
||||||
/(vlc) media player - version ([\w\.]+)/i, // VLC Videolan
|
|
||||||
/(vlc)\/([\w\.-]+)/i,
|
|
||||||
/(xbmc|gvfs|xine|xmms|irapp)\/([\w\.-]+)/i, // XBMC/gvfs/Xine/XMMS/irapp
|
|
||||||
/(foobar2000)\/([\d\.]+)/i, // Foobar2000
|
|
||||||
/(itunes)\/([\d\.]+)/i // iTunes
|
|
||||||
], [NAME, VERSION, [TYPE, MEDIAPLAYER]], [
|
|
||||||
|
|
||||||
/(wmplayer)\/([\w\.-]+)/i, // Windows Media Player
|
|
||||||
/(windows-media-player)\/([\w\.-]+)/i
|
|
||||||
], [[NAME, /-/g, ' '], VERSION, [TYPE, MEDIAPLAYER]], [
|
|
||||||
|
|
||||||
/windows\/([\w\.-]+) upnp\/[\d\.]+ dlnadoc\/[\d\.]+ (home media server)/i,
|
|
||||||
// Windows Media Server
|
|
||||||
], [VERSION, [NAME, 'Windows'], [TYPE, MEDIAPLAYER]], [
|
|
||||||
|
|
||||||
/(com\.riseupradioalarm)\/([\d\.]*)/i // RiseUP Radio Alarm
|
|
||||||
], [NAME, VERSION, [TYPE, MEDIAPLAYER]], [
|
|
||||||
|
|
||||||
/(rad.io)\s([\d\.]+)/i, // Rad.io
|
|
||||||
/(radio.(?:de|at|fr))\s([\d\.]+)/i
|
|
||||||
], [[NAME, 'rad.io'], VERSION, [TYPE, MEDIAPLAYER]]
|
], [[NAME, 'rad.io'], VERSION, [TYPE, MEDIAPLAYER]]
|
||||||
]
|
]
|
||||||
});
|
});
|
||||||
|
@ -24,9 +24,9 @@
|
|||||||
"ua" : "AppleTV/3.0.2 (Macintosh; Intel Mac OS X 10.4.7) AppleWebKit/528.18",
|
"ua" : "AppleTV/3.0.2 (Macintosh; Intel Mac OS X 10.4.7) AppleWebKit/528.18",
|
||||||
"expect" :
|
"expect" :
|
||||||
{
|
{
|
||||||
"name" : "WebKit",
|
"name" : "AppleTV",
|
||||||
"version" : "528.18",
|
"version" : "3.0.2",
|
||||||
"major" : "528"
|
"major" : "3"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@ -109,16 +109,6 @@
|
|||||||
"major" : "1"
|
"major" : "1"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
|
||||||
"desc" : "Dalvik",
|
|
||||||
"ua" : "Dalvik/1.2.0 (Linux; U; Android 2.2.1; GT-S5830L Build/FROYO)",
|
|
||||||
"expect" :
|
|
||||||
{
|
|
||||||
"name" : "Dalvik",
|
|
||||||
"version" : "1.2.0",
|
|
||||||
"major" : "1"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
"desc" : "NexPlayer",
|
"desc" : "NexPlayer",
|
||||||
"ua" : "E97510d/ Player/NexPlayer 4.0",
|
"ua" : "E97510d/ Player/NexPlayer 4.0",
|
||||||
@ -189,16 +179,6 @@
|
|||||||
"major" : "3"
|
"major" : "3"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
|
||||||
"desc" : "Java",
|
|
||||||
"ua" : "Java/1.4.1_04",
|
|
||||||
"expect" :
|
|
||||||
{
|
|
||||||
"name" : "Java",
|
|
||||||
"version" : "1.4.1_04",
|
|
||||||
"major" : "1"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
"desc" : "LG Player",
|
"desc" : "LG Player",
|
||||||
"ua" : "LG Player 1.0; Android",
|
"ua" : "LG Player 1.0; Android",
|
||||||
@ -509,16 +489,6 @@
|
|||||||
"major" : "3"
|
"major" : "3"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
|
||||||
"desc" : "Wget",
|
|
||||||
"ua" : "Wget/1.12 (darwin10.7.0)",
|
|
||||||
"expect" :
|
|
||||||
{
|
|
||||||
"name" : "Wget",
|
|
||||||
"version" : "1.12",
|
|
||||||
"major" : "1"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
"desc" : "Winamp",
|
"desc" : "Winamp",
|
||||||
"ua" : "Winamp 2.81",
|
"ua" : "Winamp 2.81",
|
||||||
|
Loading…
x
Reference in New Issue
Block a user