-
-
Notifications
You must be signed in to change notification settings - Fork 22
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[feature] Support long press to speed up playback; support swipe on t…
…he video to control volume and brightness
- Loading branch information
Showing
20 changed files
with
480 additions
and
38 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
package com.skyd.anivu.ext | ||
|
||
import android.app.Activity | ||
import android.provider.Settings | ||
|
||
/** | ||
* 获取系统屏幕亮度 | ||
*/ | ||
fun Activity.getScreenBrightness(): Int? = try { | ||
Settings.System.getInt(contentResolver, Settings.System.SCREEN_BRIGHTNESS) | ||
} catch (e: Settings.SettingNotFoundException) { | ||
e.printStackTrace() | ||
null | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
package com.skyd.anivu.ext | ||
|
||
import android.os.Build | ||
import android.os.VibrationEffect | ||
import android.os.Vibrator | ||
|
||
fun Vibrator.tickVibrate(duration: Long = 35) { | ||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.Q) { | ||
vibrate(VibrationEffect.createOneShot(duration, VibrationEffect.EFFECT_TICK)) | ||
} else { | ||
vibrate(duration) | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.