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

Make some symbols internal/private #800

Merged
merged 2 commits into from
Nov 20, 2024

Conversation

MGaetan89
Copy link
Member

@MGaetan89 MGaetan89 commented Nov 19, 2024

Pull request

Description

This PR changes the visibility of some symbols in pillarbox-player so they are not exposed unnecessarily to integrators.
This will also help limit the amount of data that we show to integrators in the documentation.

Changes made

  • Make PillarboxBuilder.create() internal: this method creates a PillarboxExoPlayer, whose constructor is already internal. Everything needed by this method can be customized via methods on PillarboxBuilder.
  • Make PillarboxAnalyticsListener and PlaybackSessionManager.Listener implementations inner classes in MetricsCollector: there's no need to expose these, since they are only needed inside of MetricsCollector.
  • Make List<TimeRange>.firstOrNullAtPosition(position: Long) internal: seems rather specific to our needs. But I'm open to reverting this.
  • Make MonitoringConfigFactory's constructor internal: it is only necessary inside PillarboxBuilder to create the DSL structure.

Open points

There are other symbols that may be removed/internalized. Tell me what you think about them:

Checklist

  • APIs have been properly documented (if relevant).
  • The documentation has been updated (if relevant).
  • New unit tests have been written (if relevant).
  • The demo has been updated (if relevant).

@MGaetan89 MGaetan89 requested a review from StaehliJ November 19, 2024 15:10
@MGaetan89 MGaetan89 self-assigned this Nov 19, 2024
@MGaetan89 MGaetan89 added the documentation Improvements or additions to documentation label Nov 19, 2024
Copy link

github-actions bot commented Nov 19, 2024

Code Coverage

Overall Project 47.91% -0.69% 🟢
Files changed 59.16% 🟢

Module Coverage
:pillarbox-player 55.59% -1.36% 🟢
Files
Module File Coverage
:pillarbox-player PillarboxBuilder.kt 78.07% 🟢
MetricsCollector.kt 66.23% -31.13% 🟢
MonitoringMessageHandler.kt 3.55% -1.02% 🟢

@MGaetan89 MGaetan89 added the enhancement New feature or request label Nov 19, 2024
@MGaetan89 MGaetan89 force-pushed the review_pillarbox-player_visibility branch from ed45fad to 84dceb4 Compare November 20, 2024 12:39
@MGaetan89 MGaetan89 force-pushed the review_pillarbox-player_visibility branch from 84dceb4 to b02c4e7 Compare November 20, 2024 13:32
@MGaetan89 MGaetan89 added this pull request to the merge queue Nov 20, 2024
Merged via the queue into main with commit 786c546 Nov 20, 2024
9 checks passed
@MGaetan89 MGaetan89 deleted the review_pillarbox-player_visibility branch November 20, 2024 15:58
@MGaetan89 MGaetan89 linked an issue Nov 20, 2024 that may be closed by this pull request
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation enhancement New feature or request
Projects
Status: ✅ Done
Development

Successfully merging this pull request may close these issues.

Provide a consolidated documentation for Pillarbox
2 participants