fix: sync random pause image across clients (#38)#52
Merged
Conversation
Players without the FILES_BROWSE permission could not resolve a random image folder via FilePicker.browse, so the raw folder path was rendered as the pause icon src, resulting in a broken image (only in the browser for non-GM users, or as a player in the desktop client). Resolve the folder on the GM (who always has FILES_BROWSE) and store the chosen file in a hidden world setting (selectedImage) that every client reads, so all players render the same image. A new random image is rolled on each pause; changing the folder while paused updates it immediately; and an already-paused world resolves an empty selection on GM login without changing an existing, valid selection. Also fix video playback for the desktop client by routing through game.video.play (respecting the Electron autoplay policy), and correct the docs/hints: the desktop app supports H.264/WebM but not HEVC/H.265. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
marcstraube
marked this pull request as ready for review
July 9, 2026 10:09
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
A random pause image selected from a folder rendered as a broken image for players.
Root cause
The random folder was resolved on every client via
FilePicker.browse. Players without the FILES_BROWSE permission (the default for the Player role) are rejected by the server, so the raw folder path (e.g.assets/) was set as the pause iconsrc→ broken image. This hit non-GM users in the browser and players in the desktop client. A single file worked because it needs no browsing.Fix
selectedImage) that every client reads → all players see the same image.Also included
game.video.playso playback respects the Electron autoplay policy.Testing
Verified locally: same image across GM and players, folder and single-file modes, and video playback in the desktop client.
Closes #38
🤖 Generated with Claude Code