Skip to content

fix: apply credentials for native text tracks#1023

Open
tsi wants to merge 2 commits intomasterfrom
VIDEO-20772-vtt-credentials
Open

fix: apply credentials for native text tracks#1023
tsi wants to merge 2 commits intomasterfrom
VIDEO-20772-vtt-credentials

Conversation

@tsi
Copy link
Copy Markdown
Collaborator

@tsi tsi commented Apr 6, 2026

Summary

Video.js only sends credentialed XHR for remote WebVTT when the HTML5 tech’s crossOrigin is use-credentials. Cloudinary already used withCredentials for HLS and source objects, but did not set player.crossOrigin, so cookies could be missing for .vtt loaded via native tracks (and chapters). Fetch-based SRT/transcript loading also omitted credentials.

Changes

  • On Cloudinary refresh(), set player.crossOrigin to use-credentials when the current VideoSource has withCredentials, otherwise null, before player.src().
  • Extend fetchFileContent with a credentials option (default omit) and pass include/omit from the active source’s withCredentials when loading SRT/transcript tracks.
  • Add unit tests for fetchFileContent credential behavior.

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

netlify bot commented Apr 6, 2026

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

Name Link
🔨 Latest commit a19517a
🔍 Latest deploy log https://app.netlify.com/projects/cld-vp-esm-pages/deploys/69d38c45efaf100009457ca7
😎 Deploy Preview https://deploy-preview-1023--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 self-assigned this Apr 6, 2026
@netlify
Copy link
Copy Markdown

netlify bot commented Apr 6, 2026

Deploy Preview for cld-video-player ready!

Name Link
🔨 Latest commit a19517a
🔍 Latest deploy log https://app.netlify.com/projects/cld-video-player/deploys/69d38c455ee3190008919eeb
😎 Deploy Preview https://deploy-preview-1023--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.

@tsi tsi changed the title fix: apply credentials for native VTT and fetch-based text tracks [VIDEO-20772] fix: apply credentials for native text tracks Apr 6, 2026
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