videojs / videojs-contrib-eme

Supports Encrypted Media Extensions for playback of encrypted content in Video.js
Other
200 stars 71 forks source link

Issue while playing back fair play content (non legacy) in safari #224

Open TcT2k opened 2 months ago

TcT2k commented 2 months ago

The mock encrypted event inside initializeMediaKeys does have null initData. When getSupportedKeySystem() is called this results in an null is not an object (evaluating 'arrayBuffer2.byteLength') exception.

I think the following line in src/plugin.js line should have it's if condition reversed, so that null init data is correctly handled before calling hasSession() with the nullvalue.

https://github.com/videojs/videojs-contrib-eme/blob/8820c09cb8352c57f3a4c1125c54463b8a4ae318/src/plugin.js#L83