You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
No way to select a text track that has empty roles when there is another track for same language that has non-empty roles.
Version : 2.3.0
Input code
// this sets currentTextRole_ to empty.shakaPlayer.selectTextLanguage(this.textTracks[trackId].language,'');shakaPlayer.setTextTrackVisibility(true);// Now refine the choice based on role preference.if(preferredRole){// Kiran : This won't be true for empty role preferencevarroleMatches=shaka.util.StreamUtils.filterTextStreamsByRole_(chosen,preferredRole);if(roleMatches.length){returnroleMatches;}else{shaka.log.warning('No exact match for the text role could be found.');}}
Then ,
// Either there was no role preference, or it could not be satisfied.// Choose an arbitrary role, if there are any, and filter out any other roles.// This ensures we never adapt between roles.varallRoles=chosen.map(function(stream){returnstream.roles;}).reduce(shaka.util.Functional.collapseArrays,[]);
// Kiran: This will return the stream that has non empty ROLE.
Expected behavior
should return the first track that matches the language as well as exact role, if role preference is empty , should return the track where roles.length === 0.
Current behavior
Always returns the non-empty role text track.
The text was updated successfully, but these errors were encountered:
Beforehand, if there were some text streams with a given language
which had a role, and some which did not, the no-role text streams
would never be chosen.
Now, they are chosen if there is no preferred role.
Closes#1212
Change-Id: I28b426304b1a828f500012425b8d89c94ccc3178
No way to select a text track that has empty roles when there is another track for same language that has non-empty roles.
Version : 2.3.0
Input code
Then ,
// Kiran: This will return the stream that has non empty ROLE.
Expected behavior
should return the first track that matches the language as well as exact role, if role preference is empty , should return the track where roles.length === 0.
Current behavior
Always returns the non-empty role text track.
The text was updated successfully, but these errors were encountered: