Skip to content

Commit 865c8d0

Browse files
Parse player version only for text tracks
1 parent 419e642 commit 865c8d0

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

ui/src/main/java/com/theoplayer/android/ui/util/TrackExts.kt

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -53,11 +53,9 @@ internal val Track.localizedLanguageName: String?
5353
internal fun constructLabel(
5454
track: Track,
5555
): String? {
56-
val playerVersion = THEOplayerGlobal.getVersion().toVersion()
57-
5856
val label: String? = if (
5957
(track is TextTrack) &&
60-
playerVersion.major < 11 &&
58+
THEOplayerGlobal.getVersion().toVersion().major < 11 &&
6159
(isLabelCeaFormatted(track.label) || (track.label != null && track.language == track.label))
6260
) {
6361
// If we are below 11th major release

0 commit comments

Comments
 (0)