Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove early usage of chrome API #1480

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

Starfox64
Copy link

Related:

N/A

Description:

When running Vidstack in a Capacitor app, the app fails to start because of a ReferenceError:
ReferenceError: chrome is not defined
This happens because tracks.ts directly references the chrome API on import.
This typically doesn't happen when the app is bundled into neatly split dependencies as Vite does by default, but when generating a single bundle that contains the entire app, the chrome API will be accessed immediately regardless of the browser used.

This PR prevents the chrome API from being referenced early.

Ready?

Yes

Anything Else?

No

Review Process:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant