-
Notifications
You must be signed in to change notification settings - Fork 2.4k
Customizing Code
The most important task related to customization is inheriting JZVideoPlayerStandard first!!!
The most important task related to customization is inheriting JZVideoPlayerStandard first!!!
The most important task related to customization is inheriting JZVideoPlayerStandard first!!!
By inheriting from JZVideoPlayerStandard
, this section gives a brief description of the main methods of its lifecycle. Most code customizations involve modifying one or more of these methods:
-
init: This is the first call when the playback control is initialized.
-
onClick: This method handles click in all
VideoPlayer
UI controls, such as start button, full screen button, blank click, retry button, and so on. If you want to intercept the click response or inherit the click response, then override this method. -
onTouch: In JZVideoPlayer this function mainly responds to gesture control volume, brightness and progress after full screen.
-
startVideo: Start video playback flow.
-
onVideoRendingStart: After the video starts playing, it enters the preparing state. When the video is ready, it enters the
onVideoRendingStart
function and starts playing. -
onStateNormal: Control enters normal unplayed state.
-
onStatePreparing: Enter preparation state, initializing video.
-
onStatePlaying: After preparing to enter playback.
-
onStatePause: Pause video and enter pause.
-
onStatePlaybackBufferingStart: Seek progress during playback, enter the state of the cached video.
-
onStateError: Enter error state.
-
onStateAutoComplete: Enter video auto play completion status.
-
onInfo:
android.media.MediaPlayer
callback info. -
onError:
android.media.MediaPlayer
callback error. -
startWindowFullscreen: Enter fullscreen.
-
startWindowTiny: Enter small screen.