Skip to content

Commit 26cec2e

Browse files
fix error messaging
1 parent eaf41fc commit 26cec2e

3 files changed

Lines changed: 11 additions & 0 deletions

File tree

src/_shared/modules/Localization/locale/de.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@ window.FrameTrail_L10n['de'] = {
3636
"ErrorMissingSubtitleFile": "Untertitel-Datei nicht gefunden",
3737
"ErrorNoAnnotationsIndexFile": "Annotations Index-Datei nicht gefunden",
3838
"ErrorNoConfigFile": "Konfigurations-Datei nicht gefunden",
39+
"ErrorBrowserFileProtocol": "Kein Zugriff auf den Datenordner. In Chrome oder Edge \u00f6ffnen f\u00fcr lokalen Ordnerzugriff, oder Seite mit PHP-Server aufrufen.",
3940
"ErrorNoHypervideoIndexFile": "Hypervideo Index-Datei nicht gefunden",
4041
"ErrorNoHypervideoJSONFile": "hypervideo.json Datei nicht gefunden",
4142
"ErrorNoResourcesIndexFile": "Resources Index-Datei nicht gefunden",

src/_shared/modules/Localization/locale/en-US.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@ window.FrameTrail_L10n['en-US'] = {
3636
"ErrorMissingSubtitleFile": "Missing subtitle file",
3737
"ErrorNoAnnotationsIndexFile": "No annotations index file",
3838
"ErrorNoConfigFile": "No config file",
39+
"ErrorBrowserFileProtocol": "No access to data folder. Open in Chrome or Edge for local folder access, or run page with PHP server.",
3940
"ErrorNoHypervideoIndexFile": "No hypervideo index file",
4041
"ErrorNoHypervideoJSONFile": "No hypervideo.json file",
4142
"ErrorNoResourcesIndexFile": "No resources index file",

src/player/modules/PlayerLauncher/module.js

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,15 @@
7676
return;
7777
}
7878

79+
if (storageMode === 'download' && window.location.protocol === 'file:' && FrameTrail.getState('config') === null) {
80+
// Browser opened the file directly but doesn't support the File System Access API
81+
// (e.g. Firefox, Safari). There is no way to load persistent data in this context.
82+
// Only applies when no inline config was provided — examples with inline data work fine.
83+
FrameTrail.module('InterfaceModal').hideLoadingScreen();
84+
FrameTrail.module('InterfaceModal').showErrorMessage(labels['ErrorBrowserFileProtocol']);
85+
return;
86+
}
87+
7988
// Sync login state now that storageMode is known.
8089
// UserManagement.isLoggedIn() ran at module-init time before storageMode
8190
// was set, so loggedIn may be stale (false) for local/download modes.

0 commit comments

Comments
 (0)