Skip to content
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

播放控件隐藏的时候如何修改 #1555

Closed
appdev opened this issue Oct 27, 2018 · 4 comments
Closed

播放控件隐藏的时候如何修改 #1555

appdev opened this issue Oct 27, 2018 · 4 comments

Comments

@appdev
Copy link

appdev commented Oct 27, 2018

您好,请教一下,如何调整,触摸播放器后,播放控件自动隐藏的时间呢?还有在播放中如何点击屏幕后自动暂停呢

@CarGuo
Copy link
Owner

CarGuo commented Oct 29, 2018

隐藏时间有 setDismissControlTime

双击暂停的可以看源码 touchDoubleUp 和 onClickUiToggle 去重载

https://github.com/CarGuo/GSYVideoPlayer/blob/master/gsyVideoPlayer-java/src/main/java/com/shuyu/gsyvideoplayer/video/base/GSYVideoControlView.java

    protected GestureDetector gestureDetector = new GestureDetector(getContext().getApplicationContext(), new GestureDetector.SimpleOnGestureListener() {
        @Override
        public boolean onDoubleTap(MotionEvent e) {
            touchDoubleUp();
            return super.onDoubleTap(e);
        }

        @Override
        public boolean onSingleTapConfirmed(MotionEvent e) {
            if (!mChangePosition && !mChangeVolume && !mBrightness) {
                onClickUiToggle();
            }
            return super.onSingleTapConfirmed(e);
        }
    });

@appdev
Copy link
Author

appdev commented Oct 29, 2018

好的 谢谢

@appdev appdev closed this as completed Oct 29, 2018
@protectedMan
Copy link

setDismissControlTime设置为0,开始播放的时候这个暂停还是会闪一下。
有没有机制设置可以让开始播放时不显示暂停

@CarGuo
Copy link
Owner

CarGuo commented Nov 22, 2018

@protectedMan
https://github.com/CarGuo/GSYVideoPlayer/blob/master/app/src/main/java/com/example/gsyvideoplayer/video/SampleCoverVideo.java
看这个类的注释
/******************* 下方重载方法,在播放开始不显示底部进度和按键,不需要可屏蔽 ********************/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants