-
Notifications
You must be signed in to change notification settings - Fork 52
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
feat(FEC-12015): CC button for on/off subtitles #536
Conversation
@@ -64,6 +65,19 @@ export default class StorageManager { | |||
StorageWrapper.setItem(StorageManager.StorageKeys.TEXT_LANG, textTrack.language); | |||
}); | |||
|
|||
eventManager.listen(player, player.Event.UI.UI_ELEMENT_CLICKED, event => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why do we need the event ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
to save only when the language is selected by the user not by app config for example
done(); | ||
return; | ||
} | ||
player.dispatchEvent(new FakeEvent(player.Event.UI.UI_ELEMENT_CLICKED, {element: 'ClosedCaptions'})); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
rename event
player.load(); | ||
player.ready().then(() => { | ||
try { | ||
player.dispatchEvent(new FakeEvent(player.Event.UI.UI_ELEMENT_CLICKED, {element: 'ClosedCaptions'})); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
rename event
Description of the Changes
add
showTextTrack
apisave the CC selection in the storage
Solves FEC-12015
CheckLists