IGestureComponent.java 1.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  1. /*
  2. Copyright 2017 yangchong211(github.com/yangchong211)
  3. Licensed under the Apache License, Version 2.0 (the "License");
  4. you may not use this file except in compliance with the License.
  5. You may obtain a copy of the License at
  6. http://www.apache.org/licenses/LICENSE-2.0
  7. Unless required by applicable law or agreed to in writing, software
  8. distributed under the License is distributed on an "AS IS" BASIS,
  9. WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  10. See the License for the specific language governing permissions and
  11. limitations under the License.
  12. */
  13. package com.yc.video.controller;
  14. import com.yc.video.ui.view.InterControlView;
  15. /**
  16. * <pre>
  17. * @author yangchong
  18. * blog : https://github.com/yangchong211
  19. * time : 2018/11/9
  20. * desc : 包含手势操作的VideoController的接口
  21. * revise:
  22. * </pre>
  23. */
  24. public interface IGestureComponent extends InterControlView {
  25. /**
  26. * 开始滑动
  27. */
  28. void onStartSlide();
  29. /**
  30. * 结束滑动
  31. * 这个是指,手指抬起或者意外结束事件的时候,调用这个方法
  32. */
  33. void onStopSlide();
  34. /**
  35. * 滑动调整进度
  36. * @param slidePosition 滑动进度
  37. * @param currentPosition 当前播放进度
  38. * @param duration 视频总长度
  39. */
  40. void onPositionChange(int slidePosition, int currentPosition, int duration);
  41. /**
  42. * 滑动调整亮度
  43. * @param percent 亮度百分比
  44. */
  45. void onBrightnessChange(int percent);
  46. /**
  47. * 滑动调整音量
  48. * @param percent 音量百分比
  49. */
  50. void onVolumeChange(int percent);
  51. }