video.js
video.js copied to clipboard
How to set credentials only for TextTrack XHR not effect Video resource
Description
In addition to making sure that the video element gets the options set appropriately, we should make sure that when cross-origin is set to "use-credentials", TextTrack sets withCredentials on the XHR it makes.
now my requirement is my video resource and VTT are got from different servers, and they have different CDN config and security config
so when I
use video tag with crossorigin="use-credentials"
video and vtt need be added cors header both, but actually, I only can add a header for vtt file
how to walkaround this limit, I want only use 'use-credentials' for vtt XHR request
Help me!!!
Reduced test case
No response
Steps to reproduce
- no need
Errors
No response
What version of Video.js are you using?
7.7.3
Video.js plugins used.
No response
What browser(s) including version(s) does this occur with?
All
What OS(es) and version(s) does this occur with?
All
👋 Thanks for opening your first issue here! 👋
If you're reporting a 🐞 bug, please make sure you include steps to reproduce it. We get a lot of issues on this repo, so please be patient and we will get back to you as soon as we can. To help make it easier for us to investigate your issue, please follow the contributing guidelines.
I read this issue https://github.com/videojs/video.js/issues/5438 but not find solution
Are you using an mp4 and an out-of-band track file? Or HLS with in-band tracks? Unfortunately, there isn't a way to set credentials only for the VTT files. However, there was a fix that made TextTracks set withCredentials (https://github.com/videojs/video.js/pull/6588) but that's in a newer version of Video.js than you're using.
If you can provide a live minimal demo page, we may be able to help more.