Skip to content

Commit

Permalink
Update tutorials and add another FAQ entry.
Browse files Browse the repository at this point in the history
Closes #862
Closes #866
Closes #867

Change-Id: I8e97750ddc9851a9d893f0d9aadab234a1deb988
  • Loading branch information
TheModMaker authored and joeyparrish committed Jul 17, 2017
1 parent 4045253 commit 05aad5e
Show file tree
Hide file tree
Showing 5 changed files with 74 additions and 3 deletions.
12 changes: 11 additions & 1 deletion docs/tutorials/config.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,13 @@ player.getConfiguration();

=> Object
abr: Object
bandwidthDowngradeTarget: 0.95
bandwidthUpgradeTarget: 0.85
defaultBandwidthEstimate: 500000
enabled: true
manager: SimpleAbrManager
restrictions: Object
switchInterval: 8
abrFactory: Function
drm: Object
advanced: Object
clearKeys: Object
Expand All @@ -38,7 +42,10 @@ player.getConfiguration();
servers: Object
manifest: Object
dash: Object
hls: Object
retryParameters: Object
playRangeEnd: Infinity
playRangeStart: 0
preferredAudioLanguage: ""
preferredTextLanguage: ""
restrictions: Object
Expand All @@ -47,8 +54,11 @@ player.getConfiguration();
bufferingGoal: 10
ignoreTextStreamFailures: false
infiniteRetriesForLiveStreams: true
jumpLargeGaps: false
rebufferingGoal: 2
retryParameters: Object
smallGapLimit: 0.5
startAtSegmentBoundary: false


// set audio language preference to Canadian French:
Expand Down
37 changes: 37 additions & 0 deletions docs/tutorials/drm-config.md
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,21 @@ player.configure({
[license format]: https://w3c.github.io/encrypted-media/#clear-key-license-format


#### EME and http URLs

EME requires a secure URL to use. This means you have to use `https` or be on
`localhost`. Currently only Chrome enforces it, but other browsers will in the
future. Also, because of mixed content requirements, if your site is using
`https`, then your manifest and every segment will also need to use `https` too.

See: Chrome's [announcement][], Firefox's [intent to remove][firefox_bug], and
how to [disable for testing][allow_http].

[allow_http]: https://www.chromium.org/Home/chromium-security/deprecating-powerful-features-on-insecure-origins
[announcement]: https://groups.google.com/a/chromium.org/forum/#!msg/blink-dev/tXmKPlXsnCQ/ptOETCUvBwAJ
[firefox_bug]: https://bugzilla.mozilla.org/show_bug.cgi?id=1322517


#### Advanced DRM Configuration

We have several {@link shakaExtern.AdvancedDrmConfiguration advanced options}
Expand All @@ -119,6 +134,28 @@ player.configure({
If you don't need them, you can leave these at their default settings.


#### Robustness

Robustness refers to how securely the content is handled by the key system. This
is a key-system-specific string that specifies the requirements for successful
playback. Passing in a higher security level than can be supported will cause
`player.load()` to fail with `REQUESTED_KEY_SYSTEM_CONFIG_UNAVAILABLE`. The
default is the empty string, which is the lowest security level supported by the
key system.

Each key system has their own values for robustness. The values for Widevine
are well-known (see the [Chromium sources][]) and listed below, but
values for other key systems are not known to us at this time.

[Chromium sources]: https://cs.chromium.org/chromium/src/components/cdm/renderer/widevine_key_system_properties.h?q=SW_SECURE_CRYPTO&l=22

- `SW_SECURE_CRYPTO`
- `SW_SECURE_DECODE`
- `HW_SECURE_CRYPTO`
- `HW_SECURE_DECODE`
- `HW_SECURE_ALL`


#### Continue the Tutorials

Next, check out {@tutorial license-server-auth}.
22 changes: 22 additions & 0 deletions docs/tutorials/faq.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,26 @@ This can also happen with mixed-content restrictions. If the site is using

<hr>

**Q:** I am getting `REQUESTED_KEY_SYSTEM_CONFIG_UNAVAILABLE` or error code 6001.

**A:** Check that your platform/browser actually supports the key system. If
your manifest contains only Playready, it will need to be played on IE/Edge, a
Chromecast, or some smart TVs. Also check the `drm.advanced` configuration for
the key system. If you are passing a non-empty robustness, it may not be
supported by your patform. See the [DRM tuturial][drm_tutorial] for more info.

Also, to use EME requires using a secure origin. This means using `https` or
be on `localhost`. Currently only Chrome enforces this, but other browsers
will in the future. See the [announcement][eme_https] for more info.

This will also happen if you use `Storage` to store protected content (when
`usePersistentLicense` is true). Currently, the only Chromebooks support
persistent licenses. On other platforms, you can only store clear content or
store only the content offline (i.e. set `usePersistentLicense` configuration to
false).

<hr>

**Q:** I am getting `LICENSE_REQUEST_FAILED` or error code 6007.

**A:** See `HTTP_ERROR`. If you are getting a bad HTTP status, the server
Expand Down Expand Up @@ -104,4 +124,6 @@ these initial decisions.
[StreamingConfiguration]: https://shaka-player-demo.appspot.com/docs/api/shakaExtern.html#StreamingConfiguration
[auth]: https://shaka-player-demo.appspot.com/docs/api/tutorial-license-server-auth.html
[buffering]: https://shaka-player-demo.appspot.com/docs/api/tutorial-network-and-buffering-config.html
[drm_tutorial]: https://shaka-player-demo.appspot.com/docs/api/tutorial-drm-config.html
[eme_https]: https://sites.google.com/a/chromium.org/dev/Home/chromium-security/deprecating-powerful-features-on-insecure-origins
[wrapping]: https://shaka-player-demo.appspot.com/docs/api/tutorial-license-wrapping.html
4 changes: 3 additions & 1 deletion docs/tutorials/manifest-parser.md
Original file line number Diff line number Diff line change
Expand Up @@ -306,10 +306,12 @@ MyManifestParser.prototype.loadStream_ = function(type) {
encrypted: false,
keyId: null,
language: 'en',
label: 'my_stream',
type: type,
primary: false,
trickModeVideo: null,
containsEmsgBoxes: false
containsEmsgBoxes: false,
roles: []
};
};

Expand Down
2 changes: 1 addition & 1 deletion docs/tutorials/network-and-buffering-config.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ identical:
```js
retryParameters: {
timeout: 0, // timeout in ms, after which we abort a request; 0 means never
maxAttempts: 1, // the maximum number of requests before we fail
maxAttempts: 2, // the maximum number of requests before we fail
baseDelay: 1000, // the base delay in ms between retries
backoffFactor: 2, // the multiplicative backoff factor between retries
fuzzFactor: 0.5, // the fuzz factor to apply to each retry delay
Expand Down

0 comments on commit 05aad5e

Please sign in to comment.