Class EasyVideoPlayer
-
- All Implemented Interfaces:
public class EasyVideoPlayer
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public interfaceEasyVideoPlayer.OnInfoCallBack
-
Field Summary
Fields Modifier and Type Field Description public final static StringTAGpublic final static intPLAYER_STATUS_STARTEDpublic final static intPLAYER_STATUS_PAUSEDpublic final static intPLAYER_STATUS_PREPARINGpublic final static intPLAYER_STATUS_PREPAREDpublic final static intPLAYER_STATUS_COMPLETIONpublic final static intPLAYER_STATUS_CLOSEpublic intcurrentPlayerStatuspublic intbeforePausePlayerStatuspublic static booleansupportDragSeekpublic static floatdragFactor
-
Constructor Summary
Constructors Constructor Description EasyVideoPlayer(Context context)EasyVideoPlayer(Context context, AttributeSet attrs)EasyVideoPlayer(Context context, AttributeSet attrs, int defStyleAttr)
-
Method Summary
Modifier and Type Method Description intgetCurrentPlayerStatus()intgetBeforePausePlayerStatus()booleanonInterceptTouchEvent(MotionEvent event)voidsetSource(Uri source)voidsetCallback(EasyVideoCallback callback)voidsetProgressCallback(EasyVideoProgressCallback callback)voidsetHideControlsOnPlay(boolean hide)voidsetAutoPlay(boolean autoPlay)voidsetInitialPosition(int pos)voidsetFromSightListImageInVisible()voidshowControls()voidshowControlsImmediately()Show controls immediately without animation or delay voidhideControls()booleanisControlsShown()voidtoggleControls()voidenableControls(boolean andShow)voiddisableControls()booleanisPrepared()booleanisPlaying()intgetCurrentPosition()intgetDuration()voidstart()voidseekTo(int pos)voidsetVolume(float leftVolume, float rightVolume)voidresume()voidpause()voidstop()voidreset()voidrelease()voidsetAutoFullscreen(boolean autoFullscreen)voidsetLoop(boolean loop)voidonSurfaceTextureAvailable(SurfaceTexture surfaceTexture, int width, int height)voidonSurfaceTextureSizeChanged(SurfaceTexture surfaceTexture, int width, int height)booleanonSurfaceTextureDestroyed(SurfaceTexture surfaceTexture)voidonSurfaceTextureUpdated(SurfaceTexture surfaceTexture)voidonPrepared(MediaPlayer mediaPlayer)voidonBufferingUpdate(MediaPlayer mediaPlayer, int percent)voidonCompletion(MediaPlayer mediaPlayer)voidonVideoSizeChanged(MediaPlayer mediaPlayer, int width, int height)booleanonError(MediaPlayer mediaPlayer, int what, int extra)voidonClick(View view)voidonProgressChanged(SeekBar seekBar, int value, boolean fromUser)voidonStartTrackingTouch(SeekBar seekBar)voidonStopTrackingTouch(SeekBar seekBar)ImageViewgetImageViewSightList()booleanonInfo(MediaPlayer mp, int what, int extra)voidsetOnInfoListener(EasyVideoPlayer.OnInfoCallBack callBack)booleanonLongClick(View view)voidsetplayBtnVisible(int visible)voidsetSeekBarClickable(boolean pIsClickable)voidsetLongClickable(boolean isLongClickable)-
-
Method Detail
-
getCurrentPlayerStatus
int getCurrentPlayerStatus()
-
getBeforePausePlayerStatus
int getBeforePausePlayerStatus()
-
onInterceptTouchEvent
boolean onInterceptTouchEvent(MotionEvent event)
-
setSource
void setSource(Uri source)
-
setCallback
void setCallback(EasyVideoCallback callback)
-
setProgressCallback
void setProgressCallback(EasyVideoProgressCallback callback)
-
setHideControlsOnPlay
void setHideControlsOnPlay(boolean hide)
-
setAutoPlay
void setAutoPlay(boolean autoPlay)
-
setInitialPosition
void setInitialPosition(int pos)
-
setFromSightListImageInVisible
void setFromSightListImageInVisible()
-
showControls
void showControls()
-
showControlsImmediately
void showControlsImmediately()
Show controls immediately without animation or delay
-
hideControls
void hideControls()
-
isControlsShown
boolean isControlsShown()
-
toggleControls
void toggleControls()
-
enableControls
void enableControls(boolean andShow)
-
disableControls
void disableControls()
-
isPrepared
boolean isPrepared()
-
isPlaying
boolean isPlaying()
-
getCurrentPosition
int getCurrentPosition()
-
getDuration
int getDuration()
-
start
void start()
-
seekTo
void seekTo(int pos)
-
setVolume
void setVolume(float leftVolume, float rightVolume)
-
resume
void resume()
-
pause
void pause()
-
stop
void stop()
-
reset
void reset()
-
release
void release()
-
setAutoFullscreen
void setAutoFullscreen(boolean autoFullscreen)
-
setLoop
void setLoop(boolean loop)
-
onSurfaceTextureAvailable
void onSurfaceTextureAvailable(SurfaceTexture surfaceTexture, int width, int height)
-
onSurfaceTextureSizeChanged
void onSurfaceTextureSizeChanged(SurfaceTexture surfaceTexture, int width, int height)
-
onSurfaceTextureDestroyed
boolean onSurfaceTextureDestroyed(SurfaceTexture surfaceTexture)
-
onSurfaceTextureUpdated
void onSurfaceTextureUpdated(SurfaceTexture surfaceTexture)
-
onPrepared
void onPrepared(MediaPlayer mediaPlayer)
-
onBufferingUpdate
void onBufferingUpdate(MediaPlayer mediaPlayer, int percent)
-
onCompletion
void onCompletion(MediaPlayer mediaPlayer)
-
onVideoSizeChanged
void onVideoSizeChanged(MediaPlayer mediaPlayer, int width, int height)
-
onError
boolean onError(MediaPlayer mediaPlayer, int what, int extra)
-
onClick
void onClick(View view)
-
onProgressChanged
void onProgressChanged(SeekBar seekBar, int value, boolean fromUser)
-
onStartTrackingTouch
void onStartTrackingTouch(SeekBar seekBar)
-
onStopTrackingTouch
void onStopTrackingTouch(SeekBar seekBar)
-
getImageViewSightList
ImageView getImageViewSightList()
-
onInfo
boolean onInfo(MediaPlayer mp, int what, int extra)
-
setOnInfoListener
void setOnInfoListener(EasyVideoPlayer.OnInfoCallBack callBack)
-
onLongClick
boolean onLongClick(View view)
-
setplayBtnVisible
void setplayBtnVisible(int visible)
-
setSeekBarClickable
void setSeekBarClickable(boolean pIsClickable)
-
setLongClickable
void setLongClickable(boolean isLongClickable)
-
-
-
-