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

Update ExoPlayer usage #3760

Merged
merged 4 commits into from
Aug 5, 2023
Merged

Conversation

jpelgrom
Copy link
Member

@jpelgrom jpelgrom commented Aug 4, 2023

Summary

Update the usage of ExoPlayer in the app:

  • Migrate from the ExoPlayer v2 dependencies that are no longer supported to the new AndroidX Media3 - which marks several APIs as unstable, but according to Google can be ignored as we don't need binary compatibility
  • Replace deprecated ExoPlayer functions with the non-deprecated alternatives
  • Update the controls layout to be based on the new player view so it works correctly and it is not required to completely rewrite the controls - this copies the layout file from source as it is not possible to add/remove only a few buttons, tested and it works fine and API has been stable for ~3y now so I don't expect it will break

Also fixes a potential crash for dividing by 0 if the video ends before the frontend tells the app to stop.

Screenshots

The new player controls are a lot more modern and in my opinion nicer to use (alignment, animations, larger touch targets, dimmed video so you can see them):

Before After
image image

(before is incorrectly cropping the video, not sure why)

Link to pull request in Documentation repository

n/a

Any other notes

@JBassett JBassett merged commit 49f3080 into home-assistant:master Aug 5, 2023
4 checks passed
@jpelgrom jpelgrom deleted the upgrade-exoplayer branch August 5, 2023 06:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants