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

Windows 10 pro+ Edge 17 + CENC PlayReady + scrambled playback #1438

Closed
KameshDevarakonda opened this issue May 11, 2018 · 6 comments
Closed
Assignees
Labels
status: archived Archived and locked; will not be updated type: enhancement New feature or request
Milestone

Comments

@KameshDevarakonda
Copy link

Have you read the FAQ and checked for duplicate open issues?: Yes.

What version of Shaka Player are you using?: v2.3.7-uncompiled

Can you reproduce the issue with our latest release version?: Yes

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

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?: N/A

What browser and OS are you using?: Microsoft Edge 42.17134.1.0, EdgeHTML 17.17134, Windows 10 Pro

What are the manifest and license server URIs?:
Sent to shaka-player-issues@google.com

What did you do?
I was trying to verify the fix for https://developer.microsoft.com/en-us/microsoft-edge/platform/issues/14593018/

What did you expect to happen?
Smooth playback

What actually happened?
I was trying to verify the fix for https://developer.microsoft.com/en-us/microsoft-edge/platform/issues/14593018/ and observed weird playback due to decryption failure (I think). Same stream plays smoothly on Dash.js. This is CENC content.

@TheModMaker
Copy link
Contributor

The problem is that your manifest uses some XML namespace logic we don't support. XML supports namespaces, but these namespaces can have different simple names but refer to the same thing. Plus, you can specify the namespace in multiple ways. For example, we look for an element <cenc:pssh> which contains the pssh box for the content. But your manifest uses <pssh xmlns="urn:mpeg:cenc:2013">, which I think is valid. Your manifest also specifies xmlns:_="urn:mpeg:cenc:2013" _:default_KID="foobar, which is basically giving the cenc namespace a different name. We look for cenc:default_KID, rather than using more generic namespace resolution.

So a fix would be to generate the manifest without this namespace logic; but we should update our manifest parser to account for XML namespaces better.

We are also not getting an encrypted event from the browser that tell us the media is encrypted. So we never make the license request. It seems weird that the browser tries to play the content while it doesn't have the keys.

@TheModMaker TheModMaker added type: enhancement New feature or request and removed needs triage labels May 14, 2018
@TheModMaker TheModMaker added this to the Backlog milestone May 14, 2018
@joeyparrish
Copy link
Member

Some content providers are moving toward having PSSHs in the manifest only, and not in the content. This would explain the lack of 'encrypted' event.

Has MediaKeys been attached to the video element? If MediaKeys has been attached to the video element, I would expect the browser to stop when it found encrypted content with no matching key. But perhaps Edge doesn't behave like others.

@TheModMaker
Copy link
Contributor

MediaKeys has been attached, and the media does include pssh boxes. We also don't get a waitingforkey event.

@TheModMaker TheModMaker modified the milestones: Backlog, v2.4 May 17, 2018
@TheModMaker TheModMaker self-assigned this May 17, 2018
@TheModMaker
Copy link
Contributor

Good news, I've looked into this more, and the XML fixes will be easy to add. So I will add it to v2.4.

Bad news, your asset still won't play with the above fix due to an Edge bug. It may be related to the bug you linked or to https://developer.microsoft.com/en-us/microsoft-edge/platform/issues/12658991/. Basically Edge is choking because the first Period is "fully" clear and the second is encrypted with a clear lead. For some reason, the encryption info in the second Period is being ignored and Edge thinks it is fully clear (hence the decoder problems).

If you start playback at 60 seconds, the content plays fine on the latest release, and we get the encrypted event as expected. You can add startTime=60 to the URL to set the start time in the demo.
I'll look into this more and probably file a bug on Edge.

The reason it works on Dash.js is because they reset MediaSource for each Period. We don't do this to provide smooth playback, but Edge doesn't seem to play the content if we do this.

@TheModMaker
Copy link
Contributor

The XML namespace problem has been fixed. But as I mentioned, your asset still won't play due to a bug in Edge. I also noticed that Firefox doesn't play this as well, so I filed a bug on Firefox (https://bugzilla.mozilla.org/show_bug.cgi?id=1463213). Filing a bug on Edge would be a bit harder since we don't have any easy-to-use PlayReady content to give as part of the repro. But if you file a bug on Edge, please tell us about it so we can follow along.

joeyparrish pushed a commit that referenced this issue May 22, 2018
XML allows namespace names to be any string.  So instead of looking
for the literal name 'cenc:pssh', we should be looking for the 'pssh'
name in the correct namespace.

Backported to v2.4.x

Closes #1438

Change-Id: I724db3b7f0e60b4233b0fc40b1ed57698c6ce9ce
joeyparrish pushed a commit that referenced this issue May 22, 2018
XML allows namespace names to be any string.  So instead of looking
for the literal name 'cenc:pssh', we should be looking for the 'pssh'
name in the correct namespace.

Backported to v2.3.x

Closes #1438

Change-Id: I724db3b7f0e60b4233b0fc40b1ed57698c6ce9ce
@joeyparrish
Copy link
Member

The XML namespace fix will appear in v2.3.8 and v2.4.0 this week.

@shaka-project shaka-project locked and limited conversation to collaborators Jul 20, 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: enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

4 participants