diff --git a/src/ua-parser.js b/src/ua-parser.js index 9d7fb53..37f3036 100644 --- a/src/ua-parser.js +++ b/src/ua-parser.js @@ -517,7 +517,7 @@ /android.+;\s(shield)\sbuild/i // Nvidia ], [MODEL, [VENDOR, 'Nvidia'], [TYPE, CONSOLE]], [ - /(playstation\s[3portablevi]+)/i // Playstation + /(playstation\s[34portablevi]+)/i // Playstation ], [MODEL, [VENDOR, 'Sony'], [TYPE, CONSOLE]], [ /(sprint\s(\w+))/i // Sprint Phones @@ -705,7 +705,7 @@ ], [[NAME, 'Firefox OS'], VERSION], [ // Console - /(nintendo|playstation)\s([wids3portablevu]+)/i, // Nintendo/Playstation + /(nintendo|playstation)\s([wids34portablevu]+)/i, // Nintendo/Playstation // GNU/Linux based /(mint)[\/\s\(]?(\w+)*/i, // Mint diff --git a/test/device-test.json b/test/device-test.json index 8959dbc..49bbc5c 100644 --- a/test/device-test.json +++ b/test/device-test.json @@ -248,5 +248,15 @@ "model" : "MI-ONE Plus", "type" : "mobile" } + }, + { + "desc" : "PlayStation 4", + "ua" : "Mozilla/5.0 (PlayStation 4 3.00) AppleWebKit/537.73 (KHTML, like Gecko)", + "expect" : + { + "vendor" : "Sony", + "model" : "PlayStation 4", + "type" : "console" + } } ] diff --git a/test/os-test.json b/test/os-test.json index 4ef53bf..cd26ced 100644 --- a/test/os-test.json +++ b/test/os-test.json @@ -251,6 +251,15 @@ "version" : "" } }, + { + "desc" : "PlayStation 4", + "ua" : "Mozilla/5.0 (PlayStation 4 3.00) AppleWebKit/537.73 (KHTML, like Gecko)", + "expect" : + { + "name" : "PlayStation", + "version" : "4" + } + }, { "desc" : "Mint", "ua" : "",