Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
4fb5fdb
add support for pssh in manifest
ssreed Sep 13, 2018
b1e50f8
move util function into it's own file
ssreed Sep 13, 2018
3b423f5
add docs, clean up names
ssreed Sep 13, 2018
5d2a4ac
add unit tests
ssreed Sep 13, 2018
fef1409
add support for multi-drm manifests
ssreed Sep 15, 2018
6713568
add docs
ssreed Sep 15, 2018
294d8af
add playready support
ssreed Sep 15, 2018
8236809
clean up
ssreed Sep 15, 2018
d77f6d0
move playready header logic to separate function
ssreed Sep 17, 2018
d04049e
update playready challenge logic
ssreed Sep 17, 2018
685e6df
fix: use for loop instead of forEach
ssreed Sep 17, 2018
7c670cc
move playready header logic to separate file
ssreed Sep 19, 2018
0401518
fix typo
ssreed Sep 19, 2018
00025d1
don't initialize emeController if eme isn't enabled
ssreed Sep 20, 2018
09d9660
simplify playready headers
ssreed Oct 26, 2018
a9d9e8f
clarify and update function name to more accurately reflect returned …
ssreed Nov 9, 2018
1c9021f
Merge branch 'master' of https://github.com/video-dev/hls.js into add…
ssreed Nov 9, 2018
56a357f
optimize and improve readability of capturing initData
ssreed Nov 10, 2018
ca9bcc3
fix unit test
ssreed Nov 10, 2018
49e22ca
remove unnecessary code
ssreed Nov 10, 2018
897257d
add documentation, add initDataTypes enum
ssreed Nov 13, 2018
177b1e7
fix functional test
ssreed Nov 13, 2018
61494eb
add key rotation support
Jan 23, 2019
32215cc
Merge branch 'master' into add-playready
ssreed Jan 28, 2019
e840bfb
fix unit test
ssreed Jan 28, 2019
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
46 changes: 46 additions & 0 deletions docs/API.md
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,11 @@
- [`abrBandWidthUpFactor`](#abrbandwidthupfactor)
- [`abrMaxWithRealBitrate`](#abrmaxwithrealbitrate)
- [`minAutoBitrate`](#minautobitrate)
- [`emeEnabled`](#emeenabled)
- [`licenseXhrSetup`](#licensexhrsetup)
- [`drmSystem`](#drmsystem)

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i m not sure we need that, or we need something different in terms of API.

at least you need to expose an enum on the API with the possible values, and/or document what values

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There could be a better way to do this but I was leaving it up to the consumer to figure out what type of DRM system is supported for a particular environment. So for example, if there was a manifest that is multi DRM, the client can choose their preferred system based on the browser/CDM.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, but as a common purpose project, our responsability is finding common denominator solutions with future proof APIs that will cover many possible use-cases.

For example what we should do is allow to configure a preference priority-list of DRM systems. Then, the key-systems are tried for existence on the platform in that order.

@tchakabam tchakabam Sep 28, 2018

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Btw such a config parameter is optional, isn'it? :) We can figure out inside our code if there is a DRM system that fits the ones in the media manifest.

So, what we really want in the end is to set a preferred system (or a prio list of), and the values in there would be the values of the key-system enum, right?

- [`widevineLicenseUrl`](#widevinelicenseurl)
- [`playreadyLicenseUrl`](#playreadylicenseurl)
- [Video Binding/Unbinding API](#video-bindingunbinding-api)
- [`hls.attachMedia(videoElement)`](#hlsattachmediavideoelement)
- [`hls.detachMedia()`](#hlsdetachmedia)
Expand Down Expand Up @@ -972,6 +977,47 @@ then if config value is set to `true`, ABR will use 2.5 Mb/s for this quality le
Return the capping/min bandwidth value that could be used by automatic level selection algorithm.
Useful when browser or tab of the browser is not in the focus and bandwidth drops

### `emeEnabled`

(default: `false`)

Whether or not to enable eme.

### `licenseXhrSetup`

(default: `undefined`)

`XMLHttpRequest` customization callback for default XHR based loader.

Parameter should be a function with two arguments `(xhr: XMLHttpRequest, url: string)`.
If `licenseXhrSetup` is specified, default loader will invoke it before calling `xhr.send()`.
This allows user to easily modify/setup XHR. See example below.

```js
var config = {
licenseXhrSetup: function(xhr, url) {
xhr.setRequestHeader('Content-Type', 'text/xml; charset=utf-8'); //indicate resource is xml
}
}
```

### `drmSystem`

(default: `undefined`)

Which DRM system use. (`WIDEVINE` or `PLAYREADY`)

### `widevineLicenseUrl`

(default: `undefined`)

Specify widevine license url.

### `playreadyLicenseUrl`

(default: `undefined`)

Specify playready license url.

## Video Binding/Unbinding API

Expand Down
2 changes: 2 additions & 0 deletions src/config.js
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,8 @@ export var hlsDefaultConfig = {
minAutoBitrate: 0, // used by hls
emeEnabled: false, // used by eme-controller
widevineLicenseUrl: undefined, // used by eme-controller
drmSystem: undefined, // used by eme-controller
playreadyLicenseUrl: undefined, // used by eme-controller
requestMediaKeySystemAccessFunc:
requestMediaKeySystemAccess // used by eme-controller
};
Expand Down
Loading