From 17271d582b7c59948bbbfa73ea6910486ad6488b Mon Sep 17 00:00:00 2001 From: ThibaultBee <37510686+ThibaultBee@users.noreply.github.com> Date: Thu, 9 Nov 2023 14:37:01 +0100 Subject: [PATCH] fix(*): fix comments on `showSubtitles` parameter --- .../java/video/api/compose/player/ApiVideoPlayer.kt | 12 ++++++------ .../video/api/player/views/ApiVideoExoPlayerView.kt | 2 +- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/compose-player/src/main/java/video/api/compose/player/ApiVideoPlayer.kt b/compose-player/src/main/java/video/api/compose/player/ApiVideoPlayer.kt index 33927ec..e51fb45 100644 --- a/compose-player/src/main/java/video/api/compose/player/ApiVideoPlayer.kt +++ b/compose-player/src/main/java/video/api/compose/player/ApiVideoPlayer.kt @@ -21,7 +21,7 @@ import video.api.player.views.ApiVideoExoPlayerView * @param modifier The modifier to be applied to the view * @param viewFit Sets how the video is fitted in its parent view * @param showControls Shows or hides the control buttons - * @param showSubtitleButton Shows or hides the subtitle button + * @param showSubtitles Shows or hides the subtitles and the subtitles button * @param autoplay True to play the video immediately, false otherwise * @param notificationController The notification controller. Set to null to disable the notification. */ @@ -31,7 +31,7 @@ fun ApiVideoPlayer( modifier: Modifier = Modifier, viewFit: ApiVideoExoPlayerView.ViewFit = ApiVideoExoPlayerView.ViewFit.Contains, showControls: Boolean = true, - showSubtitleButton: Boolean = true, + showSubtitles: Boolean = true, autoplay: Boolean = true, notificationController: ApiVideoPlayerNotificationController? = ApiVideoPlayerNotificationController( LocalContext.current @@ -52,7 +52,7 @@ fun ApiVideoPlayer( modifier = modifier, viewFit = viewFit, showControls = showControls, - showSubtitleButton = showSubtitleButton + showSubtitles = showSubtitles ) } @@ -64,7 +64,7 @@ fun ApiVideoPlayer( * @param modifier The modifier to be applied to the view * @param viewFit Sets how the video is fitted in its parent view * @param showControls Shows or hides the control buttons - * @param showSubtitleButton Shows or hides the subtitle button + * @param showSubtitles Shows or hides the subtitles and the subtitles button */ @Composable fun ApiVideoPlayer( @@ -72,7 +72,7 @@ fun ApiVideoPlayer( modifier: Modifier = Modifier, viewFit: ApiVideoExoPlayerView.ViewFit = ApiVideoExoPlayerView.ViewFit.Contains, showControls: Boolean = true, - showSubtitleButton: Boolean = true + showSubtitles: Boolean = true ) { val context = LocalContext.current @@ -85,7 +85,7 @@ fun ApiVideoPlayer( this.fullScreenListener = null this.viewFit = viewFit this.showControls = showControls - this.showSubtitles = showSubtitleButton + this.showSubtitles = showSubtitles controller.setPlayerView(this) } diff --git a/player/src/main/java/video/api/player/views/ApiVideoExoPlayerView.kt b/player/src/main/java/video/api/player/views/ApiVideoExoPlayerView.kt index 5c468d2..2327bc6 100644 --- a/player/src/main/java/video/api/player/views/ApiVideoExoPlayerView.kt +++ b/player/src/main/java/video/api/player/views/ApiVideoExoPlayerView.kt @@ -60,7 +60,7 @@ class ApiVideoExoPlayerView @JvmOverloads constructor( } /** - * Shows or hides the subtitles + * Shows or hides the subtitles and the subtitles button */ var showSubtitles: Boolean = true @SuppressLint("UnsafeOptInUsageError") set(value) {