Skip to content

Conversation

@HarryParkes
Copy link

- Add params object with time claim when signing thumbnail JWT
- Fixes issue oversightstudio#23 where posterTimestamp didn't affect signed URLs
- For signed policies, thumbnail options must be in JWT claims per Mux
docs"
Copilot AI review requested due to automatic review settings January 14, 2026 12:18
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR fixes an issue where the posterTimestamp parameter was not being properly included in JWT claims for signed playback URLs when generating animated GIF thumbnails. When using Mux's signed playback policies, thumbnail options must be included in the JWT claims rather than just as query parameters.

Changes:

  • Added params object with time claim to JWT signing call for GIF URLs when posterTimestamp is set
  • Ensures signed GIF URLs respect the posterTimestamp setting per Mux documentation requirements

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

const token = await mux.jwt.signPlaybackId(playbackId, {
expiration: pluginOptions.signedUrlOptions?.expiration ?? '1d',
type: 'gif',
params: typeof posterTimestamp === 'number' ? { time: posterTimestamp.toString() } : undefined,
Copy link

Copilot AI Jan 14, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The indentation on this line uses tabs instead of spaces, which is inconsistent with the rest of the file. This line should be indented with spaces to match the existing code style.

Suggested change
params: typeof posterTimestamp === 'number' ? { time: posterTimestamp.toString() } : undefined,
params: typeof posterTimestamp === 'number' ? { time: posterTimestamp.toString() } : undefined,

Copilot uses AI. Check for mistakes.
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