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

Live + AES javascript error - Uncaught TypeError: Cannot read properties of undefined (reading 'slice') #1348

Open
ChoOo7 opened this issue Nov 15, 2022 · 2 comments

Comments

@ChoOo7
Copy link

ChoOo7 commented Nov 15, 2022

Description

I'm playing an HLS stream encoded with AES symetric key
(Azure Media services live with AES enabled)
When the videojs player try to switch to another bandwidth (by user interaction or network bandwidth evolution) there is a javascript error here :

if (key.bytes.slice) {

Uncaught TypeError: Cannot read properties of undefined (reading 'slice')
after that, the player is frozen and is not usable anymore

adding a console.log show key.bytes is undefined
adding and early return here to prevent error remove the error, but the player stay unuseable

Sorry, I can't let a test case opened because a live streaming cost money.

The videojs version is the latest one : 7.21.0
The bug is always reproduced in the described scenario

On VOD (video on demand, not live scenario) the bug is NOT reproduced

Sources

if (key.bytes.slice) {

key.bytes is undefined

Steps to reproduce

Create a videojs player playing a multi-stream HLS AES secured stream, and change played bandwidth

Results

Expected

Playing well, without error

Error output

VideoPlayer.js?9e5f:345 error TypeError: Cannot read properties of undefined (reading 'slice')
at decrypt (video.es.js?f0e2:42462:1)
at eval (video.es.js?f0e2:42654:1)
at eval (video.es.js?f0e2:42150:1)
at callbackWrapper (video.es.js?f0e2:31135:1)
at Object.eval [as callback] (video.es.js?f0e2:31160:1)
at cbOnce (index.js?3603:104:1)
at XMLHttpRequest.loadFunc (index.js?3603:178:1)

Additional Information

Please include any additional information necessary here. Including the following:

videojs-http-streaming version

what version of videojs-http-streaming does this occur with?
videojs-http-streaming 2.15.0 according to video.js sources

videojs version

videojs 7.21.0

Browsers

what browsers are affected? please include browser and version for each
chrome Version 107.0.5304.107 (Build officiel) (64 bits)

Platforms

what platforms are affected? please include operating system and version or device and version for each
Window 10

Other Plugins

are any other videojs plugins being used on the page? If so, please list them with version below.
yes

Other JavaScript

are you using any other javascript libraries or frameworks on the page? if so please list them below.
no

@welcome
Copy link

welcome bot commented Nov 15, 2022

👋 Thanks for opening your first issue here! 👋

If you're reporting a 🐞 bug, please make sure you include steps to reproduce it. We get a lot of issues on this repo, so please be patient and we will get back to you as soon as we can.
To help make it easier for us to investigate your issue, please follow the contributing guidelines.

@ChoOo7
Copy link
Author

ChoOo7 commented Nov 15, 2022

Hello
Bug occures on live & vod, sorry
The bug depends on the HLS format used
https://learn.microsoft.com/fr-fr/azure/media-services/latest/encode-dynamic-packaging-concept
it's okay with HLS V4 but it's not with HLS CMAF

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

No branches or pull requests

2 participants