diff --git a/docs/tutorials/config.md b/docs/tutorials/config.md index eda71e334f..3a1da9f657 100644 --- a/docs/tutorials/config.md +++ b/docs/tutorials/config.md @@ -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 @@ -38,7 +42,10 @@ player.getConfiguration(); servers: Object manifest: Object dash: Object + hls: Object retryParameters: Object + playRangeEnd: Infinity + playRangeStart: 0 preferredAudioLanguage: "" preferredTextLanguage: "" restrictions: Object @@ -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: diff --git a/docs/tutorials/drm-config.md b/docs/tutorials/drm-config.md index de9d545d3f..3b9a4bfae5 100644 --- a/docs/tutorials/drm-config.md +++ b/docs/tutorials/drm-config.md @@ -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} @@ -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}. diff --git a/docs/tutorials/faq.md b/docs/tutorials/faq.md index 919161aedd..2a2ae7cc52 100644 --- a/docs/tutorials/faq.md +++ b/docs/tutorials/faq.md @@ -31,6 +31,26 @@ This can also happen with mixed-content restrictions. If the site is using
+**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). + +
+ **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 @@ -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 diff --git a/docs/tutorials/manifest-parser.md b/docs/tutorials/manifest-parser.md index 978d787568..4b6d1fab02 100644 --- a/docs/tutorials/manifest-parser.md +++ b/docs/tutorials/manifest-parser.md @@ -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: [] }; }; diff --git a/docs/tutorials/network-and-buffering-config.md b/docs/tutorials/network-and-buffering-config.md index 5dfc2257b5..584ea2f079 100644 --- a/docs/tutorials/network-and-buffering-config.md +++ b/docs/tutorials/network-and-buffering-config.md @@ -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