Current Behavior:
When a user loads a site with vidstack in an Android Mobile WebView, localStorage is not always available (depending on the WebView). Therefore the following error is raised:
TypeError: Cannot read properties of null (reading 'getItem')
Expected Behavior:
No error/exception is raised, localStorage is null-checked and ignored if null.
Steps To Reproduce:
Use an Android application that opens an embedded webview when opening a link.
Share a link to a page with vidstack.
Reproduction Link:
https://www.vidstack.io/player/demo?framework=react&view=player
Easiest way to reproduce:
- In Firefox, go to about:config, disable
dom.storage.enable.
- Navigate to the demo page, it will crash.
Environment:
- Framework: React
- Meta Framework: Next.js
- Node: 20.11.0
- OS: Android 11
- Browser: Chrome Mobile WebView 128.0.6613
Current Behavior:
When a user loads a site with vidstack in an Android Mobile WebView,
localStorageis not always available (depending on the WebView). Therefore the following error is raised:Expected Behavior:
No error/exception is raised, localStorage is null-checked and ignored if null.
Steps To Reproduce:
Use an Android application that opens an embedded webview when opening a link.
Share a link to a page with vidstack.
Reproduction Link:
https://www.vidstack.io/player/demo?framework=react&view=player
Easiest way to reproduce:
dom.storage.enable.Environment: