Closed coofzilla closed 6 months ago
Now I correctly understand your use case :) BTW, I confirm that it would be better in terms of api to use subtitleStyle.opacity to achieve that feature. you need to:
Thank you for the response! once https://github.com/react-native-video/react-native-video/pull/3566 gets merged, I'll work on getting that implemented :)
Do you think we can add this to the roadmap?
@coofzilla no need to add it in the roadmap :) these are isolated changes, not problem to merge it on the flow ! (the other PR will be merged soon I think !)
PR submitted for ios/android https://github.com/react-native-video/react-native-video/pull/3583
https://github.com/react-native-video/react-native-video/pull/3583 has been merged :)
Description
Introduce the ability to independently select and hide text tracks, enabling developers to access subtitle data without displaying it during playback.
Why it is needed ?
This feature is crucial for apps that use subtitles to overlay additional information ( e.g., sports scores ) on videos without showing the subtitle text itself. Currently, disabling the
selectedTextTrack
also stops the subtitle data from being accessible; which, limits the creative use of subtitles for overlays.Increases the flexibility and utility of the
react-native-video
package, aligning with web standards that recommend using subtitles for more than just language support.Allows developers to create a more tailored viewing experience, especially in sports and educational content, where additional information needs to be displayed without interfering with the video content.
Possible implementation
Code sample
📲 iOS
🤖 Android