Skip to content
This repository has been archived by the owner on Oct 26, 2024. It is now read-only.

Commit

Permalink
comments
Browse files Browse the repository at this point in the history
  • Loading branch information
LisoUseInAIKyrios committed Oct 12, 2023
1 parent 4884bfe commit 42b4239
Showing 1 changed file with 10 additions and 4 deletions.
14 changes: 10 additions & 4 deletions app/src/main/java/app/revanced/integrations/shared/PlayerType.kt
Original file line number Diff line number Diff line change
Expand Up @@ -90,8 +90,11 @@ enum class PlayerType {
* Check if the current player type is
* [NONE], [HIDDEN], [WATCH_WHILE_SLIDING_MINIMIZED_DISMISSED].
*
* Useful to check if a Short is being played, and usually covers all use cases
* except for some hooks when spoofing to an old version (where the type can be [WATCH_WHILE_MINIMIZED].
* Useful to check if a Short is being played or opened.
*
* Usually covers all use cases with no false positives, except if called from some hooks
* when spoofing to an old version this will return false even
* though a Short is being opened or is on screen (see [isNoneHiddenOrMinimized]).
*
* @return If nothing, a Short, or a regular video is sliding off screen to a dismissed or hidden state.
*/
Expand All @@ -107,8 +110,11 @@ enum class PlayerType {
* although will return false positive if a regular video is
* opened and minimized (and a Short is not playing or being opened).
*
* @return If nothing, a Short,
* or a regular video is minimized video or sliding off screen to a dismissed or hidden state.
* Typically used to detect if a Short is playing when the player cannot be in a minimized state,
* such as the user interacting with a button or element of the player.
*
* @return If nothing, a Short, a regular video is sliding off screen to a dismissed or hidden state,
* a regular video is minimized (and a new video is not being opened).
*/
fun isNoneHiddenOrMinimized(): Boolean {
return isNoneHiddenOrSlidingMinimized() || this == WATCH_WHILE_MINIMIZED
Expand Down

0 comments on commit 42b4239

Please sign in to comment.