Skip to content

Commit

Permalink
Add support for C.ROLE_FLAG_AUXILIARY in Format.roleString()
Browse files Browse the repository at this point in the history
  • Loading branch information
MGaetan89 committed Nov 26, 2024
1 parent ff49dad commit af0f869
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,9 @@ fun Format.roleString(): String {
if (hasRole(C.ROLE_FLAG_TRICK_PLAY)) {
roleFlags.add("trick-play")
}
if (hasRole(C.ROLE_FLAG_AUXILIARY)) {
roleFlags.add("auxiliary")
}
return roleFlags.joinToString(",")
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -164,13 +164,14 @@ class FormatTest {
C.ROLE_FLAG_ENHANCED_DIALOG_INTELLIGIBILITY or
C.ROLE_FLAG_TRANSCRIBES_DIALOG or
C.ROLE_FLAG_EASY_TO_READ or
C.ROLE_FLAG_TRICK_PLAY
C.ROLE_FLAG_TRICK_PLAY or
C.ROLE_FLAG_AUXILIARY
)
.build()

assertEquals(
"main,alt,supplementary,commentary,dub,emergency,caption,subtitle,sign,describes-video,describes-music," +
"enhanced-intelligibility,transcribes-dialog,easy-read,trick-play",
"enhanced-intelligibility,transcribes-dialog,easy-read,trick-play,auxiliary",
format.roleString()
)
}
Expand Down

0 comments on commit af0f869

Please sign in to comment.