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

feat: parse Label element #113

Merged
merged 1 commit into from
Mar 15, 2021
Merged

Conversation

RomeroDiver
Copy link
Contributor

This is a possible fix for videojs/video.js#6960

src/inheritAttributes.js Outdated Show resolved Hide resolved
}];
const output = toM3u8(input);

assert.ok(label in output.mediaGroups.AUDIO.audio);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
assert.ok(label in output.mediaGroups.AUDIO.audio);
assert.ok(label in output.mediaGroups.AUDIO.audio, 'a label exists');
assert.equal(output.mediaGroups.AUDIO.audio.label, label, 'we got the label set in the mpd');

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not sure this is the correct assertion, the second one. There is no property label on audio object.
The structure of the audio object is similar to

{
  audio: {
    [label]: {...}
  }
}

@gkatsev
Copy link
Member

gkatsev commented Dec 9, 2020

Thanks for PR, just one small addition to the test, code looks good!

@slasktrat
Copy link

+1 for this!

@brandonocasey brandonocasey merged commit 5dde0e9 into videojs:main Mar 15, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants