Skip to content

Commit

Permalink
feat(FEC-11091): add support for XMLHttpRequest.withCredentials in re…
Browse files Browse the repository at this point in the history
…quest filter (#141)
  • Loading branch information
Dan Ziv committed Apr 26, 2021
1 parent f6268a6 commit 5f4df73
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/dash-adapter.js
Original file line number Diff line number Diff line change
Expand Up @@ -187,6 +187,7 @@ export default class DashAdapter extends BaseMediaSourceAdapter {
* @private
*/
_thumbnailController: ?DashThumbnailController;

/**
* Factory method to create media source adapter.
* @function createAdapter
Expand Down Expand Up @@ -410,6 +411,9 @@ export default class DashAdapter extends BaseMediaSourceAdapter {
.then(updatedRequest => {
request.uris = [updatedRequest.url];
request.headers = updatedRequest.headers;
if (typeof updatedRequest.withCredentials === 'boolean') {
request.allowCrossSiteCredentials = updatedRequest.withCredentials;
}
if (request.method === 'POST') {
request.body = updatedRequest.body;
} else if (updatedRequest.body) {
Expand Down

0 comments on commit 5f4df73

Please sign in to comment.