Skip to content
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

Merged
merged 4 commits into from
May 30, 2024
Merged

Conversation

abdelaziz-mahdy
Copy link
Member

No description provided.

@JulienDev
Copy link

I'm using your solution in production since a few weeks, it works pretty well ❤️

@abdelaziz-mahdy
Copy link
Member Author

I'm using your solution in production since a few weeks, it works pretty well ❤️

Glad it worked ❤️

Copy link
Contributor

@moffatman moffatman left a 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;
Copy link
Contributor

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?

Copy link
Member Author

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

Copy link
Member Author

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?

Copy link
Contributor

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.

Copy link
Member Author

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

@abdelaziz-mahdy
Copy link
Member Author

This is just a fix for the demo / 11.video_view_parameters.dart?

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

Copy link
Contributor

@moffatman moffatman left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@abdelaziz-mahdy abdelaziz-mahdy merged commit e7903a8 into media-kit:main May 30, 2024
18 of 19 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants