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

Use view binding in VideoPlayer. #5253

Merged

Conversation

Isira-Seneviratne
Copy link
Member

What is it?

  • Bugfix (user facing)
  • Feature (user facing)
  • Codebase improvement (dev facing)
  • Meta improvement to the project (dev facing)

Description of the changes in your PR

  • Use view binding in VideoPlayer and VideoPlayerImpl.

APK testing

debug.zip

Due diligence

Copy link
Member

@Stypox Stypox left a comment

Choose a reason for hiding this comment

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

I tested and it works, changes also look good, thank you :-D
Maybe you could rename playerBinding into just binding, so that there is less code to read. closeOverlayBinding is ok though, since it's a specific binding.

Comment on lines +166 to +168
playbackSeekBar = (SeekBar) binding.playbackSeekBar;
qualityTextView = (TextView) binding.qualityTextView;
playbackSpeed = (TextView) binding.playbackSpeed;
Copy link
Member

Choose a reason for hiding this comment

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

Why did you keep these three variables?

Copy link
Member Author

Choose a reason for hiding this comment

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

I was getting compilation errors as those three views were being stored as View variables for some reason.

@Isira-Seneviratne
Copy link
Member Author

I tested and it works, changes also look good, thank you :-D
Maybe you could rename playerBinding into just binding, so that there is less code to read. closeOverlayBinding is ok though, since it's a specific binding.

I chose the name to keep the bindings distinguishable, but I'll rename the binding.

@Stypox Stypox force-pushed the Use_view_binding_in_VideoPlayer branch from f2ea8cc to fa75c79 Compare January 13, 2021 19:44
Copy link
Member

@Stypox Stypox left a comment

Choose a reason for hiding this comment

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

I rebased and tested. This works. Thank you again :-D
Now I'll have to rebase #5371, wish me luck ;-)

@Stypox Stypox merged commit e2ea217 into TeamNewPipe:dev Jan 13, 2021
@Isira-Seneviratne Isira-Seneviratne deleted the Use_view_binding_in_VideoPlayer branch January 14, 2021 03:05
This was referenced Jan 18, 2021
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.

2 participants