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

PIPELINE_ERROR_INVALID_STATE error when using Playready/Dash stream (mixed encrypted/unecrypted content) #1403

Open
adamtatur opened this issue Mar 13, 2024 · 3 comments

Comments

@adamtatur
Copy link

Hi,

We noticed an issue when integrating avod functionality with Playready/DASH streams. When provided manifest contains both encrypted and unencrypted periods player doesn't work properly.

  • use case 1: (unencrypted periods are played -> transition to encrypted periods)
    When trying to download new segments that are encrypted, the player returns the error:
    The player stopped because of an error MediaError: MediaError (MEDIA_ERR_DECODE) PIPELINE_ERROR_INVALID_STATE: MediaFoundationRenderer error: kCdmProxyReceivedInInvalidState (Error (0x13D) while retrieving error. (0x8004FA03)

  • use case 2: (encrypted periods are played -> transition to unencrypted periods)
    In this case, the player continues to play but the video turns green.

We checked both scenarios using Widevine/DASH configuration and everything works fine. The only thing that caught my eye was that the license fetching logic runs a few seconds before going to the encrypted parts than is the case with Playready/DASH.

Issue is presented using:

  • latest 3.x.x and 4.x.x player version
  • Microsoft Edge 122.0.2365.80
  • Win 10/11

Is there any know solution to circumvent this problem using the appropriate player configuration?

@peaBerberian
Copy link
Collaborator

peaBerberian commented Mar 19, 2024

Hi,

Interesting, we've heard by looking around some time ago of this type of problem when going from encrypted to unencrypted and vice-versa on PlayReady devices, but we've never really were able to reliably reproduce it (maybe it's also content-dependent?)

We have some old work we still maintain (we last rebased it last week) that create fake encryption metadata for initialization segments of clear Representation (408191e#diff-5182788b34332efc49b4a47fcd7ffa0af9e5698d8da035c5e8cade8e95b920ce) which is a trick we've for example seen on the shaka-player (we've never merged that development on our side as we've never really been able to reproduce the issue).

With a little work, I can make an RxPlayer version including it to see if that fixes the issue, then if it fixes this issue and seen as non-problematic with enough testing we might be able to include it in a future version.

@adamtatur
Copy link
Author

Hi,

Thanks. If this is not a problem we could check it on our side with provided RxPlayer version.

@peaBerberian
Copy link
Collaborator

peaBerberian commented Apr 23, 2024

Hi,

If it's still possible for you I updated and tested the fix/create-fake-encryption-init-segment branch. You can depend on its latest commit (which includes our build to simplify dependency on it), you can set in your package.json something like:

    "rx-player": "https://github.com/canalplus/rx-player.git#a74239e129904970c5b6497020b3f7dc38b0cb0a",

This will depend on the commit a74239e, which is currently the last commit of the fix/create-fake-encryption-init-segment branch

Can you test it to see if unencrypted/encrypted transitions (and vice-versa) works with it?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants