-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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: persist caption settings in localStorage on track mode change (code100x#1493) #1503
feat: persist caption settings in localStorage on track mode change (code100x#1493) #1503
Conversation
…e/save-caption-settings-to-localstorage
…ave-caption-settings-to-localstorage
src/components/VideoPlayer2.tsx
Outdated
@@ -92,6 +92,52 @@ export const VideoPlayer: FunctionComponent<VideoPlayerProps> = ({ | |||
return pipButtonContainer; | |||
}; | |||
|
|||
// Fetch previously saved captions setting from localStorage |
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.
Can you remove this comment?
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.
i added this comment to help other people understand these line of codes. anyways i'll remove it
@@ -92,6 +92,52 @@ export const VideoPlayer: FunctionComponent<VideoPlayerProps> = ({ | |||
return pipButtonContainer; | |||
}; | |||
|
|||
// Fetch previously saved captions setting from localStorage | |||
useEffect(() => { |
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 have 2 useEffects with same dependencies array? Can you add the below login in here only?
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.
yes sure
…ave-caption-settings-to-localstorage
hey @devsargam Please check now |
Thank you sir |
…#1493)
PR Fixes:
Resolves #1493
Checklist before requesting a review