Skip to content

Commit

Permalink
document NewPlayerUI
Browse files Browse the repository at this point in the history
  • Loading branch information
theScrabi committed Oct 18, 2024
1 parent 30e3b40 commit 93a8710
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,10 @@ import net.newpipe.newplayer.ui.NewPlayerUI
import net.newpipe.newplayer.ui.theme.VideoPlayerTheme
import net.newpipe.newplayer.data.NewPlayerException


/**
* A wrapper for [NewPlayerUI] to allow NewPlayer to be used in a [views](https://developer.android.com/develop/ui/views/layout/declaring-layout) environment.
*/
@AndroidEntryPoint
class NewPlayerView : FrameLayout {

Expand Down
11 changes: 11 additions & 0 deletions new-player/src/main/java/net/newpipe/newplayer/ui/NewPlayerUI.kt
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,17 @@ import net.newpipe.newplayer.ui.common.setScreenBrightness

private const val TAG = "VideoPlayerUI"


/**
* The NewPlayerUI composable. Use this in your compose setup to display the NewPlayerUI.
*
* Keep in mind that NewPlayer will deeply integrate into your UI and your Activity.
* You must take care about complying to requests of NewPlayer like when NewPlayer wants to
* display the NewPlayerUI in fullscreen mode. It's your duty to ensure that all other composable
* or views are hidden and only NewPlayerUI is visible. You can read more about this in
* the [NewPlayerViewModel], since the [viewModel] is responsible to tell your UI how to behave
* in such cases.
*/
@OptIn(UnstableApi::class)
@Composable
fun NewPlayerUI(
Expand Down

0 comments on commit 93a8710

Please sign in to comment.