diff --git a/src/components/htmlaudioplayer/plugin.js b/src/components/htmlaudioplayer/plugin.js
index c3a5484aca..000af6f226 100644
--- a/src/components/htmlaudioplayer/plugin.js
+++ b/src/components/htmlaudioplayer/plugin.js
@@ -136,7 +136,10 @@ define(['events', 'browser', 'require', 'apphost', 'appSettings', 'htmlMediaHelp
requireHlsPlayer(function () {
var hls = new Hls({
- manifestLoadingTimeOut: 20000
+ manifestLoadingTimeOut: 20000,
+ xhrSetup: function(xhr, url) {
+ xhr.withCredentials = true;
+ }
//appendErrorMaxRetry: 6,
//debug: true
});
@@ -155,6 +158,9 @@ define(['events', 'browser', 'require', 'apphost', 'appSettings', 'htmlMediaHelp
elem.autoplay = true;
+ // Safari will not send cookies without this
+ elem.crossOrigin = 'use-credentials';
+
return htmlMediaHelper.applySrc(elem, val, options).then(function () {
self._currentSrc = val;
diff --git a/src/components/htmlvideoplayer/plugin.js b/src/components/htmlvideoplayer/plugin.js
index f87fd19462..de2c364aee 100644
--- a/src/components/htmlvideoplayer/plugin.js
+++ b/src/components/htmlvideoplayer/plugin.js
@@ -330,7 +330,10 @@ define(['browser', 'require', 'events', 'apphost', 'loading', 'dom', 'playbackMa
requireHlsPlayer(function () {
var hls = new Hls({
- manifestLoadingTimeOut: 20000
+ manifestLoadingTimeOut: 20000,
+ xhrSetup: function(xhr, xhr_url) {
+ xhr.withCredentials = true;
+ }
//appendErrorMaxRetry: 6,
//debug: true
});
@@ -551,6 +554,9 @@ define(['browser', 'require', 'events', 'apphost', 'loading', 'dom', 'playbackMa
elem.autoplay = true;
+ // Safari will not send cookies without this
+ elem.crossOrigin = 'use-credentials';
+
return htmlMediaHelper.applySrc(elem, val, options).then(function () {
self._currentSrc = val;