基于ijkplayer简单的UI界面
out of the box android video player base on ijkplayer
- base on ijkplayer,support RTMP , HLS (http & https) , MP4,M4A etc.
- gestures for volume control
- gestures for brightness control
- gestures for forward or backward
- fullscreen by manual or sensor
- try to replay when error(only for live video)
- set video scale type (double click video will switch the scale types in app,you can find the difference)
- fitParent:可能会剪裁,保持原视频的大小,显示在中心,当原视频的大小超过view的大小超过部分裁剪处理
- fillParent:可能会剪裁,等比例放大视频,直到填满View为止,超过View的部分作裁剪处理
- wrapContent:将视频的内容完整居中显示,如果视频大于view,则按比例缩视频直到完全显示在view中
- fitXY:不剪裁,非等比例拉伸画面填满整个View
- 16:9:不剪裁,非等比例拉伸画面到16:9,并完全显示在View中
- 4:3:不剪裁,非等比例拉伸画面到4:3,并完全显示在View中
- git clone https://github.com/jjdxm/ijkplayer_simple.git
- android studio->file->New->Import module->select
ijkplayer_simple
the player default support 6 CPU architecture:ARMv5, ARMv7, ARMv8,x86 and 86_64,if your project need't support all of the architectures,you can remove the folder in ijkplayer-java/src/main/jniLibs
to generate a light APK.
read this first:How to use 32-bit native libaries on 64-bit Android device,What you should know about .so files,关于Android的.so文件你所需要知道的
play(url)
//play videostop()
//stop playpause()
start()
forward()
// forward or back,example: forward(0.1f) forward(-0.1f)getCurrentPosition()
setScaleType()
toggleAspectRatio()
seekTo()
//seek to specify positiongetDuration()
//get video durationonInfo()
//callback when have some informationonError()
onComplete()
onControlPanelVisibilityChange()
//callback when control panel visibility change