-
Notifications
You must be signed in to change notification settings - Fork 434
Open
Labels
Description
We have many errors in the Sentry, which looks like this
{
message: Cannot read properties of undefined (reading 'duration'),
name: TypeError,
stack:
TypeError: Cannot read properties of undefined (reading 'duration')
at Tf (.../player.js:188:3879)
at CD.getExpiredTime (.../player.js:218:3581)
at WD.stuckAtPlaylistEnd_ (.../player.js:218:45386)
at kh.<anonymous> (.../player.js:218:37265)
at i.dispatcher.i.dispatcher (.../player.js:23:40858)
at Qh (.../player.js:23:41677)
at kh.trigger (.../player.js:23:43393)
at kh.haveMetadata (.../player.js:188:17321)
at .../player.js:188:15997
at Z_ (.../player.js:188:25260)
}
Unfortunately I cannot say conditions for this issue, I've never seen it in dev environment, but it is very frequent (in fact, this is the most repeating error in our Sentry), but from minified code I figured that this is sumDurations function:
http-streaming/src/playlist.js
Line 320 in fef62d9
| durations += durationList[i].duration; |
Maybe it is possible to add some kind of a guard here, at least?
Like
durations += durationList[i]?.duration ?? 0;Reactions are currently unavailable