Skip to content

Change query of userAgent for detecting local display #797

Description

@Stephanowicz

Hello,

after manually updating Chromium on my raspberry it no longer resolves the userAgent query in playerlib.js @line248:
GLOBAL.userAgent.indexOf('CrOS') != -1 ? GLOBAL.chromium = true : GLOBAL.chromium = false;

as the userAgent now resolves to:
'Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/152.0.0.0 Safari/537.36'

May I suggest to change the query to a more general one, independent of the browser signature?
e.g. I changed the query to
window.location.href.indexOf('localhost') != -1 ? GLOBAL.chromium = true : GLOBAL.chromium = false;

to detect if the this is the machine, where moOde is running on?

Cheers, Stephan

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions