diff --git a/app/src/main/java/app/revanced/integrations/shared/PlayerType.kt b/app/src/main/java/app/revanced/integrations/shared/PlayerType.kt index 8833d0a0a9..56ec384e97 100644 --- a/app/src/main/java/app/revanced/integrations/shared/PlayerType.kt +++ b/app/src/main/java/app/revanced/integrations/shared/PlayerType.kt @@ -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. */ @@ -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