Skip to content

fix: stabilize _s query params for better browser caching#1024

Open
tsi wants to merge 1 commit intomasterfrom
VIDEO-20779-version-query
Open

fix: stabilize _s query params for better browser caching#1024
tsi wants to merge 1 commit intomasterfrom
VIDEO-20779-version-query

Conversation

@tsi
Copy link
Copy Markdown
Collaborator

@tsi tsi commented Apr 6, 2026

Summary

Use a stable _s=vp marker for usage-reporting query strings so URLs cache more predictably across player versions, and avoid merging the video source’s queryParams onto raw absolute poster URLs so external poster hrefs stay exactly as provided.

Changes

  • Set _s to vp (instead of vp-<package version>) when allowUsageReport is on in Cloudinary buildSource and in fetch-config applet requests.
  • In VideoSource.poster(), apply this.queryParams() only when the poster target is not a raw URL, preserving untouched raw poster URLs while still appending params for Cloudinary-derived posters.
  • Add unit tests for raw poster hrefs vs Cloudinary-built poster URLs.

@tsi tsi requested a review from a team as a code owner April 6, 2026 10:46
@netlify
Copy link
Copy Markdown

netlify bot commented Apr 6, 2026

Deploy Preview for cld-video-player ready!

Name Link
🔨 Latest commit 36e3d4e
🔍 Latest deploy log https://app.netlify.com/projects/cld-video-player/deploys/69d38eecb067220008c3d89b
😎 Deploy Preview https://deploy-preview-1024--cld-video-player.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@netlify
Copy link
Copy Markdown

netlify bot commented Apr 6, 2026

Deploy Preview for cld-vp-esm-pages ready!

Name Link
🔨 Latest commit 36e3d4e
🔍 Latest deploy log https://app.netlify.com/projects/cld-vp-esm-pages/deploys/69d38eec03a9fe000746ee14
😎 Deploy Preview https://deploy-preview-1024--cld-vp-esm-pages.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@tsi tsi changed the title fix: stabilize analytics _s and poster query params for caching [VIDEO-20779] fix: stabilize _s query params for better browser caching Apr 6, 2026
);

options.queryParams = Object.assign(options.queryParams || {}, options.allowUsageReport ? { _s: `vp-${VERSION}` } : {});
options.queryParams = Object.assign(options.queryParams || {}, options.allowUsageReport ? { _s: 'vp' } : {});
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

because we report the version in the internal analytics call?
why do we remove the version?

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