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

Fix error 4012 RESTRICTIONS_CANNOT_BE_MET for webOS TV platform #2513

Merged
merged 1 commit into from
Apr 24, 2020

Conversation

dong-heun
Copy link
Contributor

For webOS TV 2020 platform, like for Tizen, key IDs should not be
transformed to big-endian UUIDs, it causes 4012 RESTRICTIONS_CANNOT_BE_MET error.

Issue #2512

@avelad
Copy link
Member

avelad commented Apr 20, 2020

This change breaks WebOS 3.5, WebOS 4.0, and WebOS 4.5, so the change should verify that the platform is WebOS 5.0 or higher.

@avelad
Copy link
Member

avelad commented Apr 20, 2020

Suggestion, You can make it configurable and add a default like https://github.com/google/shaka-player/blob/master/lib/util/player_configuration.js#L131-L136 , What do you think?

@dong-heun
Copy link
Contributor Author

dong-heun commented Apr 20, 2020

@avelad Thank you for comments.

I am an engineer responsible for webOS media/cdm related interfaces.

The key-id information is provided through MediaKeySession.keyStatuses, which is supported from the 2020 model(webOS 5.0). So, without this patch, the error will not occur on older platforms.

Therefore, the above change does not affect other versions of webOS.
(When testing against the previous version, there were no special problems.)

In my opinion, the above fix would be enough.

@avelad
Copy link
Member

avelad commented Apr 20, 2020

Two months ago I tried this on the televisions we have in our lab and it didn't work. I wish I could test this in our lab, but for a month I will not have access to it due to COVID-19.

I think the solution of putting it in a player configuration would be better, in case some platform does not work, it can at least change to the previous behavior without having to touch the code, what do you think?

@dong-heun
Copy link
Contributor Author

"Two months ago I tried this on the televisions we have in our lab and it didn't work." =>
PlayReady is supported on web base cp engine. Web Browser is supported only widevine.
Do you know that? So I already tested some old platforms.
I already commented that we didn't supported key id map on old platforms.
So shaka-player can not check missing key.

"I think the solution of putting it in a player configuration would be better, in case some platform does not work, it can at least change to the previous behavior without having to touch the code, what do you think?" =>
Adding the player config seems to be the same as a result.

So you mean suggesting additional parameters to the shaka.extern.DrmConfiguration?

@avelad
Copy link
Member

avelad commented Apr 20, 2020

I can tell you that we have a client in production in Bolivia working with PlayReady with WebOS 3.5, 4.0 and 4.5 using ShakaPlayer 2.5.6

Putting it in the configuration file produces the same result, but allows clients to override the default value.

So you mean suggesting additional parameters to the shaka.extern.DrmConfiguration?

Yes

@dong-heun
Copy link
Contributor Author

For the 4012 error, we confirmed that there were no problems with 4.0 / 4.5 / 5.0. (by modified version 2.5.9)
On the rest of the platforms, it seems to be another issue.

However, even if you update the exception-handling part in the key-id, there will be no problem.

Like Tizen and other platforms, I want to handle exceptions.

@avelad
Copy link
Member

avelad commented Apr 20, 2020

Okay, well then I agree to your change.

Copy link
Member

@joeyparrish joeyparrish left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm going to run tests, but I don't expect any issue from this change.

@joeyparrish
Copy link
Member

@dong-heun, is there anything else needed to close issue #2512? Or is this everything that was missing for PlayReady support on 2020 WebOS devices?

@shaka-bot
Copy link
Collaborator

Test Failure:

Generating Closure dependencies...
Linting JavaScript...
Linting CSS...
Linting HTML...

Config loaded: /var/lib/jenkins/workspace/Manual PR Test (local-tests)/.htmlhintrc

Config loaded: /var/lib/jenkins/workspace/Manual PR Test (local-tests)/.htmlhintrc

Config loaded: /var/lib/jenkins/workspace/Manual PR Test (local-tests)/.htmlhintrc

