Implement PlayStation app WebMAF detection (#649)

* Add support for `WebMAF` detection on Playstation

* Extend `WebMAF` support for PlayStation 5

* Update changelog
This commit is contained in:
Andreas Kogler 2023-08-20 09:25:56 +02:00 committed by GitHub
parent 420bf1066c
commit 5948060729
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 22 additions and 0 deletions

View File

@ -4,6 +4,7 @@
- What's breaking: - What's breaking:
- Browser detection on mobile device: `"Chrome" => "Mobile Chrome"`, `"Firefox" => "Mobile Firefox"` - Browser detection on mobile device: `"Chrome" => "Mobile Chrome"`, `"Firefox" => "Mobile Firefox"`
- OS detection: `"Mac OS" => "macOS"`, `"Chromium OS" => "Chrome OS"` - OS detection: `"Mac OS" => "macOS"`, `"Chromium OS" => "Chrome OS"`
- Apps on PlayStation 4/5 now report `WebMAF` instead of `WebKit` for `browser.name` and the `WebMAF`-version in `browser.version`
- What's new: - What's new:
- Add some new methods in result object: - Add some new methods in result object:
- Add support for client hints: `withClientHints()` - Add support for client hints: `withClientHints()`

View File

@ -285,6 +285,7 @@
// Mixed // Mixed
/(kindle)\/([\w\.]+)/i, // Kindle /(kindle)\/([\w\.]+)/i, // Kindle
/(lunascape|maxthon|netfront|jasmine|blazer)[\/ ]?([\w\.]*)/i, // Lunascape/Maxthon/Netfront/Jasmine/Blazer /(lunascape|maxthon|netfront|jasmine|blazer)[\/ ]?([\w\.]*)/i, // Lunascape/Maxthon/Netfront/Jasmine/Blazer
/(webmaf)\/([a-z0-9\.-]+)/i, // Sony/Playstation WebMAF
// Trident based // Trident based
/(avant |iemobile|slim)(?:browser)?[\/ ]?([\w\.]*)/i, // Avant/IEMobile/SlimBrowser /(avant |iemobile|slim)(?:browser)?[\/ ]?([\w\.]*)/i, // Avant/IEMobile/SlimBrowser
/(ba?idubrowser)[\/ ]?([\w\.]+)/i, // Baidu Browser /(ba?idubrowser)[\/ ]?([\w\.]+)/i, // Baidu Browser

View File

@ -1148,6 +1148,26 @@
"major" : "undefined" "major" : "undefined"
} }
}, },
{
"desc" : "Sony WebMAF SDK (Playstation)",
"ua" : "Mozilla/5.0 (PlayStation 4 WebMAF) AppleWebKit/601.2 (KHTML, like Gecko) WebMAF/v3.1.0-0-ge5873ba4 SDK: (0x09508001u), Built: Nov 1 2022 14:36:14",
"expect" :
{
"name" : "WebMAF",
"version" : "v3.1.0-0-ge5873ba4",
"major" : "3"
}
},
{
"desc" : "Sony WebMAF SDK (Playstation)",
"ua" : "Mozilla/5.0 (PlayStation 5; WebMAF/1.0.0) AppleWebKit/537.73 (KHTML, like Gecko)",
"expect" :
{
"name" : "WebMAF",
"version" : "1.0.0",
"major" : "1"
}
},
{ {
"desc" : "Swiftfox", "desc" : "Swiftfox",
"ua" : "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8.1) Gecko/20061024 Firefox/2.0 (Swiftfox)", "ua" : "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8.1) Gecko/20061024 Firefox/2.0 (Swiftfox)",