Skip to content

Comments

Remove early usage of chrome API#1480

Merged
mihar-22 merged 1 commit intovidstack:mainfrom
Starfox64:patch-1
Oct 24, 2024
Merged

Remove early usage of chrome API#1480
mihar-22 merged 1 commit intovidstack:mainfrom
Starfox64:patch-1

Conversation

@Starfox64
Copy link
Contributor

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:

@mihar-22 mihar-22 merged commit c0173b0 into vidstack:main Oct 24, 2024
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.

2 participants