Skip to content

Commit

Permalink
fix(*): fix comments on showSubtitles parameter
Browse files Browse the repository at this point in the history
  • Loading branch information
ThibaultBee committed Nov 9, 2023
1 parent ba936c2 commit 17271d5
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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.
*/
Expand All @@ -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
Expand All @@ -52,7 +52,7 @@ fun ApiVideoPlayer(
modifier = modifier,
viewFit = viewFit,
showControls = showControls,
showSubtitleButton = showSubtitleButton
showSubtitles = showSubtitles
)
}

Expand All @@ -64,15 +64,15 @@ 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(
controller: ApiVideoPlayerController,
modifier: Modifier = Modifier,
viewFit: ApiVideoExoPlayerView.ViewFit = ApiVideoExoPlayerView.ViewFit.Contains,
showControls: Boolean = true,
showSubtitleButton: Boolean = true
showSubtitles: Boolean = true
) {
val context = LocalContext.current

Expand All @@ -85,7 +85,7 @@ fun ApiVideoPlayer(
this.fullScreenListener = null
this.viewFit = viewFit
this.showControls = showControls
this.showSubtitles = showSubtitleButton
this.showSubtitles = showSubtitles

controller.setPlayerView(this)
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down

0 comments on commit 17271d5

Please sign in to comment.