-
Notifications
You must be signed in to change notification settings - Fork 6
Feature/vplay 11969 text lang bug fix #734
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
base: dev_sprint_25_2
Are you sure you want to change the base?
Changes from 4 commits
5846d04
15fef7f
6c40988
c9ddab2
986a0a4
cdfdbd9
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -3450,19 +3450,26 @@ AAMPStatusType StreamAbstractionAAMP_HLS::Init(TuneType tuneType) | |
| // Generate audio and text track structures | ||
| PopulateAudioAndTextTracks(); | ||
|
|
||
| // Select preferred text track based on user language preferences | ||
| TextTrackInfo selectedTextTrack; | ||
| if (SelectPreferredTextTrack(selectedTextTrack)) | ||
| if (aamp->GetPreferredTextTrack().index.empty()) | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Can this be tested in an L1 test?
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Is it worth while given its covered by the L3 test ?
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Looking at the existing tests this would be very complex. We should refactor this 1.2k line function and add L1 tests at that stage. Open to suggestions though ? |
||
| { | ||
| AAMPLOG_INFO("Selected text track - lang:%s, name:%s, rendition:%s", | ||
| selectedTextTrack.language.c_str(), | ||
| selectedTextTrack.name.c_str(), | ||
| selectedTextTrack.rendition.c_str()); | ||
| aamp->SetPreferredTextTrack(std::move(selectedTextTrack)); | ||
| // Select preferred text track based on user language preferences | ||
| TextTrackInfo selectedTextTrack; | ||
| if (SelectPreferredTextTrack(selectedTextTrack)) | ||
| { | ||
| AAMPLOG_INFO("Selected text track - lang:%s, name:%s, rendition:%s", | ||
| selectedTextTrack.language.c_str(), | ||
| selectedTextTrack.name.c_str(), | ||
| selectedTextTrack.rendition.c_str()); | ||
| aamp->SetPreferredTextTrack(std::move(selectedTextTrack)); | ||
| } | ||
| else | ||
| { | ||
| AAMPLOG_WARN("No text track matched user preferences, will use default selection"); | ||
| } | ||
| } | ||
| else | ||
| { | ||
| AAMPLOG_WARN("No text track matched user preferences, will use default selection"); | ||
| AAMPLOG_INFO("Preferred text track set, so not looking at the list of preferred languages"); | ||
| } | ||
|
|
||
| // Configure Subtitle track for the playback | ||
|
|
@@ -7593,6 +7600,7 @@ void StreamAbstractionAAMP_HLS::SelectSubtitleTrack() | |
| bool StreamAbstractionAAMP_HLS::SelectPreferredTextTrack(TextTrackInfo &selectedTextTrack) | ||
| { | ||
| std::vector<TextTrackInfo> availableTracks = GetAvailableTextTracks(); | ||
|
|
||
| if (availableTracks.empty()) | ||
| { | ||
| AAMPLOG_WARN("No text tracks available"); | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.