mirror of
https://github.com/jellyfin/jellyfin-web
synced 2025-03-30 19:56:21 +00:00
Fix #1210: Add credentials to XHR requests
This commit is contained in:
parent
fb7a19d85d
commit
421dfbf2c0
2 changed files with 14 additions and 2 deletions
|
@ -136,7 +136,10 @@ define(['events', 'browser', 'require', 'apphost', 'appSettings', 'htmlMediaHelp
|
||||||
|
|
||||||
requireHlsPlayer(function () {
|
requireHlsPlayer(function () {
|
||||||
var hls = new Hls({
|
var hls = new Hls({
|
||||||
manifestLoadingTimeOut: 20000
|
manifestLoadingTimeOut: 20000,
|
||||||
|
xhrSetup: function(xhr, url) {
|
||||||
|
xhr.withCredentials = true;
|
||||||
|
}
|
||||||
//appendErrorMaxRetry: 6,
|
//appendErrorMaxRetry: 6,
|
||||||
//debug: true
|
//debug: true
|
||||||
});
|
});
|
||||||
|
@ -155,6 +158,9 @@ define(['events', 'browser', 'require', 'apphost', 'appSettings', 'htmlMediaHelp
|
||||||
|
|
||||||
elem.autoplay = true;
|
elem.autoplay = true;
|
||||||
|
|
||||||
|
// Safari will not send cookies without this
|
||||||
|
elem.crossOrigin = 'use-credentials';
|
||||||
|
|
||||||
return htmlMediaHelper.applySrc(elem, val, options).then(function () {
|
return htmlMediaHelper.applySrc(elem, val, options).then(function () {
|
||||||
|
|
||||||
self._currentSrc = val;
|
self._currentSrc = val;
|
||||||
|
|
|
@ -330,7 +330,10 @@ define(['browser', 'require', 'events', 'apphost', 'loading', 'dom', 'playbackMa
|
||||||
requireHlsPlayer(function () {
|
requireHlsPlayer(function () {
|
||||||
|
|
||||||
var hls = new Hls({
|
var hls = new Hls({
|
||||||
manifestLoadingTimeOut: 20000
|
manifestLoadingTimeOut: 20000,
|
||||||
|
xhrSetup: function(xhr, xhr_url) {
|
||||||
|
xhr.withCredentials = true;
|
||||||
|
}
|
||||||
//appendErrorMaxRetry: 6,
|
//appendErrorMaxRetry: 6,
|
||||||
//debug: true
|
//debug: true
|
||||||
});
|
});
|
||||||
|
@ -551,6 +554,9 @@ define(['browser', 'require', 'events', 'apphost', 'loading', 'dom', 'playbackMa
|
||||||
|
|
||||||
elem.autoplay = true;
|
elem.autoplay = true;
|
||||||
|
|
||||||
|
// Safari will not send cookies without this
|
||||||
|
elem.crossOrigin = 'use-credentials';
|
||||||
|
|
||||||
return htmlMediaHelper.applySrc(elem, val, options).then(function () {
|
return htmlMediaHelper.applySrc(elem, val, options).then(function () {
|
||||||
|
|
||||||
self._currentSrc = val;
|
self._currentSrc = val;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue