-
-
Notifications
You must be signed in to change notification settings - Fork 153
feat: add long press gesture to 2x speed in separate video player #836
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
|
You may ignore the |
|
Sure @naveensingh . It seems to be working fine on a physical device. But when run on emulator, the screen is turning black |
|
If it's working properly on physical devices, it's okay.
Please ignore that warning. I'll be adding support for 16KB page size in affected apps soon-ish. |
naveensingh
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Found two bugs:
- When panning after zooming in, the speed is increased even though I was panning. It seems more easily reproducible when panning vertically than horizontally. This does not happen in the normal player, so it shouldn't be about the 500ms delay. If you are unable to reproduce this, try panning the video vertically for a few centimeters and then stop without releasing the touch.
- Long press ➜ speed is increased ➜ release touch ➜ player unnecessary exits/enters full-screen mode.
| mExoPlayer?.setVideoSurface(Surface(binding.videoSurface.surfaceTexture)) | ||
| } | ||
|
|
||
| @RequiresApi(Build.VERSION_CODES.R) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Both onSurfaceTextureAvailable() and onSurfaceTextureSizeChanged() were added in API 14.
| @RequiresApi(Build.VERSION_CODES.R) |
|
|
||
| override fun onSurfaceTextureDestroyed(surface: SurfaceTexture) = false | ||
|
|
||
| @RequiresApi(Build.VERSION_CODES.R) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| @RequiresApi(Build.VERSION_CODES.R) |
| import android.graphics.SurfaceTexture | ||
| import android.graphics.drawable.ColorDrawable | ||
| import android.net.Uri | ||
| import android.os.Build |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| import android.os.Build |
| /*@RequiresApi(Build.VERSION_CODES.R) | ||
| fun setPillHeight() { | ||
| val system = WindowInsets.CONSUMED.getInsetsIgnoringVisibility(Type.systemBars()) | ||
| val pillTopMargin = system.top + resources.getActionBarHeight(this) + | ||
| resources.getDimension(org.fossify.commons.R.dimen.normal_margin).toInt() | ||
| (mPlaybackSpeedPill.layoutParams as? RelativeLayout.LayoutParams)?.apply { | ||
| setMargins( | ||
| 0, pillTopMargin, 0, 0 | ||
| ) | ||
| } | ||
| }*/ | ||
|
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Might as well remove it if we don't need it.
| /*@RequiresApi(Build.VERSION_CODES.R) | |
| fun setPillHeight() { | |
| val system = WindowInsets.CONSUMED.getInsetsIgnoringVisibility(Type.systemBars()) | |
| val pillTopMargin = system.top + resources.getActionBarHeight(this) + | |
| resources.getDimension(org.fossify.commons.R.dimen.normal_margin).toInt() | |
| (mPlaybackSpeedPill.layoutParams as? RelativeLayout.LayoutParams)?.apply { | |
| setMargins( | |
| 0, pillTopMargin, 0, 0 | |
| ) | |
| } | |
| }*/ |
| import android.widget.RelativeLayout | ||
| import android.widget.SeekBar | ||
| import android.widget.TextView | ||
| import androidx.annotation.RequiresApi |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| import androidx.annotation.RequiresApi |


Type of change(s)
What changed and why
Tests performed
Before & after preview
Closes the following issue(s)
Checklist
CHANGELOG.md(if applicable).