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

Bug: Encrypted event missing event properties #914

Closed
1 task done
jakubslambor opened this issue May 2, 2024 · 2 comments
Closed
1 task done

Bug: Encrypted event missing event properties #914

jakubslambor opened this issue May 2, 2024 · 2 comments
Labels
bug Something isn't working Status: Unconfirmed A potential issue that we haven't yet confirmed as a bug

Comments

@jakubslambor
Copy link

Is there an existing issue for this?

  • I have searched the existing issues

Which Mux Elements/Packages does this apply to? Select all that apply

mux-video

Which browsers are you using?

Chrome, Safari, Safari on iOS

Which operating systems are you using?

macOS

Description

While implementing DRM, I needed to call the HTMLMediaElement: encrypted event; however, upon callback, the event is missing the MediaEncryptedEvent.initDataTypeand MediaEncryptedEvent.initData event properties, which I need in order to finish the implementation. Can this be looked into? 🙏

P.S. I can see that there is work being done on native DRM, that is awesome! However, for now I can do it myself, but not without the proper callback. Thanks!

Reduced test case

No response

Steps to reproduce

  1. <mux-video>.addEventListener('encrypted', async (event) => await handleEncrypted(event, assetId));
const handleEncrypted = async (event: MediaEncryptedEvent, assetId: string) => {
  try {
    console.log('Encrypted event:', event);
    const initDataType = event.initDataType;
    if (initDataType !== 'skd') {
      console.error(`Received unexpected initialization data type "${initDataType}"`);
      return;
    }

...
  1. Result in Safari console:
    CleanShot 2024-05-02 at 16 06 33@2x

Current Behavior

initDataType and initData are not included in video->encrypted callback

Expected Behavior

initDataType and initData should be included in the event

Errors

No response

What version of the package are you using?

v0.18.0

@jakubslambor jakubslambor added bug Something isn't working Status: Unconfirmed A potential issue that we haven't yet confirmed as a bug labels May 2, 2024
@vojkny
Copy link

vojkny commented May 3, 2024

@cjpillsbury could you 🙏 have a look here

@jakubslambor
Copy link
Author

Ok, I managed to get around this, and in any case this is super specific so I think we can wait for #905 without this being resolved 🙏 closing

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working Status: Unconfirmed A potential issue that we haven't yet confirmed as a bug
Projects
None yet
Development

No branches or pull requests

2 participants