public abstract class PLVCommonVideoView<R,T extends PLVVideoViewListener> extends <any> implements IPLVCommonVideoView<R>
限定符和类型 | 字段和说明 |
---|---|
protected boolean |
hasOpenAdHead
是否已经播放片头广告
|
protected java.lang.String |
IJK_HTTP_HOOK |
protected boolean |
isAllowOpenAdHead
是否开启片头广告
|
protected boolean |
isNetWorkError |
protected boolean |
isOpenMarquee
是否开启跑马灯
|
protected boolean |
isOpenTeaser
是否开启片头
|
protected java.lang.Boolean |
isOpenWaitAD |
protected boolean |
isOpenWatermark
是否开启水印
|
protected java.lang.String |
playId |
protected int |
playStatInterval |
protected java.lang.String |
viewLogParam2 |
protected java.lang.String |
viewLogParam4 |
protected java.lang.String |
viewLogParam5 |
构造器和说明 |
---|
PLVCommonVideoView(android.content.Context context) |
PLVCommonVideoView(android.content.Context context,
android.util.AttributeSet attrs) |
PLVCommonVideoView(android.content.Context context,
android.util.AttributeSet attrs,
int defStyleAttr) |
限定符和类型 | 方法和说明 |
---|---|
protected java.lang.String |
addPlayUriParams(java.lang.String uri) |
protected void |
afterHeadAdPlay() |
protected void |
beginDemandPlayPolling()
开始播放轮巡发送监控记录
10秒发送一次 |
protected void |
cancelBufferingTimer() |
boolean |
canPlaySkipHeadAd()
是否可以跳过片头广告播放
|
protected void |
clear() |
protected IPLVVideoViewNotifyer |
createNotifyer(IPLVVideoViewNotifyer polyvVideoViewNotifyer) |
protected abstract android.net.Uri |
createPlayUri() |
void |
destroy() |
java.lang.String |
getErrorMessage(java.lang.Throwable e) |
int |
getStayTimeDuration()
取得停留时长
|
PLVAuxiliaryVideoview |
getSubVideoView()
获取子播放器
|
java.lang.String |
getViewerId()
取得观众id
|
int |
getWatchTimeDuration()
取得观看时长,只有在播放中才会计数
|
protected void |
initial() |
boolean |
isBufferState() |
boolean |
isInPlaybackStateEx() |
boolean |
isPauseState()
当前是否在暂停中
|
protected abstract boolean |
isValidatePlayId() |
protected void |
notifyOnGetLogoListener(java.lang.String logoImage,
java.lang.Double logoOpacity,
java.lang.String logoPosition,
java.lang.String logoHref) |
protected void |
onNetWorkError() |
protected void |
onNetWorkRecover() |
protected abstract boolean |
onPlayCompelete() |
protected abstract boolean |
onPlayError(int what,
int extra) |
protected abstract boolean |
onPlayInfo(int what,
int extra) |
protected abstract boolean |
onPlayPrepared() |
protected abstract boolean |
onPlaySeek() |
boolean |
onTrackballEvent(android.view.MotionEvent ev) |
void |
playByMode(PLVBaseVideoParams params,
int mode)
点播与直播的播放入口
|
void |
playFromHeadAd()
从片头广告开始播放,播放流程:
点播:片头广告-正片-片尾广告。 |
boolean |
playSkipHeadAd()
跳过所有的片头广告播放,播放流程:
点播:正片-片尾广告 直播:有暖场视频,会播放暖场视频,否则播放正片。 |
boolean |
playSkipHeadAd(boolean isSkipAll)
跳过片头广告播放,播放流程:
isSkipAll: 点播:正片-片尾广告 直播:有暖场视频,会播放暖场视频,否则播放正片。 |
boolean |
playTailAd()
播放片尾广告,如果没有片尾广告,那么会停止播放
|
boolean |
playTeaser()
播放暖场视频,如果没有暖场视频,那么会停止播放
|
protected boolean |
prepare(boolean isPreload) |
protected void |
reconnect() |
protected abstract void |
requestModleVO(PLVBaseVideoParams params,
int mode)
请求对应业务的数据
默认实现点播业务请求,子播放器必须覆盖重写该方法
|
void |
setIsLinkMic(boolean isLinkMic)
是否正在连麦
|
protected void |
setLocalWatchTime()
本地播放统计观看持续时间和停留持续时间
|
void |
setOnGetLogoListener(IPLVVideoViewListenerEvent.OnGetLogoListener l) |
void |
setOnVideoLoadSlowListener(IPLVVideoViewListenerEvent.OnVideoLoadSlowListener l) |
void |
setOption(PLVPlayOption playOption) |
void |
setSubVideoView(PLVAuxiliaryVideoview subVideoView)
设置子播放器,用于处理广告及暖场的播放逻辑。
|
protected void |
setVideoURI(android.net.Uri uri) |
protected void |
setVideoURIFromSelf(java.lang.String uri) |
void |
setViewerId(java.lang.String viewerId)
设置观众id,发送统计日志自动带上此参数
|
void |
startFromNew()
从新的直播流开始播放,仅直播模式有效
|
protected abstract void |
staticsVideoViewPlay() |
void |
stopPlay() |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
bindPPTView, changeBitRate, changeLines, getModleVO, isOnlyAudio
protected int playStatInterval
protected final java.lang.String IJK_HTTP_HOOK
protected java.lang.String playId
protected boolean isOpenTeaser
protected boolean isAllowOpenAdHead
protected boolean isOpenMarquee
protected boolean isOpenWatermark
protected boolean hasOpenAdHead
protected java.lang.Boolean isOpenWaitAD
protected java.lang.String viewLogParam2
protected java.lang.String viewLogParam4
protected java.lang.String viewLogParam5
protected boolean isNetWorkError
public PLVCommonVideoView(android.content.Context context)
public PLVCommonVideoView(android.content.Context context, android.util.AttributeSet attrs)
public PLVCommonVideoView(android.content.Context context, android.util.AttributeSet attrs, int defStyleAttr)
protected void initial()
public boolean isPauseState()
IPLVCommonVideoView
isPauseState
在接口中 IPLVCommonVideoView<R>
true
:是false
:否public boolean isInPlaybackStateEx()
public void setIsLinkMic(boolean isLinkMic)
IPLVCommonVideoView
setIsLinkMic
在接口中 IPLVCommonVideoView<R>
public boolean isBufferState()
public void setSubVideoView(PLVAuxiliaryVideoview subVideoView)
IPLVCommonVideoView
setSubVideoView
在接口中 IPLVCommonVideoView<R>
public java.lang.String getViewerId()
IPLVCommonVideoView
getViewerId
在接口中 IPLVCommonVideoView<R>
public void setViewerId(java.lang.String viewerId)
IPLVCommonVideoView
setViewerId
在接口中 IPLVCommonVideoView<R>
viewerId
- 观众id字符串public int getWatchTimeDuration()
IPLVCommonVideoView
getWatchTimeDuration
在接口中 IPLVCommonVideoView<R>
public int getStayTimeDuration()
IPLVCommonVideoView
getStayTimeDuration
在接口中 IPLVCommonVideoView<R>
public void setOption(PLVPlayOption playOption)
public void playByMode(PLVBaseVideoParams params, int mode)
IPLVCommonVideoView
playByMode
在接口中 IPLVCommonVideoView<R>
params
- 请求数据实体的结构 通过这个结构可以统一点播与直播的播放入口mode
- 播放的类型,确定需要解析的参数public void playFromHeadAd()
IPLVCommonVideoView
#play()
的播放流程。playFromHeadAd
在接口中 IPLVCommonVideoView<R>
public boolean playTailAd()
IPLVCommonVideoView
playTailAd
在接口中 IPLVCommonVideoView<R>
PLVAuxiliaryVideoview.isOpenTailAd()
public boolean playTeaser()
IPLVCommonVideoView
playTeaser
在接口中 IPLVCommonVideoView<R>
PLVAuxiliaryVideoview.isOpenTeaser()
public boolean playSkipHeadAd()
IPLVCommonVideoView
playSkipHeadAd
在接口中 IPLVCommonVideoView<R>
public boolean playSkipHeadAd(boolean isSkipAll)
IPLVCommonVideoView
playSkipHeadAd
在接口中 IPLVCommonVideoView<R>
isSkipAll
- 是否跳过所有的片头广告public boolean canPlaySkipHeadAd()
IPLVCommonVideoView
canPlaySkipHeadAd
在接口中 IPLVCommonVideoView<R>
public void startFromNew()
IPLVCommonVideoView
startFromNew
在接口中 IPLVCommonVideoView<R>
protected void onNetWorkRecover()
protected void onNetWorkError()
public PLVAuxiliaryVideoview getSubVideoView()
IPLVCommonVideoView
getSubVideoView
在接口中 IPLVCommonVideoView<R>
protected IPLVVideoViewNotifyer createNotifyer(IPLVVideoViewNotifyer polyvVideoViewNotifyer)
protected void cancelBufferingTimer()
protected void reconnect()
protected boolean prepare(boolean isPreload)
public boolean onTrackballEvent(android.view.MotionEvent ev)
protected void afterHeadAdPlay()
protected java.lang.String addPlayUriParams(java.lang.String uri)
protected void setVideoURI(android.net.Uri uri)
protected void beginDemandPlayPolling()
protected void setLocalWatchTime()
protected void setVideoURIFromSelf(java.lang.String uri)
protected void clear()
public void stopPlay()
public void destroy()
public java.lang.String getErrorMessage(java.lang.Throwable e)
protected void notifyOnGetLogoListener(java.lang.String logoImage, java.lang.Double logoOpacity, java.lang.String logoPosition, java.lang.String logoHref)
public void setOnGetLogoListener(IPLVVideoViewListenerEvent.OnGetLogoListener l)
public void setOnVideoLoadSlowListener(IPLVVideoViewListenerEvent.OnVideoLoadSlowListener l)
protected abstract void requestModleVO(PLVBaseVideoParams params, int mode)
protected abstract boolean onPlayInfo(int what, int extra)
protected abstract boolean onPlayPrepared()
protected abstract boolean onPlayError(int what, int extra)
protected abstract boolean onPlayCompelete()
protected abstract boolean onPlaySeek()
protected abstract void staticsVideoViewPlay()
protected abstract android.net.Uri createPlayUri()
protected abstract boolean isValidatePlayId()