Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Shaka Player Tutorial DRM COntent Fails to Play #928

Closed
NeilHollingum opened this issue Jul 17, 2017 · 5 comments
Closed

Shaka Player Tutorial DRM COntent Fails to Play #928

NeilHollingum opened this issue Jul 17, 2017 · 5 comments
Assignees
Labels
status: archived Archived and locked; will not be updated type: docs Improvements or fixes to documentation
Milestone

Comments

@NeilHollingum
Copy link

I have read the FAQs and they do not help.
I am trying to run the Shaka player DRM tutorials with version of Shaka from Git Hub loaded on 7th July.
I am running on Chrome Browser and have tried on Windows 7 and Windows 10 with same results.

My Java Script as per tutorial for License Server Authentication:-

// myapp3.js
var manifestUri = '//storage.googleapis.com/shaka-demo-assets/sintel-widevine/dash.mpd';
var licenseServer = '//cwip-shaka-proxy.appspot.com/no_auth';

function initApp() {
// Install built-in polyfills to patch browser incompatibilities.
shaka.polyfill.installAll();

// Check to see if the browser supports the basic APIs Shaka needs.
if (shaka.Player.isBrowserSupported()) {
// Everything looks good!
initPlayer();
} else {
// This browser does not have the minimum set of APIs we need.
console.error('Browser not supported!');
}
}

function initPlayer() {
// Create a Player instance.
var video = document.getElementById('video');
var player = new shaka.Player(video);

// Attach player to the window to make it easy to access in the JS console.
window.player = player;

// Listen for error events.
player.addEventListener('error', onErrorEvent);

player.getNetworkingEngine().registerRequestFilter(function(type, request) {
// Only add headers to license requests:
if (type == shaka.net.NetworkingEngine.RequestType.LICENSE) {
  // This is the specific header name and value the server wants:
  request.headers['CWIP-Auth-Header'] = 'VGhpc0lzQVRlc3QK';
}

});

player.configure({
drm: {
  servers: { 'com.widevine.alpha': licenseServer }
}

});

// Try to load a manifest.
// This is an asynchronous process.
player.load(manifestUri).then(function() {
// This runs if the asynchronous load is successful.
console.log('The video has now been loaded!');
}).catch(onError); // onError is executed if the asynchronous load fails.
}

function onErrorEvent(event) {
// Extract the shaka.util.Error object from the event.
onError(event.detail);
}

function onError(error) {
// Log the error.
console.error('Error code', error.code, 'object', error);
}

Ran the Web Page:-

<script src="third_party/closure/goog/base.js"></script> <script src="dist/deps.js"></script> <script src="shaka-player.uncompiled.js"></script>
<!-- Your application source: -->
<script src="myapp3.js"></script>

I expected the vidoe to play but got error code 6001

"Error code 6001 object shaka.util.Error {severity: 2, category: 6, code: 6001, data: Array(0), message: "Shaka Error DRM.REQUESTED_KEY_SYSTEM_CONFIG_UNAVAILABLE ()"…}
onError @ myapp3.js:61"

Can Anybody help ?

@joeyparrish joeyparrish self-assigned this Jul 17, 2017
@joeyparrish joeyparrish added the type: question A question from the community label Jul 17, 2017
@joeyparrish
Copy link
Member

If you look up the docs for error code 6001, you'll see this:

None of the requested key system configurations are available. This may happen under the following conditions:

  • The key system is not supported.
  • The key system does not support the features requested (e.g. persistent state).
  • A user prompt was shown and the user denied access.
  • The key system is not available from unsecure contexts. (ie. requires HTTPS) See https://goo.gl/EEhZqT.

This last point is probably the one affecting you.

In the nightly build, we have added a section to the DRM config tutorial called "EME and http URLs", which says this:

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, and how to disable for testing.

I think this should be called out more explicitly at the top of each DRM-related tutorial. Would this help?

@joeyparrish joeyparrish added type: docs Improvements or fixes to documentation and removed type: question A question from the community labels Jul 17, 2017
@joeyparrish joeyparrish added this to the v2.2.0 milestone Jul 17, 2017
joeyparrish added a commit that referenced this issue Jul 17, 2017
 - Move the note about EME and HTTP to the top of the DRM config
   tutorial
 - Reference this note in both the server authentication and license
   wrapping tutorials

Closes #928

Change-Id: Ibb47053c6ce5db1e1b120e0bb810c1f9f9069a82
@joeyparrish
Copy link
Member

I moved some things around in the docs to make this more clear. The changes to the docs have been cherry-picked and will be released in v2.1.5. Please let me know if this helps.

@NeilHollingum
Copy link
Author

NeilHollingum commented Jul 18, 2017 via email

@joeyparrish
Copy link
Member

Glad we could help!

@NeilHollingum
Copy link
Author

NeilHollingum commented Jul 19, 2017 via email

@shaka-project shaka-project locked and limited conversation to collaborators Mar 22, 2018
@shaka-bot shaka-bot added the status: archived Archived and locked; will not be updated label Apr 15, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
status: archived Archived and locked; will not be updated type: docs Improvements or fixes to documentation
Projects
None yet
Development

No branches or pull requests

3 participants