Skip to content
This repository was archived by the owner on Oct 20, 2022. It is now read-only.

Commit bd401e6

Browse files
committed
Merge branch 'release/1.14.1'
2 parents 685dfdf + 70ad667 commit bd401e6

File tree

5 files changed

+28
-12
lines changed

5 files changed

+28
-12
lines changed

RELEASES NOTES.txt

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
### Release Notes v1.14.1 (2018/02/15)
2+
* Bugs fixing:
3+
* - [HLS] Correct key error ('webkitkeyerror') handler (native HLS+FP on Safari/OSx use case)
4+
* - [HLS] Correct licenser url getting from protection data (native HLS+FP on Safari/OSx use case)
5+
16
### Release Notes v1.14.0 (2018/02/08)
27
* [MSS] Add automatic Widevine pssh generation [#216]
38
* [MSS] Detect PlayReady messages encoding [#207]

app/js/hls/HlsStream.js

Lines changed: 18 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -338,11 +338,12 @@ Hls.dependencies.HlsStream = function() {
338338
},
339339

340340
getKeyError = function(event) {
341-
var code = MediaPlayer.dependencies.ErrorHandler.prototype.MEDIA_KEYERR,
341+
var error = event.target.error,
342+
code = MediaPlayer.dependencies.ErrorHandler.prototype.MEDIA_KEYERR,
342343
msg = "MediakeyError";
343344

344-
if (event.errorCode) {
345-
switch (event.errorCode.code) {
345+
if (error) {
346+
switch (error.code) {
346347
case 1:
347348
code = MediaPlayer.dependencies.ErrorHandler.prototype.MEDIA_KEYERR_UNKNOWN;
348349
msg = "An unspecified error occurred. This value is used for errors that don't match any of the other codes.";
@@ -376,7 +377,7 @@ Hls.dependencies.HlsStream = function() {
376377
code = MediaPlayer.dependencies.ErrorHandler.prototype.MEDIA_KEYERR_UNKNOWN;
377378
msg = "An unspecified error occurred. This value is used for errors that don't match any of the other codes.";
378379
}
379-
if (event.systemCode) {
380+
if (error.systemCode) {
380381
msg += " (System Code = " + event.systemCode + ")";
381382
}
382383
return new MediaPlayer.vo.protection.KeyError(code, msg);
@@ -416,18 +417,27 @@ Hls.dependencies.HlsStream = function() {
416417

417418
var session = e.target,
418419
message = e.message,
419-
type;
420+
url = null,
421+
type,
422+
protData = getKsProtectionData('com.apple.fps.1_0');
423+
424+
if (protData) {
425+
if (protData.serverURL && typeof protData.serverURL === "string" && protData.serverURL !== "") {
426+
url = protData.serverURL;
427+
} else if (protData.laURL && protData.laURL !== "") { // TODO: Deprecated!
428+
url = protData.laURL;
429+
}
430+
}
420431

421-
var protData = getKsProtectionData('com.apple.fps.1_0');
422-
if (!protData || !protData.laURL) {
432+
if (url === null) {
423433
this.errHandler.sendError(MediaPlayer.dependencies.ErrorHandler.prototype.MEDIA_KEYMESSERR_URL_LICENSER_UNKNOWN, "No license server URL specified");
424434
return;
425435
}
426436

427437
type = (protData && protData.requestType && protData.requestType === 'text') ? 'text' : 'stream';
428438

429439
message = processLicenseMessage(session, type, message);
430-
sendLicenseRequest.call(this, session, type, protData.laURL, message);
440+
sendLicenseRequest.call(this, session, type, url, message);
431441
},
432442

433443
onKeyAdded = function(e) {

app/js/streaming/MediaPlayer.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -938,7 +938,7 @@ MediaPlayer = function () {
938938

939939
_isPlayerInitialized();
940940

941-
if (typeof time !== 'number') {
941+
if (typeof time !== 'number' || isNaN(time)) {
942942
throw new Error('MediaPlayer.seek(): Invalid Arguments');
943943
}
944944

build/deploy.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -166,7 +166,7 @@ getBranchName().then(
166166
});
167167
})
168168

169-
// 7 - Add, commit and push changes on gh-pages branch to repository
169+
// 7 - Update index.html file content, and update 'latest' symbolic link
170170
.then(function() {
171171
// Open index.html file
172172
var path = 'gh-pages/index.html';
@@ -185,14 +185,15 @@ getBranchName().then(
185185

186186
// Update 'latest' symbolic link
187187
console.info('Update \'latest\' symbolic link');
188+
fs.removeSync('gh-pages/latest');
188189
fs.ensureSymlinkSync('gh-pages/' + pkg.dir, 'gh-pages/latest');
189190
}
190191
}
191192

192193
return Promise.resolve();
193194
})
194195

195-
// 8 - Add, commit and push changes to Github
196+
// 8 - Add, commit and push changes on gh-pages branch to repository
196197
.then(execCommand.bind(null, 'cd gh-pages && '+ gitCommands.configUser))
197198
.then(execCommand.bind(null, 'cd gh-pages && '+ gitCommands.configEmail))
198199
.then(execCommand.bind(null, 'cd gh-pages && '+ gitCommands.add))

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "hasplayer.js",
3-
"version": "1.14.0",
3+
"version": "1.14.1",
44
"scripts": {
55
"build": "cd build && gulp",
66
"doc": "cd build && gulp doc",

0 commit comments

Comments
 (0)