videojs-player icon indicating copy to clipboard operation
videojs-player copied to clipboard

When the server sets withCredentials to true, the cookie cannot be sent when the m3u8 file is played

Open pocketChao opened this issue 5 years ago • 2 comments

I set the withCredentials property of video-js to true, and then the server configured withCredentials to true, access-control-allow-headers: Requested (Origin, x-requested With, content-type, Accept), access-control-allow-origin :'.$_SERVER['HTTP_ORIGIN '], but I found no cookie in the HTTP request by grabbing the package, I hope to be able to get help, I will be very grateful

get playerOptions () { return { language: "zh-CN", autoplay: true, preload: "auto", muted: false, loop: false, fluid: false, poster: "", sources: [ { // type: "video/mp4", type: "application/x-mpegURL", src: this.videoUrl, withCredentials: true } ], notSupportedMessage: "此视频暂无法播放,请稍后再试", controlBar: { timeDivider: true, durationDisplay: true, remainingTimeDisplay: false, fullscreenToggle: true } }; }

window.document.cookie = CURRENT_RESOURCE_ID=${this.resourceId};

pocketChao avatar Apr 19 '19 02:04 pocketChao

If you can solve my problem, I will pay 88.88 yuan to express my gratitude

pocketChao avatar Apr 19 '19 02:04 pocketChao

Also having this same issue

heyalbertdev avatar Sep 28 '22 12:09 heyalbertdev