Skip to content

Commit

Permalink
fix: Allow dispatch metadata event with cueTime equal to 0 (#7098)
Browse files Browse the repository at this point in the history
Related to #7097
  • Loading branch information
avelad committed Jul 24, 2024
1 parent c83cac1 commit 2d32e18
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/player.js
Original file line number Diff line number Diff line change
Expand Up @@ -3019,7 +3019,7 @@ shaka.Player = class extends shaka.util.FakeEventTarget {
*/
processTimedMetadataMediaSrc_(metadata, offset, segmentEndTime) {
for (const sample of metadata) {
if (sample.data && sample.cueTime && sample.frames) {
if (sample.data && typeof(sample.cueTime) == 'number' && sample.frames) {
const start = sample.cueTime + offset;
let end = segmentEndTime;
// This can happen when the ID3 info arrives in a previous segment.
Expand Down

0 comments on commit 2d32e18

Please sign in to comment.