Skip to content

Commit

Permalink
TBR dist
Browse files Browse the repository at this point in the history
  • Loading branch information
valotvince committed Dec 28, 2021
1 parent 050c375 commit 3b5667f
Show file tree
Hide file tree
Showing 10 changed files with 22 additions and 24 deletions.
2 changes: 1 addition & 1 deletion .gitignore
Expand Up @@ -17,7 +17,7 @@ coverage/

# Build
/lib
/dist
# /dist
/dist.zip
/netlify
/api-docs
Expand Down
4 changes: 2 additions & 2 deletions demo/index.html
Expand Up @@ -668,7 +668,7 @@ <h3>
<script src="metrics.js"></script>

<!-- demo build -->
<script src="../dist/hls.js"></script>
<script src="../dist/hls-demo.js"></script>
<script src="http://localhost:8000/dist/hls.js"></script>
<script src="http://localhost:8000/dist/hls-demo.js"></script>
</body>
</html>
24 changes: 11 additions & 13 deletions dist/hls.js
Expand Up @@ -6084,18 +6084,18 @@ var EMEController = /*#__PURE__*/function () {
this.mediaKeysPromise = null;
this._onMediaEncrypted = this.onMediaEncrypted.bind(this);

this._setupLicenseXHR = function (xhr, url) {
this._setupLicenseXHR = function (xhr, url, keysListItem) {
var licenseXhrSetup = _this._licenseXhrSetup;

if (!licenseXhrSetup) {
xhr.open('POST', url, true);
return Promise.resolve();
}

return Promise.resolve(licenseXhrSetup(xhr, url)).catch(function () {
return Promise.resolve(licenseXhrSetup(xhr, url, keysListItem.mediaKeySystemDomain)).catch(function () {
// let's try to open before running setup
xhr.open('POST', url, true);
return licenseXhrSetup(xhr, url);
return licenseXhrSetup(xhr, url, keysListItem.mediaKeySystemDomain);
}).then(function () {
// if licenseXhrSetup did not yet call open, let's do it now
if (!xhr.readyState) {
Expand Down Expand Up @@ -6477,11 +6477,13 @@ var EMEController = /*#__PURE__*/function () {
* @returns {XMLHttpRequest} Unsent (but opened state) XHR object
* @throws if XMLHttpRequest construction failed
*/
_proto._createLicenseXhr = function _createLicenseXhr(url, keyMessage, callback) {
_proto._createLicenseXhr = function _createLicenseXhr(keysListItem, keyMessage, callback) {
var url = this.getLicenseServerUrl(keysListItem.mediaKeySystemDomain);
_utils_logger__WEBPACK_IMPORTED_MODULE_2__["logger"].log("Sending license request to URL: " + url);
var xhr = new XMLHttpRequest();
xhr.responseType = 'arraybuffer';
xhr.onreadystatechange = this._onLicenseRequestReadyStageChange.bind(this, xhr, url, keyMessage, callback);
return this._setupLicenseXHR(xhr, url).then(function () {
xhr.onreadystatechange = this._onLicenseRequestReadyStageChange.bind(this, xhr, url, keysListItem, keyMessage, callback);
return this._setupLicenseXHR(xhr, url, keysListItem).then(function () {
return xhr;
});
}
Expand All @@ -6494,7 +6496,7 @@ var EMEController = /*#__PURE__*/function () {
*/
;

_proto._onLicenseRequestReadyStageChange = function _onLicenseRequestReadyStageChange(xhr, url, keyMessage, callback) {
_proto._onLicenseRequestReadyStageChange = function _onLicenseRequestReadyStageChange(xhr, url, keysListItem, keyMessage, callback) {
switch (xhr.readyState) {
case 4:
if (xhr.status === 200) {
Expand All @@ -6505,7 +6507,7 @@ var EMEController = /*#__PURE__*/function () {

if (licenseResponseCallback) {
try {
_data = licenseResponseCallback.call(this.hls, xhr, url);
_data = licenseResponseCallback.call(this.hls, xhr, url, keysListItem.mediaKeySystemDomain);
} catch (e) {
_utils_logger__WEBPACK_IMPORTED_MODULE_2__["logger"].error(e);
}
Expand Down Expand Up @@ -6609,11 +6611,7 @@ var EMEController = /*#__PURE__*/function () {
}

try {
var _url = this.getLicenseServerUrl(keysListItem.mediaKeySystemDomain);

this._createLicenseXhr(_url, keyMessage, callback).then(function (xhr) {
_utils_logger__WEBPACK_IMPORTED_MODULE_2__["logger"].log("Sending license request to URL: " + _url);

this._createLicenseXhr(keysListItem, keyMessage, callback).then(function (xhr) {
var challenge = _this9._generateLicenseRequestChallenge(keysListItem, keyMessage);

xhr.send(challenge);
Expand Down
4 changes: 2 additions & 2 deletions dist/hls.js.d.ts
Expand Up @@ -1024,8 +1024,8 @@ declare class EMEController implements ComponentAPI {
}

export declare type EMEControllerConfig = {
licenseXhrSetup?: (xhr: XMLHttpRequest, url: string) => void | Promise<void>;
licenseResponseCallback?: (xhr: XMLHttpRequest, url: string) => ArrayBuffer;
licenseXhrSetup?: (xhr: XMLHttpRequest, url: string, keySystem: KeySystems) => void | Promise<void>;
licenseResponseCallback?: (xhr: XMLHttpRequest, url: string, keySystem: KeySystems) => ArrayBuffer;
emeEnabled: boolean;
widevineLicenseUrl?: string;
drmSystems: DRMSystemsConfiguration;
Expand Down
2 changes: 1 addition & 1 deletion dist/hls.js.map

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/hls.light.js.map

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/hls.light.min.js.map

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/hls.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/hls.min.js.map

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion package.json
Expand Up @@ -4,7 +4,7 @@
"description": "JavaScript HLS client using MediaSourceExtension",
"homepage": "https://github.com/video-dev/hls.js",
"authors": "Guillaume du Pontavice <g.du.pontavice@gmail.com>",
"version": "1.1.2-fps.2",
"version": "1.1.2-fps.3",
"repository": {
"type": "git",
"url": "https://github.com/video-dev/hls.js"
Expand Down

0 comments on commit 3b5667f

Please sign in to comment.