Giter Site home page Giter Site logo

dragvideo's Introduction

DragVideo

A Method to Drag the Video When Playing Video

一种在播放视频时,能够拖拽的方案

##为什么有这个工程

经常在爱奇艺网站上看电影,看到如果滑动掩盖了播放窗口后,就后在最下面有一个小播放界面。并且这个播放界面,是可以任意拖拽的。感觉很酷

DragVideoWeb

既然web端能实现,就想了想在移动端设备上,是否也能实现这个效果,于是就有了...

##效果图:

DragVideo

##实现思路:

  • 1、播放视频的view选择TextureView
  • 2、ListView下方盖上自定义ViewDragHelper,当在播放视频时,通过自定义ViewDragHelper进行拖动TextureView
  • 3、进行渐变处理,让两个view的文字能够交替显示
  • 4、当TextureView到达右下方时,控制在水平方向上拖动,到达左边界时,如果再滑动,就销毁TextureView

##代码分析:

##欢迎关注我的个人公众号,android 技术干货,问题深度总结,FrameWork源码解析,插件化研究,最新开源项目推荐

这里写图片描述

License

Copyright (C) 2016 hejunlin

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.

###特别鸣谢: @flavienlaurent(法国Fourmob公司工程师)仿Youtube方案、@Minsoo, Kim(韩国Kakao Corp工程师)、JOJO(阿里巴巴工程师)

dragvideo's People

Contributors

smartyuge avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.