-
-
Notifications
You must be signed in to change notification settings - Fork 4.2k
/
EmptyControlVideo.java
52 lines (40 loc) · 1.35 KB
/
EmptyControlVideo.java
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
package com.example.gsyvideoplayer.video;
import android.content.Context;
import android.util.AttributeSet;
import android.view.MotionEvent;
import com.example.gsyvideoplayer.R;
import com.shuyu.gsyvideoplayer.video.StandardGSYVideoPlayer;
/**
* 无任何控制ui的播放
* Created by guoshuyu on 2017/8/6.
*/
public class EmptyControlVideo extends StandardGSYVideoPlayer {
public EmptyControlVideo(Context context, Boolean fullFlag) {
super(context, fullFlag);
}
public EmptyControlVideo(Context context) {
super(context);
}
public EmptyControlVideo(Context context, AttributeSet attrs) {
super(context, attrs);
}
@Override
public int getLayoutId() {
return R.layout.empty_control_video;
}
@Override
protected void touchSurfaceMoveFullLogic(float absDeltaX, float absDeltaY) {
super.touchSurfaceMoveFullLogic(absDeltaX, absDeltaY);
//不给触摸快进,如果需要,屏蔽下方代码即可
mChangePosition = false;
//不给触摸音量,如果需要,屏蔽下方代码即可
mChangeVolume = false;
//不给触摸亮度,如果需要,屏蔽下方代码即可
mBrightness = false;
}
@Override
protected void touchDoubleUp(MotionEvent e) {
//super.touchDoubleUp();
//不需要双击暂停
}
}