Skip to content

Commit

Permalink
fix(FEC-13868): Player v7 | Download | Default language is being dupl…
Browse files Browse the repository at this point in the history
…icated on kms. (#50)

Issue:
The first captions is being duplicated in the caption list

Root cause:
If there is no default caption (on the entry) player set the first captions form the list as the default and displays it on the download dialog, since caption.isDefault returns false we display this captions also in the hide captions so when user click on "More captions" he will see the first caption again.

Solution:
Check if caption is not the default by the user and it's not the default by the player.

Solves FEC-13868
  • Loading branch information
Tzipi-kaltura committed Apr 14, 2024
1 parent da4935a commit c1fcd65
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/components/captions-list/captions-list.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ export const CaptionsList = withText({

const _renderCaptions = (captions: Array<KalturaCaptionAsset>) => {
return captions.map((caption: KalturaCaptionAsset) => {
if ((!caption.isDefault || caption.id !== defaultCaptions?.id) && caption.downloadUrl) {
if (!caption.isDefault && caption.id !== defaultCaptions?.id && caption.downloadUrl) {
return _renderCaption(caption);
}
});
Expand Down

0 comments on commit c1fcd65

Please sign in to comment.