-
-
Notifications
You must be signed in to change notification settings - Fork 132
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 subtitle view #691
Fix subtitle view #691
Conversation
I'm using your solution in production since a few weeks, it works pretty well ❤️ |
Glad it worked ❤️ |
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.
This is just a fix for the demo / 11.video_view_parameters.dart
?
@@ -83,6 +83,10 @@ class SubtitleViewState extends State<SubtitleView> { | |||
/// {@macro subtitle_view} | |||
@override | |||
Widget build(BuildContext context) { | |||
subtitle = widget.controller.player.state.subtitle; |
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.
what's the purpose of these guys?
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.
these allow new values to of the player to be used on build
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.
a better way to do it is just ignoring the local variable and just use widget.controller.player.state.subtitle
for example
what do you think?
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.
Yeah don't cache it locally if you don't have to.
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.
removed the two variables that doesnt need caching and only kept the padding since it needs to have the cache
i added the fit timer, for the sake of viewing that fit can be changed too using the update method, since people didnt know how |
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.
LGTM
No description provided.