[YouTube] Fix descriptive audio role property value in generated DASH manifests

The note 2 of the section 5.8.5.5 of ISO/IEC 23009-1 specifies that when using
the alternate role value, a description of what the alternate track is should
be added.

As alternate is a generic role and a description role exists, it should be used
instead of the alternate one.

The property value has been of course updated in the corresponding test.
This commit is contained in:
AudricV 2023-03-11 21:53:07 +01:00
parent 5a9b6ed2e3
commit 7d27f8f25d
No known key found for this signature in database
GPG Key ID: DA92EC7905614198
2 changed files with 3 additions and 3 deletions

View File

@ -278,7 +278,7 @@ public final class YoutubeDashManifestCreatorsUtils {
*
* <p>
* {@code <Role schemeIdUri="urn:mpeg:DASH:role:2011" value="VALUE"/>}, where {@code VALUE} is
* {@code main} for videos and audios and {@code alternate} for descriptive audio
* {@code main} for videos and audios and {@code description} for descriptive audio
* </p>
*
* <p>
@ -299,7 +299,7 @@ public final class YoutubeDashManifestCreatorsUtils {
setAttribute(roleElement, doc, "schemeIdUri", "urn:mpeg:DASH:role:2011");
setAttribute(roleElement, doc, "value", itagItem.isDescriptiveAudio()
? "alternate" : "main");
? "description" : "main");
adaptationSetElement.appendChild(roleElement);
} catch (final DOMException e) {

View File

@ -233,7 +233,7 @@ class YoutubeDashManifestCreatorsTest {
private void assertRoleElement(@Nonnull final Document document,
@Nonnull final ItagItem itagItem) {
final Element element = assertGetElement(document, ROLE, ADAPTATION_SET);
assertAttrEquals(itagItem.isDescriptiveAudio() ? "alternate" : "main", element, "value");
assertAttrEquals(itagItem.isDescriptiveAudio() ? "description" : "main", element, "value");
}
private void assertRepresentationElement(@Nonnull final Document document,