File tree Expand file tree Collapse file tree 3 files changed +9
-2
lines changed Expand file tree Collapse file tree 3 files changed +9
-2
lines changed Original file line number Diff line number Diff line change @@ -114,7 +114,10 @@ const setupCloudinaryMiddleware = () => {
114114 videojs . use ( 'video/auto' , ( ) => {
115115 return {
116116 async setSource ( srcObj , next ) {
117- const { headers } = await fetch ( srcObj . src , { method : 'HEAD' } ) ;
117+ const { headers } = await fetch ( srcObj . src , {
118+ method : 'HEAD' ,
119+ credentials : srcObj . withCredentials ? 'include' : 'omit'
120+ } ) ;
118121
119122 return next ( null , {
120123 src : srcObj . src ,
Original file line number Diff line number Diff line change @@ -39,6 +39,7 @@ export const playerValidators = {
3939 queryParams : validator . isPlainObject ,
4040 publicId : validator . isString ,
4141 fluid : validator . isBoolean ,
42+ withCredentials : validator . isBoolean ,
4243 analytics : validator . isBoolean ,
4344 cloudinaryAnalytics : validator . isBoolean ,
4445 hideContextMenu : validator . isBoolean ,
@@ -84,7 +85,6 @@ export const playerValidators = {
8485export const sourceValidators = {
8586 raw_transformation : validator . isString ,
8687 shoppable : validator . isPlainObject ,
87- withCredentials : validator . isBoolean ,
8888 chapters : validator . or ( validator . isBoolean , validator . isPlainObject ) ,
8989 interactionAreas : {
9090 enable : validator . isBoolean ,
Original file line number Diff line number Diff line change @@ -550,6 +550,10 @@ class VideoPlayer extends Utils.mixin(Eventable) {
550550 options . usageReport = true ;
551551 }
552552
553+ if ( this . playerOptions . withCredentials ) {
554+ options . withCredentials = true ;
555+ }
556+
553557 clearTimeout ( this . reTryId ) ;
554558 this . nbCalls = 0 ;
555559 const maxTries = this . videojs . options_ . maxTries || 3 ;
You can’t perform that action at this time.
0 commit comments