videojs-player
videojs-player copied to clipboard
When the server sets withCredentials to true, the cookie cannot be sent when the m3u8 file is played
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}
;
If you can solve my problem, I will pay 88.88 yuan to express my gratitude
Also having this same issue