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

Chromecast + PlayReady - No variant tracks available #1070

Closed
ghost opened this issue Oct 17, 2017 · 7 comments
Closed

Chromecast + PlayReady - No variant tracks available #1070

ghost opened this issue Oct 17, 2017 · 7 comments
Assignees
Labels
status: archived Archived and locked; will not be updated type: bug Something isn't working correctly
Milestone

Comments

@ghost
Copy link

ghost commented Oct 17, 2017

Have you read the FAQ and checked for duplicate issues: yes

What version of Shaka Player are you using: v2.2.2

Can you reproduce the issue with our latest release version: yes

Can you reproduce the issue with the latest code from master: yes

Are you using the demo app or your own custom app: demo app

If custom app, can you reproduce the issue using our demo app:

What browser and OS are you using: macOS High Sierra, Chrome(cast)

What are the manifest and license server URIs: https://shaka-player-demo.appspot.com/demo/#asset=//demo.unified-streaming.com/video/tears-of-steel/tears-of-steel-dash-playready.ism/.mpd;lang=en-US;logtoscreen;debug

What did you do?

  1. Open https://shaka-player-demo.appspot.com/demo/#asset=//demo.unified-streaming.com/video/tears-of-steel/tears-of-steel-dash-playready.ism/.mpd;lang=en-US;logtoscreen;debug

  2. Initiate a chromecast session

  3. Look under Info and see that 'audio languages' and 'Video+audio track combinations' is empty

What did you expect to happen?
'Video+audio track combinations' and 'audio languages' should contain variant track information

What actually happened?
No variant track information was shown

I've tried to track down the issue and I found thatshaka.Player.prototype.onKeyStatus_ is setting all variant.allowedByKeySystem to false.

@TheModMaker
Copy link
Contributor

I see some errors in the console which may be causing the track list to not get updated. I saw a change recently to fix some issues, so it may be fixed on master (but the receiver hasn't been updated to match). @theodab since you have been working on Chromecast recently and have fixed those bugs, can you take a look?

@TheModMaker TheModMaker added type: bug Something isn't working correctly and removed needs triage labels Oct 19, 2017
@theodab
Copy link
Collaborator

theodab commented Oct 19, 2017

Reproduced on macOS Sierra 10.12.6, with the nightly build and the newest receiver.

The changes to receiver were mostly to fix error handling when casting. It looks like this is causing a 4012 error (MANIFEST.RESTRICTIONS_CANNOT_BE_MET), and the messed-up error handling was just kind of hiding that error.
The stack trace is
Error: Shaka Error MANIFEST.RESTRICTIONS_CANNOT_BE_MET () at new shaka.util.Error (https://casttest-dot-shaka-player-demo.appspot.com/lib/util/error.js:72:13) at shaka.Player.chooseVariant_ (https://casttest-dot-shaka-player-demo.appspot.com/lib/player.js:2385:19) at shaka.Player.chooseStreamsAndSwitch_ (https://casttest-dot-shaka-player-demo.appspot.com/lib/player.js:2434:28) at shaka.Player.onKeyStatus_ (https://casttest-dot-shaka-player-demo.appspot.com/lib/player.js:2832:10) at shaka.media.DrmEngine.processKeyStatusChanges_ (https://casttest-dot-shaka-player-demo.appspot.com/lib/media/drm_engine.js:1329:25) at .<anonymous> (https://casttest-dot-shaka-player-demo.appspot.com/lib/util/timer.js:35:5)
So it looks like there's a problem choosing a variant while handling a key status change. I'll look into it more.

@joeyparrish
Copy link
Member

It could be that we're lacking key statuses on PlayReady on Chromecast. Just a guess.

@joeyparrish joeyparrish added this to the v2.3.0 milestone Nov 6, 2017
@joeyparrish
Copy link
Member

I am unable to reproduce a 4012 error with the latest code, but I can reproduce the original problem description (empty track list on the sender side).

It appears that there is some timing issue with the cast proxy. If I tell the demo to reload the track list from the proxy by executing shakaDemo.onTracksChanged_(), everything works. So the event that is tied to that is either not being sent or is being sent at the wrong time.

@joeyparrish joeyparrish assigned joeyparrish and unassigned theodab Dec 8, 2017
@joeyparrish
Copy link
Member

Now I am seeing error 4012. The order of things seems to be:

  1. A 'trackschanged' event from the receiver
  2. A track list from the receiver with 10 tracks
  3. An error event from the receiver with error 4012
  4. An updated track list which is empty
  5. Another 'trackschanged' event from the receiver

So the events and proxying seem to be correct. This may, in fact, be an issue with key statuses.

@joeyparrish
Copy link
Member

There is a key status event from the PlayReady CDM on Chromecast, but no actual key statuses.

We should be able to fix it.

joeyparrish added a commit that referenced this issue Dec 18, 2017
For some platforms and CDMs, such as PlayReady on Chromecast, there
are no key statuses.  We still get a key status event, but there is
not even a synthetic key ID.  In these cases, do not restrict tracks,
as that would result in a 4012 error (RESTRICTIONS_CANNOT_BE_MET).

Closes #1070

Change-Id: Ib3a853418629433cc9be491a0cf7981dd41a3f59
@joeyparrish
Copy link
Member

The fix has been cherry-picked for v2.2.9.

@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: bug Something isn't working correctly
Projects
None yet
Development

No branches or pull requests

4 participants