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

Commit c9a168e

Browse files
committed
Merge branch 'release/1.11.0'
2 parents d5bb3be + 21f96c4 commit c9a168e

File tree

175 files changed

+1498
-238456
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

175 files changed

+1498
-238456
lines changed

.jshintrc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,5 +42,6 @@
4242
"define",
4343
"fingerprint_browser",
4444
"fingerprint_os",
45+
"goog",
4546
"DEBUG"]
4647
}

README.md

Lines changed: 38 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -109,38 +109,46 @@ When it is all done, it should look similar to this:
109109
```
110110
## DRM Video Stream
111111
In the case of protected content, here is an example illustrating setting of the protection data:
112-
```html
113-
<!doctype html>
114-
<html>
115-
<head>
116-
<title>Hasplayer.js Rocks</title>
117-
</head>
118-
<body>
119-
<div>
120-
<video id="videoPlayer" controls="true"></video>
121-
</div>
122-
<script src="yourPathToHasplayer/hasplayer.js"></script>
123-
<script>
124-
(function(){
125-
var stream = {
126-
url: "<manifest_url>",
127-
protData: {
128-
"<key_system>": {
129-
laURL: "<licenser_url>",
130-
cdmData: "<CDM_data>",
131-
serverCertificate: "<license_server_certificate (as Base64 string)>"
132-
}
133-
}
134-
};
135-
var mediaPlayer = new MediaPlayer();
136-
mediaPlayer.init(document.querySelector("#videoPlayer"));
137-
mediaPlayer.load(stream);
138-
})();
139-
</script>
140-
</body>
141-
</html>
112+
```js
113+
var stream = {
114+
url: "<manifest_url>",
115+
protData: {
116+
"<key_system>": {
117+
laURL: "<licenser_url>",
118+
withCredentials: "<license_request_withCredentials_value (true or false)>",
119+
cdmData: "<CDM_specific_data>", // Supported by PlayReady key system (using MS-prefixed EME API) only
120+
pssh: "<pssh (as Base64 string)>" // Considered for Widevine key system only
121+
serverCertificate: "<license_server_certificate (as Base64 string)>"
122+
audioRobustness: "<audio_robustness_level>" // Considered for Widevine key system only
123+
videoRobustness: "<video_robustness_level>" // Considered for Widevine key system only
124+
}
125+
}
126+
};
127+
mediaPlayer.load(stream);
142128
```
143129

130+
### HLS and FairPlay on Safari/OSx
131+
In order to playback HLS protected contents with FairPlay DRM, a specific mode is available which consists in streaming and playing the content directly with the &lt;video&gt; element, and in managing the exchanges between the FairPlay CDM and the licenser using EME.
132+
To activate this mode on Safari/OSx you need to explicitely indicate the protocol type, i.e. 'HLS', for the input stream:
133+
134+
```js
135+
var stream = {
136+
url: "<manifest_url>",
137+
protocol= "HLS",
138+
protData: {
139+
"com.apple.fps.1_0": {
140+
laURL: "<licenser_url>",
141+
withCredentials: "<license_request_withCredentials_value (true or false)>",
142+
serverCertificate: "<license_server_certificate (as Base64 string)>"
143+
}
144+
}
145+
};
146+
mediaPlayer.load(stream);
147+
```
148+
149+
Since native player is used to achieve streaming session, some parts of the MediaPlayer API have no effect (functions relative to streaming and ABR configuration, DVR, trick mode...).
150+
However, API for audio and subtitles tracks management is functional.
151+
144152
## Events
145153

146154
MediaPlayer offers events to be notified of differents events on video streaming. Those events are, for a part, sent by the HTMLMediaElement (&lt;video&gt;), and for an other part, sent by the MediaPlayer.

RELEASES NOTES.txt

Lines changed: 19 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,22 @@
1-
### Release Notes v1.10.0 (2017/04/14)
1+
### Release Notes v1.11.0 (2017/07/13)
2+
* [HLS] Add specific support for HLS and FairPlay for Safari/OSx using native player and EME for CDM/licenser exchanges
3+
* [MSS] Add support for large timestamps values (greater than 2^53)
4+
* [MSS] Add automatic KID setting in Widevine PSSH (from protection data) with KID value from MSS ProtectionHeader
5+
* [MSS] Add specific error in case of missing tfrf box in live segments
6+
* [MSS] Match timeShiftBufferDepth value to video segment timeline duration
7+
* [EME] Set robustness levels for Widevine key system if provided in protection data
8+
* [EME] Ignore 'encrypted' event in case the key system has already been selected and pssh already processed
9+
* Correct metrics generation (states, seek, pause, ...)
10+
* Bugs fixing:
11+
* - [MSS] Fix management of unsynchronized tracks
12+
* - [MSS] Fix support for live streams with a DVR window length inferior to buffer length
13+
* - [DASH] Fix support for with TTML subtitles in mp4 fragments
14+
* - [DASH] Fix support for text track switching in case of full TTML files
15+
* - [EME] Correct regression on EME version (ProtectionModel) selection for Edge browser
16+
* - [EME] Correct regression on licenses (EME sessions) persistence management (do not record not 'usable' sessions)
17+
* - Correct regression on text tracks switching in case of full TTML files
18+
19+
### Release Notes v1.10.0 (2017/04/13)
220
* Adapt EME's protection model 21Jan2015 to chrome 58 updates (secure origins and server certificate)
321
* - Check requestMediaKeySystemAccess API availability when requesting key system access
422
* - Add possibility to provide server certificate when loading a stream

app/js/dash/DashHandler.js

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -817,17 +817,14 @@ Dash.dependencies.DashHandler = function() {
817817
if (!isNaN(representation.segmentDuration)) {
818818
self.debug.log("[DashHandler][" + type + "] getIndexForSegments, (segment duration) idx = ", idx);
819819
idx = Math.floor((time - representation.adaptation.period.start) / representation.segmentDuration);
820+
} else if (segments && segments.length > 0 && time < segments[0].presentationStartTime) {
821+
self.debug.log("[DashHandler][" + type + "] getIndexForSegments, (before start) idx = ", idx);
822+
idx = 0;
820823
} else {
821824
self.debug.log("[DashHandler][" + type + "] Couldn't figure out segment for time: " + time);
822825
}
823826
}
824827

825-
// TODO : This is horrible.
826-
// Temp fix for SegmentTimeline refreshes.
827-
//if (idx === -1) {
828-
// idx = 0;
829-
//}
830-
831828
/*
832829
if (segments && segments.length > 0) {
833830
idx = 0;

app/js/dash/DashManifestExtensions.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -499,7 +499,7 @@ Dash.dependencies.DashManifestExtensions.prototype = {
499499
representation.initialization = r.BaseURL;
500500
representation.range = initialization.range;
501501
}
502-
} else if (r.hasOwnProperty("mimeType") && this.getIsTextTrack(r.mimeType)) {
502+
} else if (r.hasOwnProperty("mimeType") && this.getIsTextTrack(r.mimeType) && !representation.initialization) {
503503
representation.initialization = r.BaseURL;
504504
representation.range = 0;
505505
}

0 commit comments

Comments
 (0)