public class GSYVideoOptionBuilder
extends java.lang.Object
配置工具类吧。
不是一个正常的Builder,这只是集合了所有设置配置而已. 每个配置其实可以在对应的video接口中找到单独设置 这只是方便使用
| 限定符和类型 | 字段和说明 |
|---|---|
protected boolean |
isShowDragProgressTextOnSeekBar |
protected boolean |
mActionBar |
protected boolean |
mAutoFullWithSize |
protected android.graphics.drawable.Drawable |
mBottomProgressDrawable |
protected android.graphics.drawable.Drawable |
mBottomShowProgressDrawable |
protected android.graphics.drawable.Drawable |
mBottomShowProgressThumbDrawable |
protected java.io.File |
mCachePath |
protected boolean |
mCacheWithPlay |
protected android.graphics.drawable.Drawable |
mDialogProgressBarDrawable |
protected int |
mDialogProgressHighLightColor |
protected int |
mDialogProgressNormalColor |
protected int |
mDismissControlTime |
protected GSYVideoGLView.ShaderInterface |
mEffectFilter |
protected int |
mEnlargeImageRes |
protected GSYVideoProgressListener |
mGSYVideoProgressListener |
protected boolean |
mHideKey |
protected boolean |
mIsTouchWiget |
protected boolean |
mIsTouchWigetFull |
protected LockClickListener |
mLockClickListener |
protected boolean |
mLockLand |
protected boolean |
mLooping |
protected java.util.Map<java.lang.String,java.lang.String> |
mMapHeadData |
protected boolean |
mNeedLockFull |
protected boolean |
mNeedShowWifiTip |
protected java.lang.String |
mOverrideExtension |
protected int |
mPlayPosition |
protected java.lang.String |
mPlayTag |
protected boolean |
mReleaseWhenLossAudio |
protected boolean |
mRotateViewAuto |
protected boolean |
mRotateWithSystem |
protected long |
mSeekOnStart |
protected float |
mSeekRatio |
protected boolean |
mSetUpLazy |
protected boolean |
mShowFullAnimation |
protected boolean |
mShowPauseCover |
protected int |
mShrinkImageRes |
protected boolean |
mSounchTouch |
protected float |
mSpeed |
protected boolean |
mStartAfterPrepared |
protected boolean |
mStatusBar |
protected android.view.View |
mThumbImageView |
protected boolean |
mThumbPlay |
protected java.lang.String |
mUrl |
protected VideoAllCallBack |
mVideoAllCallBack |
protected java.lang.String |
mVideoTitle |
protected android.graphics.drawable.Drawable |
mVolumeProgressDrawable |
| 构造器和说明 |
|---|
GSYVideoOptionBuilder() |
| 限定符和类型 | 方法和说明 |
|---|---|
void |
build(GSYBaseVideoPlayer gsyVideoPlayer) |
void |
build(StandardGSYVideoPlayer gsyVideoPlayer) |
GSYVideoOptionBuilder |
setAutoFullWithSize(boolean autoFullWithSize)
是否根据视频尺寸,自动选择竖屏全屏或者横屏全屏,注意,这时候默认旋转无效
|
GSYVideoOptionBuilder |
setBottomProgressBarDrawable(android.graphics.drawable.Drawable drawable)
底部进度条-非弹出
|
GSYVideoOptionBuilder |
setBottomShowProgressBarDrawable(android.graphics.drawable.Drawable drawable,
android.graphics.drawable.Drawable thumb)
底部进度条-弹出的
|
GSYVideoOptionBuilder |
setCachePath(java.io.File cachePath)
自定指定缓存路径,推荐不设置,使用默认路径
|
GSYVideoOptionBuilder |
setCacheWithPlay(boolean cacheWithPlay)
是否边缓存,m3u8等无效
|
GSYVideoOptionBuilder |
setDialogProgressBar(android.graphics.drawable.Drawable drawable)
中间进度条
|
GSYVideoOptionBuilder |
setDialogProgressColor(int highLightColor,
int normalColor)
中间进度条字体颜色
|
GSYVideoOptionBuilder |
setDialogVolumeProgressBar(android.graphics.drawable.Drawable drawable)
声音进度条
|
GSYVideoOptionBuilder |
setDismissControlTime(int dismissControlTime)
设置触摸显示控制ui的消失时间
|
GSYVideoOptionBuilder |
setEffectFilter(GSYVideoGLView.ShaderInterface effectFilter)
设置滤镜效果
|
GSYVideoOptionBuilder |
setEnlargeImageRes(int mEnlargeImageRes)
设置右下角 显示切换到全屏 的按键资源
必须在setUp之前设置
不设置使用默认
|
GSYVideoOptionBuilder |
setFullHideActionBar(boolean actionBar) |
GSYVideoOptionBuilder |
setFullHideStatusBar(boolean statusBar) |
GSYVideoOptionBuilder |
setGSYVideoProgressListener(GSYVideoProgressListener videoProgressListener)
进度回调
|
GSYVideoOptionBuilder |
setHideKey(boolean hideKey)
全屏隐藏虚拟按键,默认打开
|
GSYVideoOptionBuilder |
setIsTouchWiget(boolean isTouchWiget)
是否可以滑动界面改变进度,声音等
默认true
|
GSYVideoOptionBuilder |
setIsTouchWigetFull(boolean isTouchWigetFull)
是否可以全屏滑动界面改变进度,声音等
默认 true
|
GSYVideoOptionBuilder |
setLockClickListener(LockClickListener lockClickListener)
锁屏点击
|
GSYVideoOptionBuilder |
setLockLand(boolean lockLand)
一全屏就锁屏横屏,默认false竖屏,可配合setRotateViewAuto使用
|
GSYVideoOptionBuilder |
setLooping(boolean looping)
设置循环
|
GSYVideoOptionBuilder |
setMapHeadData(java.util.Map<java.lang.String,java.lang.String> mapHeadData)
设置请求的头信息
|
GSYVideoOptionBuilder |
setNeedLockFull(boolean needLoadFull)
是否需要全屏锁定屏幕功能
如果单独使用请设置setIfCurrentIsFullscreen为true
|
GSYVideoOptionBuilder |
setNeedShowWifiTip(boolean needShowWifiTip)
是否需要显示流量提示,默认true
|
GSYVideoOptionBuilder |
setOnlyRotateLand(boolean onlyRotateLand) |
GSYVideoOptionBuilder |
setOverrideExtension(java.lang.String overrideExtension)
是否需要覆盖拓展类型,目前只针对exoPlayer内核模式有效
|
GSYVideoOptionBuilder |
setPlayPosition(int playPosition)
设置播放位置防止错位
|
GSYVideoOptionBuilder |
setPlayTag(java.lang.String playTag)
播放tag防止错误,因为普通的url也可能重复
|
GSYVideoOptionBuilder |
setReleaseWhenLossAudio(boolean releaseWhenLossAudio)
长时间失去音频焦点,暂停播放器
|
GSYVideoOptionBuilder |
setRotateViewAuto(boolean rotateViewAuto)
是否开启自动旋转
|
GSYVideoOptionBuilder |
setRotateWithSystem(boolean rotateWithSystem)
是否更新系统旋转,false的话,系统禁止旋转也会跟着旋转
|
GSYVideoOptionBuilder |
setSeekOnStart(long seekOnStart)
从哪里开始播放
目前有时候前几秒有跳动问题,毫秒
需要在startPlayLogic之前,即播放开始之前
|
GSYVideoOptionBuilder |
setSeekRatio(float seekRatio)
调整触摸滑动快进的比例
|
GSYVideoOptionBuilder |
setSetUpLazy(boolean setUpLazy)
已过时。
|
GSYVideoOptionBuilder |
setShowDragProgressTextOnSeekBar(boolean isShowDragProgressTextOnSeekBar) |
GSYVideoOptionBuilder |
setShowFullAnimation(boolean showFullAnimation)
全屏动画
|
GSYVideoOptionBuilder |
setShowPauseCover(boolean showPauseCover)
是否需要加载显示暂停的cover图片
打开状态下,暂停退到后台,再回到前台不会显示黑屏,但可以对某些机型有概率出现OOM
关闭情况下,暂停退到后台,再回到前台显示黑屏
|
GSYVideoOptionBuilder |
setShrinkImageRes(int mShrinkImageRes)
设置右下角 显示退出全屏 的按键资源
必须在setUp之前设置
不设置使用默认
|
GSYVideoOptionBuilder |
setSoundTouch(boolean soundTouch)
变声不变调
|
GSYVideoOptionBuilder |
setSpeed(float speed)
播放速度
|
GSYVideoOptionBuilder |
setStartAfterPrepared(boolean startAfterPrepared)
准备成功之后立即播放
|
GSYVideoOptionBuilder |
setThumbImageView(android.view.View view)
设置封面
|
GSYVideoOptionBuilder |
setThumbPlay(boolean thumbPlay)
是否点击封面可以播放
|
GSYVideoOptionBuilder |
setUrl(java.lang.String url)
播放url
|
GSYVideoOptionBuilder |
setVideoAllCallBack(VideoAllCallBack mVideoAllCallBack)
设置播放过程中的回调
|
GSYVideoOptionBuilder |
setVideoTitle(java.lang.String videoTitle)
视频title
|
protected int mShrinkImageRes
protected int mEnlargeImageRes
protected int mPlayPosition
protected int mDialogProgressHighLightColor
protected int mDialogProgressNormalColor
protected int mDismissControlTime
protected long mSeekOnStart
protected float mSeekRatio
protected float mSpeed
protected boolean mHideKey
protected boolean mShowFullAnimation
protected boolean mAutoFullWithSize
protected boolean mNeedShowWifiTip
protected boolean mRotateViewAuto
protected boolean mLockLand
protected boolean mLooping
protected boolean mIsTouchWiget
protected boolean mIsTouchWigetFull
protected boolean mShowPauseCover
protected boolean mRotateWithSystem
protected boolean mCacheWithPlay
protected boolean mNeedLockFull
protected boolean mThumbPlay
protected boolean mSounchTouch
protected boolean mSetUpLazy
protected boolean mStartAfterPrepared
protected boolean mReleaseWhenLossAudio
protected boolean mActionBar
protected boolean mStatusBar
protected boolean isShowDragProgressTextOnSeekBar
protected java.lang.String mPlayTag
protected java.lang.String mUrl
protected java.lang.String mVideoTitle
protected java.lang.String mOverrideExtension
protected java.io.File mCachePath
protected java.util.Map<java.lang.String,java.lang.String> mMapHeadData
protected VideoAllCallBack mVideoAllCallBack
protected LockClickListener mLockClickListener
protected android.view.View mThumbImageView
protected android.graphics.drawable.Drawable mBottomProgressDrawable
protected android.graphics.drawable.Drawable mBottomShowProgressDrawable
protected android.graphics.drawable.Drawable mBottomShowProgressThumbDrawable
protected android.graphics.drawable.Drawable mVolumeProgressDrawable
protected android.graphics.drawable.Drawable mDialogProgressBarDrawable
protected GSYVideoGLView.ShaderInterface mEffectFilter
protected GSYVideoProgressListener mGSYVideoProgressListener
public GSYVideoOptionBuilder setAutoFullWithSize(boolean autoFullWithSize)
autoFullWithSize - 默认falsepublic GSYVideoOptionBuilder setShowFullAnimation(boolean showFullAnimation)
showFullAnimation - 是否使用全屏动画效果public GSYVideoOptionBuilder setLooping(boolean looping)
public GSYVideoOptionBuilder setVideoAllCallBack(VideoAllCallBack mVideoAllCallBack)
mVideoAllCallBack - public GSYVideoOptionBuilder setRotateViewAuto(boolean rotateViewAuto)
public GSYVideoOptionBuilder setLockLand(boolean lockLand)
public GSYVideoOptionBuilder setSpeed(float speed)
public GSYVideoOptionBuilder setSoundTouch(boolean soundTouch)
public GSYVideoOptionBuilder setHideKey(boolean hideKey)
public GSYVideoOptionBuilder setIsTouchWiget(boolean isTouchWiget)
public GSYVideoOptionBuilder setIsTouchWigetFull(boolean isTouchWigetFull)
public GSYVideoOptionBuilder setNeedShowWifiTip(boolean needShowWifiTip)
public GSYVideoOptionBuilder setEnlargeImageRes(int mEnlargeImageRes)
public GSYVideoOptionBuilder setShrinkImageRes(int mShrinkImageRes)
public GSYVideoOptionBuilder setShowPauseCover(boolean showPauseCover)
showPauseCover - 默认truepublic GSYVideoOptionBuilder setSeekRatio(float seekRatio)
seekRatio - 滑动快进的比例,默认1。数值越大,滑动的产生的seek越小public GSYVideoOptionBuilder setRotateWithSystem(boolean rotateWithSystem)
rotateWithSystem - 默认truepublic GSYVideoOptionBuilder setPlayTag(java.lang.String playTag)
playTag - 保证不重复就好public GSYVideoOptionBuilder setPlayPosition(int playPosition)
public GSYVideoOptionBuilder setSeekOnStart(long seekOnStart)
public GSYVideoOptionBuilder setUrl(java.lang.String url)
url - public GSYVideoOptionBuilder setVideoTitle(java.lang.String videoTitle)
videoTitle - public GSYVideoOptionBuilder setCacheWithPlay(boolean cacheWithPlay)
cacheWithPlay - public GSYVideoOptionBuilder setStartAfterPrepared(boolean startAfterPrepared)
startAfterPrepared - 默认true,false的时候需要在prepared后调用startAfterPrepared()public GSYVideoOptionBuilder setReleaseWhenLossAudio(boolean releaseWhenLossAudio)
releaseWhenLossAudio - 默认true,false的时候只会暂停public GSYVideoOptionBuilder setCachePath(java.io.File cachePath)
cachePath - public GSYVideoOptionBuilder setMapHeadData(java.util.Map<java.lang.String,java.lang.String> mapHeadData)
mapHeadData - public GSYVideoOptionBuilder setGSYVideoProgressListener(GSYVideoProgressListener videoProgressListener)
public GSYVideoOptionBuilder setThumbImageView(android.view.View view)
public GSYVideoOptionBuilder setBottomShowProgressBarDrawable(android.graphics.drawable.Drawable drawable, android.graphics.drawable.Drawable thumb)
public GSYVideoOptionBuilder setBottomProgressBarDrawable(android.graphics.drawable.Drawable drawable)
public GSYVideoOptionBuilder setDialogVolumeProgressBar(android.graphics.drawable.Drawable drawable)
public GSYVideoOptionBuilder setDialogProgressBar(android.graphics.drawable.Drawable drawable)
public GSYVideoOptionBuilder setDialogProgressColor(int highLightColor, int normalColor)
public GSYVideoOptionBuilder setThumbPlay(boolean thumbPlay)
public GSYVideoOptionBuilder setNeedLockFull(boolean needLoadFull)
public GSYVideoOptionBuilder setLockClickListener(LockClickListener lockClickListener)
public GSYVideoOptionBuilder setDismissControlTime(int dismissControlTime)
dismissControlTime - 毫秒,默认2500public GSYVideoOptionBuilder setEffectFilter(GSYVideoGLView.ShaderInterface effectFilter)
public GSYVideoOptionBuilder setOverrideExtension(java.lang.String overrideExtension)
overrideExtension - 比如传入 m3u8,mp4,avi 等类型public GSYVideoOptionBuilder setOnlyRotateLand(boolean onlyRotateLand)
public GSYVideoOptionBuilder setShowDragProgressTextOnSeekBar(boolean isShowDragProgressTextOnSeekBar)
@Deprecated public GSYVideoOptionBuilder setSetUpLazy(boolean setUpLazy)
public GSYVideoOptionBuilder setFullHideActionBar(boolean actionBar)
public GSYVideoOptionBuilder setFullHideStatusBar(boolean statusBar)
public void build(StandardGSYVideoPlayer gsyVideoPlayer)
public void build(GSYBaseVideoPlayer gsyVideoPlayer)