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

[2.8.0] DataView: expected ArrayBuffer, got Uint8Array #2687

Closed
boris-petrov opened this issue Jul 4, 2018 · 12 comments
Closed

[2.8.0] DataView: expected ArrayBuffer, got Uint8Array #2687

boris-petrov opened this issue Jul 4, 2018 · 12 comments

Comments

@boris-petrov
Copy link

This is a regression from 2.7.0:

at new DataView (<anonymous>)                                                                                                                     
at Function.getPSSHData (...)         
at Object.onKeyMessage (...)

I don't have exact lines, I could get them if needed. The error under Firefox is the one in the title, under Chrome is TypeError: First argument to DataView constructor must be an ArrayBuffer.

In this issue there is more information about our usecase (we use Clearkey encryption e.g.) - it hasn't changed since then.

Please tell me if you need more information.

@nicosang
Copy link
Contributor

nicosang commented Jul 5, 2018

Hi @boris-petrov ,

I 'd like to help you but I can't reproduce the issue with streams in dash.js reference page. Is it possible that you give us acces to one of your stream?

Nico

@boris-petrov
Copy link
Author

@nicosang - thanks for the answer! Can you try with the ones I've attached in this comment in the other thread that I linked please? They are the same as the ones we use (they are autogenerated with ffmpeg for test purposes).

@nicosang
Copy link
Contributor

nicosang commented Jul 5, 2018

@boris-petrov , could you, please, also share dash.js log messages? I don't have the same behavior that the one you described...

Thanks,

@nicosang
Copy link
Contributor

nicosang commented Jul 6, 2018

one more question for you @boris-petrov : do you use the call to setProtectionData function?

@boris-petrov
Copy link
Author

@nicosang - no, we don't use that particular function. We do exactly what I've written in this comment from the other thread. As for the log messages - I'll do that most likely on Monday. Thanks for the support!

@boris-petrov
Copy link
Author

boris-petrov commented Jul 9, 2018

@nicosang - here are the logs:

[5][MediaPlayer] [dash.js 2.8.0] MediaPlayer has been initialized
[6][Protection] EME detected on this user agent! (ProtectionModel_21Jan2015)
[8][MediaPlayer] Streaming Initialized
[12][MediaPlayer] Playback Initialized
[25][DashParser] Parsing complete: ( xml2json: 3.60ms, objectiron: 0.200ms, total: 0.00380s)
[32][ManifestUpdater] Manifest has been refreshed at Mon Jul 09 2018 13:58:34 GMT+0300 (Eastern European Summer Time)[1531133914.201]
[37][PlaybackController] Native video element event: play
[39][PlaybackController] Native video element event: waiting
[57][Stream] No text data.
[58][Stream] No fragmentedText data.
[58][Stream] No embeddedText data.
[58][Stream] No muxed data.
[58][Stream] No image data.
[102][BufferController][video] Init fragment finished loading saving to video's init cache
[105][ScheduleController][video] OnFragmentLoadingCompleted - Url: http://127.0.0.1:8081/some-url/drm%2Ftest-videoStream.mp4
[107][BufferController][audio] Init fragment finished loading saving to audio's init cache
[109][ScheduleController][audio] OnFragmentLoadingCompleted - Url: http://127.0.0.1:8081/some-url/drm%2Ftest-audioStream.mp4
[114][ProtectionController] DRM: KeySystem Access Granted (org.w3.clearkey)!  Selecting key system...
[116][PlaybackController] Native video element event: loadedmetadata
[120][ScheduleController][video] Top quality video index has changed from undefined to 0
[123][ScheduleController][audio] Top quality audio index has changed from undefined to 0
Error: [130][ProtectionKeyController] Failed to retrieve clearkeys from ProtectionData

Actually, now that I see, there is another error before the one I've specified in this issue thread - Failed to retrieve clearkeys from ProtectionData. Any ideas why that might be and what may have changed between 2.7.0 and 2.8.0?

@davemevans
Copy link
Contributor

davemevans commented Jul 9, 2018

Looks to me like that is caused by the debug.warn call in KeySystemW3CClearKey.getClearKeysFromProtectionData - there's no warn method on debug - a getLogger or similar is needed I imagine.

Would be useful if the catch in processClearKeyLicenseRequest logged the message from the exception.

@boris-petrov
Copy link
Author

So I am to understand that this indeed is a bug, right? Not some wrongdoing on my side?

@nicosang
Copy link
Contributor

nicosang commented Jul 9, 2018

There is indeed a small bug in the logger of KeySystemW3CClearKey. I'm fixing it....

@nicosang
Copy link
Contributor

nicosang commented Jul 9, 2018

@boris-petrov , could you, please, take a look at my PR? Does it fully fix your issue?

thanks,
Nico

@boris-petrov
Copy link
Author

@nicosang - yes, this branch fixes the issue.

@Murmur
Copy link

Murmur commented Jul 30, 2018

Please see this example player, I can use laurl for ClearkeyDRM system but kid:key option does not work. I have used a latest and nightly dash.js script. Is this fix still missing from the nightly build?

https://m.dtv.fi/dash/index_clearkey2b.html?video=21

mpd=https://m.dtv.fi/dash/dasherh264v2/drm/manifest_clearkey.mpd
kid=QyFWeBI0EjQSNBI0EjQSNA==
key=EjQSNBI0EjQSNBI0EjQSNA==

This one works fine using a ClearkeyDRM laurl option.
https://m.dtv.fi/dash/index_clearkey2.html?video=21

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

5 participants