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

[IMPLEMENT] Add setVisibility support for Android to hide specific controls #118

Open
jakubjuraszek opened this issue Jan 21, 2025 · 1 comment
Labels
needs-grooming Has not been reviewed by codeowners for scope/validation

Comments

@jakubjuraszek
Copy link

What needs to be implemented

The setVisibility(visibility, controls) method currently only works on iOS. There is no equivalent way to hide specific UI elements (like the fullscreen button) on Android. We need to extend this functionality to Android.

How should it be implemented

  • Extend the setVisibility method to support Android in jwplayer-react-native.
  • Allow hiding individual UI elements (e.g., fullscreen button) instead of disabling all controls via setControls(false).

Acceptance Criteria

  • Calling setVisibility(false, ['fullscreen']) should hide the fullscreen button but leave other controls visible.
  • The feature should work consistently across Android devices.
  • The new functionality should not interfere with iOS behavior.
  • Documentation should be updated to reflect this change.

Additional context
This request originates from a use case where some videos (e.g., top card videos) should not allow fullscreen mode, but still require other controls (play, pause, seek, etc.).
Currently, the only workaround is disabling all controls using setControls(false), which is not ideal.

Additionally, in the existing source code, setVisibility is explicitly restricted to iOS:

setVisibility(visibility, controls) {
  if (RNJWPlayerManager && Platform.OS === 'ios') {
    RNJWPlayerManager.setVisibility(
      this.getRNJWPlayerBridgeHandle(),
      visibility,
      controls
    );
  }
}

We would like to understand if there is a technical reason for this restriction or if it can be extended to Android.

JWP Ticketing
To expedite resolution and maintain confidentiality, submit a JWP request in addition to this new Issue. A JWP request offers the following benefits:

  • Associates the Issue with your company
  • Permits securely share sensitive information related to the bug, request, or question
  • Enhances JWP's ability to track progress and provide timely updates
  • Enables you to track and manage multiple issues through a single platform
ℹ️ While Issues are valuable for open-source collaboration, a JWP request ensures that you will receive clear timelines and efficient support.
@jakubjuraszek jakubjuraszek added the needs-grooming Has not been reviewed by codeowners for scope/validation label Jan 21, 2025
@cheynewallace
Copy link

cheynewallace commented Jan 24, 2025

++ 1 for this
The inability to hide controls or effectively configure styles are the main reasons holding us back from using this library.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs-grooming Has not been reviewed by codeowners for scope/validation
Projects
None yet
Development

No branches or pull requests

2 participants