Dash.js: [2.8.0] DataView: expected ArrayBuffer, got Uint8Array

Created on 4 Jul 2018  路  12Comments  路  Source: Dash-Industry-Forum/dash.js

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.

Most helpful comment

@nicosang - yes, this branch fixes the issue.

All 12 comments

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

@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).

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

Thanks,

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

@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!

@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?

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.

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

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

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

thanks,
Nico

@nicosang - yes, this branch fixes the issue.

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

Was this page helpful?
0 / 5 - 0 ratings

Related issues

bbert picture bbert  路  5Comments

mihaiav picture mihaiav  路  5Comments

yogevNisim picture yogevNisim  路  3Comments

AxelDelmas picture AxelDelmas  路  6Comments

fvalleeHbbTV picture fvalleeHbbTV  路  3Comments