diff --git a/src/plugins/htmlAudioPlayer/plugin.js b/src/plugins/htmlAudioPlayer/plugin.js index 975e6f8a62..1917954fa4 100644 --- a/src/plugins/htmlAudioPlayer/plugin.js +++ b/src/plugins/htmlAudioPlayer/plugin.js @@ -131,7 +131,10 @@ class HtmlAudioPlayer { return new Promise(function (resolve, reject) { requireHlsPlayer(function () { const hls = new Hls({ - manifestLoadingTimeOut: 20000 + manifestLoadingTimeOut: 20000, + xhrSetup: function (xhr, url) { + xhr.withCredentials = true; + } }); hls.loadSource(val); hls.attachMedia(elem); diff --git a/src/plugins/htmlVideoPlayer/plugin.js b/src/plugins/htmlVideoPlayer/plugin.js index b4fcec21e5..04b0fbea2b 100644 --- a/src/plugins/htmlVideoPlayer/plugin.js +++ b/src/plugins/htmlVideoPlayer/plugin.js @@ -398,7 +398,10 @@ function tryRemoveElement(elem) { const hls = new Hls({ manifestLoadingTimeOut: 20000, maxBufferLength: maxBufferLength, - maxMaxBufferLength: maxMaxBufferLength + maxMaxBufferLength: maxMaxBufferLength, + xhrSetup(xhr) { + xhr.withCredentials = true; + } }); hls.loadSource(url); hls.attachMedia(elem);