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

feat(android): add onControlsVisiblityChange #3925

Merged
merged 5 commits into from
Jun 22, 2024

Conversation

ashnfb
Copy link
Contributor

@ashnfb ashnfb commented Jun 19, 2024

Summary

A callback event for when the Android Exoplayer controls show and hide.
Issue request: #2686

Motivation

Since the Android video player LegacyControls have limited controls (play, pause, rewind, forward, scrubber, etc., and do not provide an interface for changing the Captions or Audio of a stream, or implementing additional buttons), having an event allows a consumer class to overlay buttons / information at the same time as controls are shown.

Changes

Adds onControlsVisibilityChange to VideoEventEmitter
Adds a visibility listener to the playerControlView in ReactExoplayerview to trigger the new event

Not available for iOS, due to no public methods for monitoring native control visibility

Test plan

@ashnfb ashnfb changed the title Adding onControlsVisiblityChange for Android feat(Android) Add onControlsVisiblityChange Jun 19, 2024
@ashnfb
Copy link
Contributor Author

ashnfb commented Jun 19, 2024

@freeboub, any idea how I can fix this ESLint error? I've tried a few approaches

@freeboub
Copy link
Collaborator

@ashnfb did you try : "yarn lint" ?

src/Video.tsx Outdated Show resolved Hide resolved
@freeboub
Copy link
Collaborator

I added 1 minor comment, but code looks good ! Thank you

@KrzysztofMoch KrzysztofMoch changed the title feat(Android) Add onControlsVisiblityChange feat(android): add onControlsVisiblityChange Jun 20, 2024
@ashnfb
Copy link
Contributor Author

ashnfb commented Jun 20, 2024

@KrzysztofMoch @freeboub, corrections made. I haven't been involved in this project in a while, may I ask what steps are next?

@KrzysztofMoch
Copy link
Member

KrzysztofMoch commented Jun 20, 2024

If all checks will be green, and @freeboub will approve it (as he requested change) - we can go with it and merge it

@freeboub freeboub linked an issue Jun 22, 2024 that may be closed by this pull request
@freeboub freeboub merged commit c2ce372 into TheWidlarzGroup:master Jun 22, 2024
6 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.

Controls visible callback
3 participants