Scanned 3 files, no errors found (51 ms).
Checking that the build files are complete...
Checking for common misspellings...
Checking correct usage of eslint-disable...
Checking the tests for type errors...
No changes detected, skipping. Use --force to override.
WARNING: An illegal reflective access operation has occurred
WARNING: Illegal reflective access by com.google.protobuf.UnsafeUtil (file:/var/lib/jenkins/workspace/Manual%20PR%20Test%20(local-tests)/third_party/closure/compiler.jar) to field java.nio.Buffer.address
WARNING: Please consider reporting this to the maintainers of com.google.protobuf.UnsafeUtil
WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access operations
WARNING: All illegal access operations will be denied in a future release
/var/lib/jenkins/workspace/Manual PR Test (local-tests)/lib/media/drm_engine.js:1330: ERROR - Property isWeb0S never defined on shaka.util.Platform
!shaka.util.Platform.isWeb0S()) {
^^^^^^^

1 error(s), 0 warning(s), 90.3% typed
Build failed
END-BUILD: FAILURE
Build step 'Execute shell' marked build as failure

@@ -1326,7 +1326,8 @@ shaka.media.DrmEngine = class {
if (this.currentDrmInfo_.keySystem == 'com.microsoft.playready' &&
keyId.byteLength == 16 &&
!shaka.util.Platform.isTizen() &&
!shaka.util.Platform.isVideoFutur()) {
!shaka.util.Platform.isVideoFutur() &&
!shaka.util.Platform.isWeb0S()) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this supposed to have a zero in it instead of the letter O? Now I'm concerned about whether or not your solution works, since it doesn't look like you could have tested it with this typo in it.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@joeyparrish
We were mistaken for the value of the userAgent we use.
We will update the patch.

Sorry.

@dong-heun
Copy link
Contributor Author

@avelad Thank you for agreeing with my opinion.
@joeyparrish Thank you for comments. I modified my patch.

@dong-heun
Copy link
Contributor Author

dong-heun commented Apr 22, 2020

@joeyparrish
"is there anything else needed to close issue #2512? Or is this everything that was missing for PlayReady support on 2020 WebOS devices?"
=> This is for PlayReady support on 2020 WebOS devices.

As already explained above, key-id exception handling for IE11 is not required on webOS platform.
Also, since it does not provide key status information for previous platforms, the corresponding IE11 exception handling is not required.

Again, it would be nice if it could be handled with other possible platforms (Tizen, VideoFutur).
Thanks for comments.

@shaka-bot
Copy link
Collaborator

Test Failure:

Chrome 81.0.4044 (Linux 0.0.0)
  Standard Output:
    Chrome 81.0.4044 (Linux 0.0.0) ERROR
      Disconnected, because no message in 300000 ms.
    ,Chrome 81.0.4044 (Linux 0.0.0) ERROR
      Disconnected, because no message in 300000 ms.
Failed 0 tests, passed 1065, skipped 3

@joeyparrish
Copy link
Member

This failure is caused by buggy tests that we recently fixed. @dong-heun, can you please rebase your change so we can re-run the tests? Thanks!

For webOS TV 2020 platform, like for Tizen, key IDs should not be
transformed to big-endian UUIDs, it causes `4012
RESTRICTIONS_CANNOT_BE_MET` error.

Issue shaka-project#2512
@dong-heun
Copy link
Contributor Author

This failure is caused by buggy tests that we recently fixed. @dong-heun, can you please rebase your change so we can re-run the tests? Thanks!

I have done rebase. Thank you.

@shaka-bot
Copy link
Collaborator

All tests passed!

@joeyparrish joeyparrish merged commit ebae115 into shaka-project:master Apr 24, 2020
joeyparrish pushed a commit that referenced this pull request May 1, 2020
)

For webOS TV 2020 platform, like for Tizen, key IDs should not be
transformed to big-endian UUIDs, it causes `4012
RESTRICTIONS_CANNOT_BE_MET` error.

Backported to v2.5.x

Closes #2512

Change-Id: Id0eab790bf8ecaf7249acb92db8ab8d976e7bae6
@github-actions github-actions bot added the status: archived Archived and locked; will not be updated label Jul 25, 2023
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jul 25, 2023
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
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants