-
-
Notifications
You must be signed in to change notification settings - Fork 2.9k
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
fix(typescript): type checks on selectedTextTrack, selectedAudioTrack, selectedVideoTrack #3910
fix(typescript): type checks on selectedTextTrack, selectedAudioTrack, selectedVideoTrack #3910
Conversation
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.
thank you for the patch, I am just proposing you to improve the log. I let you integrate the change
@freeboub Thank you, I made those changes. I also applied the same fix to |
You are right, thank you ! |
Co-authored-by: Olivier Bouillet <[email protected]>
Co-authored-by: Olivier Bouillet <[email protected]>
Co-authored-by: Olivier Bouillet <[email protected]>
Summary
Fix type checks on
selectedTextTrack
,selectedAudioTrack
andselectedVideoTrack
properties which were added in #3704.Motivation
selectedTextTrack, selectedAudioTrack and selectedVideoTrack can both be an object with a
type
property and an undefinedvalue
. This allowsreact-native-video
to distinguish between disabled subtitles and subtitles following system settings.However this behavior was broken by the addition of an incorrect type check in #3704 which does not allow the
value
property to be undefined.Changes
Adapted the type check to allow
value
property to beundefined
, as per documentation and TypeScript type definitions.Test plan