Closed minigt closed 11 months ago
I found hat the issue is on line
as it should be
} else if (!browser.chrome && !browser.edgeChromium && !browser.opera && !browser.edge) {
browser.edge?
yeap, apparently XD
I am trying to push the bugfix branch but it says I don't have permission
oh no I think the browser detection is seeing the "motorola edge 30" in the user agent and identifying the browser as edge...
I am trying to push the bugfix branch but it says I don't have permission
you probably want to fork the repo, branch off master, make the changes, push to your repo and then open a pull request
you were right, it was the edge on moto edge
const uaMatch = function (ua) { ua = ua.toLowerCase(); console.log(ua); const match = /(edg)[ /]([\w.]+)/.exec(ua) || /(edga)[ /]([\w.]+)/.exec(ua) || /(edgios)[ /]([\w.]+)/.exec(ua) || /(edge)[ /]([\w.]+)/.exec(ua) || /(opera)[ /]([\w.]+)/.exec(ua) || /(opr)[ /]([\w.]+)/.exec(ua) || /(chrome)[ /]([\w.]+)/.exec(ua) || /(safari)[ /]([\w.]+)/.exec(ua) || /(firefox)[ /]([\w.]+)/.exec(ua) || ua.indexOf('compatible') < 0 && /(mozilla)(?:.*? rv:([\w.]+)|)/.exec(ua) || [];
this is the log
mozilla/5.0 (linux; android 13; motorola edge 30 neo build/t1ssms33.1-121-4-1; wv) applewebkit/537.36 (khtml, like gecko) version/4.0 chrome/115.0.5790.138 mobile safari/537.36, webpack-internal:///./scripts/browser.js (206)
how good are you with regex? :P
I think I'll just move the chrome line up in the chain XD
yeap, that works
I might have a crack at rewriting that regex later, it might not even be needed if there's a better test for browser compatibility
https://developers.google.com/cast/docs/web_sender/integrate#initialization
maybe it should be doing something like this
Be my guest. If you don't find the time, at least the moto edge issue will be solved with this. Thanks for your help!
thank you for finding the funny browser check
Wow, that's unexpected. Thanks for debugging this and finding a solution!
parsing the user agent is strongly cautioned against
https://hacks.mozilla.org/2013/09/user-agent-detection-history-and-checklist/
But let get the record straight. User-Agent sniffing is a future fail strategy. By design, you will detect only what is known, not what will come. The space of small devices (smartphones, feature phones, tablets, watches, arduino, etc.) is a very fast-paced evolving space. The diversity in terms of physical characteristics will only increase. Updating databases and algorithms for identifying correctly is a very high maintenance task which is doomed to fail at a point in the future.
capabilities should be checked for individually if possible, and behavior should changed based on those capabilities and not the user agent
for example, using chromecast if the browser supports it would not only fix this issue but also probably fix casting with ungoogled chromium
This unsupported warning happens with all of Motorola's Edge models. Since they all report Edge in the UA string. https://gsmarena.com/results.php3?sQuickSearch=yes&sName=Motorola%20edge
I have the Edge 2021 and Edge 2023.
Fixed by #4748
Describe The Bug Bug derive from https://github.com/jellyfin/jellyfin-android/issues/1147
The android app on moto edge can't cast to Chromecast, despite other apps(Netlix, Dysne+, Star+) being able to cast.
Steps To Reproduce On a moto edge phone
1) install jellyfin from google play 2) open app 3)connect to server via https 4)click cast button 5)see "(Google Cast Unsupported)"
Expected Behavior Should be able to cast to a chromecast device