-
- All Implemented Interfaces:
-
android.graphics.drawable.Drawable.Callback,android.view.KeyEvent.Callback,android.view.View.OnClickListener,android.view.View.OnTouchListener,android.view.ViewManager,android.view.ViewParent,android.view.accessibility.AccessibilityEventSource,android.widget.SeekBar.OnSeekBarChangeListener,com.shuyu.gsyvideoplayer.listener.GSYMediaPlayerListener,com.shuyu.gsyvideoplayer.render.view.listener.IGSYSurfaceListener,com.shuyu.gsyvideoplayer.utils.MeasureHelper.MeasureFormVideoParamsListener
public abstract class GSYBaseVideoPlayer extends GSYVideoControlView
处理全屏和小屏幕逻辑 Created by shuyu on 2016/11/17.
-
-
Field Summary
Fields Modifier and Type Field Description protected booleanisNeedAutoAdaptation
-
Constructor Summary
Constructors Constructor Description GSYBaseVideoPlayer(Context context, Boolean fullFlag)GSYBaseVideoPlayer(Context context)GSYBaseVideoPlayer(Context context, AttributeSet attrs)GSYBaseVideoPlayer(Context context, AttributeSet attrs, int defStyleAttr)
-
Method Summary
Modifier and Type Method Description booleanisNeedAutoAdaptation()voidonBackFullscreen()voidonPrepared()voidonInfo(int what, int extra)booleanisVerticalFullByVideoSize()是否根据视频尺寸,自动选择竖屏全屏或者横屏全屏,注意,这时候默认旋转无效 voidonConfigurationChanged(Activity activity, Configuration newConfig, OrientationUtils orientationUtils)旋转处理 voidonConfigurationChanged(Activity activity, Configuration newConfig, OrientationUtils orientationUtils, boolean hideActionBar, boolean hideStatusBar)旋转处理 OrientationOptiongetOrientationOption()可配置旋转 OrientationUtils GSYBaseVideoPlayerstartWindowFullscreen(Context context, boolean actionBar, boolean statusBar)利用window层播放全屏效果 GSYBaseVideoPlayershowSmallVideo(Point size, boolean actionBar, boolean statusBar)显示小窗口 voidhideSmallVideo()隐藏小窗口 booleanisShowFullAnimation()voidsetShowFullAnimation(boolean showFullAnimation)全屏动画 booleanisRotateViewAuto()voidsetRotateViewAuto(boolean rotateViewAuto)是否开启自动旋转 booleanisLockLand()voidsetLockLand(boolean lockLand)一全屏就锁屏横屏,默认false竖屏,可配合setRotateViewAuto使用 booleanisRotateWithSystem()voidsetRotateWithSystem(boolean rotateWithSystem)是否更新系统旋转,false的话,系统禁止旋转也会跟着旋转 GSYVideoPlayergetFullWindowPlayer()获取全屏播放器对象 GSYVideoPlayergetSmallWindowPlayer()获取小窗口播放器对象 GSYBaseVideoPlayergetCurrentPlayer()获取当前长在播放的播放控件 voidsetBackFromFullScreenListener(View.OnClickListener backFromFullScreenListener)全屏返回监听,如果设置了,默认返回动作无效包含返回键和全屏返回按键,前提是这两个按键存在 voidsetFullHideActionBar(boolean actionBar)voidsetFullHideStatusBar(boolean statusBar)booleanisFullHideActionBar()booleanisFullHideStatusBar()intgetSaveBeforeFullSystemUiVisibility()voidsetSaveBeforeFullSystemUiVisibility(int systemUiVisibility)booleanisAutoFullWithSize()voidsetAutoFullWithSize(boolean autoFullWithSize)是否根据视频尺寸,自动选择竖屏全屏或者横屏全屏,注意,这时候默认旋转无效 voidsetNeedOrientationUtils(boolean need)是否需要旋转的 OrientationUtils booleanisNeedOrientationUtils()voidsetNeedAutoAdaptation(boolean needAutoAdaptation)是否需要适配在竖屏横屏时,由于刘海屏或者打孔屏占据空间,导致标题显示被遮盖的问题 booleanisOnlyRotateLand()voidsetOnlyRotateLand(boolean onlyRotateLand)旋转时仅处理横屏 -
Methods inherited from class com.shuyu.gsyvideoplayer.video.base.GSYVideoControlView
clearThumbImageView, getBackButton, getDismissControlTime, getEnlargeImageRes, getFullscreenButton, getGSYStateUiListener, getSeekRatio, getShrinkImageRes, getStartButton, getThumbImageView, getThumbImageViewLayout, getTitleTextView, initUIState, isHideKey, isNeedLockFull, isNeedShowWifiTip, isShowDragProgressTextOnSeekBar, isSurfaceErrorPlay, isTouchWiget, isTouchWigetFull, onAutoCompletion, onBufferingUpdate, onClick, onError, onProgressChanged, onStartTrackingTouch, onStopTrackingTouch, onTouch, setDismissControlTime, setEnlargeImageRes, setGSYStateUiListener, setGSYVideoProgressListener, setHideKey, setIsTouchWiget, setIsTouchWigetFull, setLockClickListener, setNeedLockFull, setNeedShowWifiTip, setSeekRatio, setShowDragProgressTextOnSeekBar, setShrinkImageRes, setSurfaceErrorPlay, setThumbImageView, setThumbPlay, setUp, setUp, setUpLazy -
Methods inherited from class com.shuyu.gsyvideoplayer.video.base.GSYVideoView
clearCurrentCache, getBuffterPoint, getCurrentPositionWhenPlaying, getCurrentState, getCurrentVideoHeight, getCurrentVideoWidth, getDuration, getGSYVideoManager, getLayoutId, getMapHeadData, getNetSpeed, getNetSpeedText, getOverrideExtension, getPlayPosition, getPlayTag, getSeekOnStart, getSpeed, getVideoSarDen, getVideoSarNum, isIfCurrentIsFullscreen, isInPlayingState, isLooping, isReleaseWhenLossAudio, isShowPauseCover, isStartAfterPrepared, onCompletion, onSeekComplete, onVideoPause, onVideoReset, onVideoResume, onVideoResume, onVideoSizeChanged, release, seekTo, setIfCurrentIsFullscreen, setLooping, setMapHeadData, setOverrideExtension, setPlayPosition, setPlayTag, setReleaseWhenLossAudio, setSeekOnStart, setShowPauseCover, setSpeed, setSpeed, setSpeed, setSpeedPlaying, setStartAfterPrepared, setUp, setVideoAllCallBack, startAfterPrepared, startPlayLogic -
Methods inherited from class com.shuyu.gsyvideoplayer.video.base.GSYTextureRenderView
getEffectFilter, getRenderProxy, onSurfaceAvailable, onSurfaceDestroyed, onSurfaceSizeChanged, onSurfaceUpdated, setCustomGLRenderer, setEffectFilter, setGLRenderMode, setMatrixGL -
Methods inherited from class android.widget.FrameLayout
generateLayoutParams, getAccessibilityClassName, getConsiderGoneChildrenWhenMeasuring, getMeasureAllChildren, setForegroundGravity, setMeasureAllChildren, shouldDelayChildPressedState -
Methods inherited from class android.view.ViewGroup
addChildrenForAccessibility, addExtraDataToAccessibilityNodeInfo, addFocusables, addKeyboardNavigationClusters, addStatesFromChildren, addTouchables, addView, bringChildToFront, childDrawableStateChanged, childHasTransientStateChanged, clearChildFocus, clearDisappearingChildren, clearFocus, dispatchApplyWindowInsets, dispatchCapturedPointerEvent, dispatchConfigurationChanged, dispatchCreateViewTranslationRequest, dispatchDisplayHint, dispatchDragEvent, dispatchDrawableHotspotChanged, dispatchFinishTemporaryDetach, dispatchKeyEvent, dispatchKeyEventPreIme, dispatchKeyShortcutEvent, dispatchPointerCaptureChanged, dispatchProvideAutofillStructure, dispatchProvideStructure, dispatchScrollCaptureSearch, dispatchSetActivated, dispatchSetSelected, dispatchStartTemporaryDetach, dispatchSystemUiVisibilityChanged, dispatchTouchEvent, dispatchTrackballEvent, dispatchUnhandledMove, dispatchWindowFocusChanged, dispatchWindowInsetsAnimationEnd, dispatchWindowInsetsAnimationPrepare, dispatchWindowInsetsAnimationProgress, dispatchWindowInsetsAnimationStart, dispatchWindowSystemUiVisiblityChanged, dispatchWindowVisibilityChanged, endViewTransition, findFocus, findOnBackInvokedDispatcherForChild, findViewsWithText, focusSearch, focusableViewAvailable, gatherTransparentRegion, getChildAt, getChildCount, getChildMeasureSpec, getChildVisibleRect, getClipChildren, getClipToPadding, getDescendantFocusability, getFocusedChild, getLayoutAnimation, getLayoutAnimationListener, getLayoutMode, getLayoutTransition, getNestedScrollAxes, getOverlay, getPersistentDrawingCache, getTouchscreenBlocksFocus, hasFocus, hasTransientState, indexOfChild, invalidateChild, invalidateChildInParent, isAlwaysDrawnWithCacheEnabled, isAnimationCacheEnabled, isLayoutSuppressed, isMotionEventSplittingEnabled, isTransitionGroup, jumpDrawablesToCurrentState, layout, notifySubtreeAccessibilityStateChanged, offsetDescendantRectToMyCoords, offsetRectIntoDescendantCoords, onDescendantInvalidated, onInterceptHoverEvent, onInterceptTouchEvent, onNestedFling, onNestedPreFling, onNestedPrePerformAccessibilityAction, onNestedPreScroll, onNestedScroll, onNestedScrollAccepted, onRequestSendAccessibilityEvent, onResolvePointerIcon, onStartNestedScroll, onStopNestedScroll, onViewAdded, onViewRemoved, recomputeViewAttributes, removeAllViews, removeAllViewsInLayout, removeView, removeViewAt, removeViewInLayout, removeViews, removeViewsInLayout, requestChildFocus, requestChildRectangleOnScreen, requestDisallowInterceptTouchEvent, requestFocus, requestSendAccessibilityEvent, requestTransparentRegion, restoreDefaultFocus, scheduleLayoutAnimation, setAddStatesFromChildren, setAlwaysDrawnWithCacheEnabled, setAnimationCacheEnabled, setClipChildren, setClipToPadding, setDescendantFocusability, setLayoutAnimation, setLayoutAnimationListener, setLayoutMode, setLayoutTransition, setMotionEventSplittingEnabled, setOnHierarchyChangeListener, setPersistentDrawingCache, setTouchscreenBlocksFocus, setTransitionGroup, setWindowInsetsAnimationCallback, showContextMenuForChild, startActionModeForChild, startLayoutAnimation, startViewTransition, suppressLayout, updateViewLayout -
Methods inherited from class android.view.View
addOnAttachStateChangeListener, addOnLayoutChangeListener, addOnUnhandledKeyEventListener, animate, announceForAccessibility, autofill, bringToFront, buildDrawingCache, buildLayer, callOnClick, canResolveLayoutDirection, canResolveTextAlignment, canResolveTextDirection, canScrollHorizontally, canScrollVertically, cancelDragAndDrop, cancelLongPress, cancelPendingInputEvents, checkInputConnectionProxy, clearAnimation, clearViewTranslationCallback, combineMeasuredStates, computeScroll, computeSystemWindowInsets, createAccessibilityNodeInfo, createContextMenu, destroyDrawingCache, dispatchGenericMotionEvent, dispatchNestedFling, dispatchNestedPreFling, dispatchNestedPrePerformAccessibilityAction, dispatchNestedPreScroll, dispatchNestedScroll, dispatchPopulateAccessibilityEvent, draw, drawableHotspotChanged, findOnBackInvokedDispatcher, findViewById, findViewWithTag, forceHasOverlappingRendering, forceLayout, generateDisplayHash, generateViewId, getAccessibilityDelegate, getAccessibilityLiveRegion, getAccessibilityNodeProvider, getAccessibilityPaneTitle, getAccessibilityTraversalAfter, getAccessibilityTraversalBefore, getAllowedHandwritingDelegatePackageName, getAllowedHandwritingDelegatorPackageName, getAlpha, getAnimation, getAnimationMatrix, getApplicationWindowToken, getAttributeResolutionStack, getAttributeSourceResourceMap, getAutofillHints, getAutofillId, getAutofillType, getAutofillValue, getBackground, getBackgroundTintBlendMode, getBackgroundTintList, getBackgroundTintMode, getBaseline, getBottom, getCameraDistance, getClipBounds, getClipBounds, getClipToOutline, getContentCaptureSession, getContentDescription, getContext, getDefaultFocusHighlightEnabled, getDefaultSize, getDisplay, getDrawableState, getDrawingCache, getDrawingCacheBackgroundColor, getDrawingCacheQuality, getDrawingRect, getDrawingTime, getElevation, getExplicitStyle, getFilterTouchesWhenObscured, getFitsSystemWindows, getFocusable, getFocusables, getFocusedRect, getForeground, getForegroundGravity, getForegroundTintBlendMode, getForegroundTintList, getForegroundTintMode, getGlobalVisibleRect, getHandler, getHandwritingBoundsOffsetBottom, getHandwritingBoundsOffsetLeft, getHandwritingBoundsOffsetRight, getHandwritingBoundsOffsetTop, getHandwritingDelegatorCallback, getHasOverlappingRendering, getHeight, getHitRect, getHorizontalFadingEdgeLength, getHorizontalScrollbarThumbDrawable, getHorizontalScrollbarTrackDrawable, getId, getImportantForAccessibility, getImportantForAutofill, getImportantForContentCapture, getKeepScreenOn, getKeyDispatcherState, getLabelFor, getLayerType, getLayoutDirection, getLayoutParams, getLeft, getLocalVisibleRect, getLocationInSurface, getLocationInWindow, getLocationOnScreen, getMatrix, getMeasuredHeight, getMeasuredHeightAndState, getMeasuredState, getMeasuredWidth, getMeasuredWidthAndState, getMinimumHeight, getMinimumWidth, getNextClusterForwardId, getNextFocusDownId, getNextFocusForwardId, getNextFocusLeftId, getNextFocusRightId, getNextFocusUpId, getOnFocusChangeListener, getOutlineAmbientShadowColor, getOutlineProvider, getOutlineSpotShadowColor, getOverScrollMode, getOverlay, getPaddingBottom, getPaddingEnd, getPaddingLeft, getPaddingRight, getPaddingStart, getPaddingTop, getParent, getParentForAccessibility, getPivotX, getPivotY, getPointerIcon, getPreferKeepClearRects, getReceiveContentMimeTypes, getResources, getRevealOnFocusHint, getRight, getRootSurfaceControl, getRootView, getRootWindowInsets, getRotation, getRotationX, getRotationY, getScaleX, getScaleY, getScrollBarDefaultDelayBeforeFade, getScrollBarFadeDuration, getScrollBarSize, getScrollBarStyle, getScrollCaptureHint, getScrollIndicators, getScrollX, getScrollY, getSolidColor, getSourceLayoutResId, getStateDescription, getStateListAnimator, getSystemGestureExclusionRects, getSystemUiVisibility, getTag, getTextAlignment, getTextDirection, getTooltipText, getTop, getTouchDelegate, getTouchables, getTransitionAlpha, getTransitionName, getTranslationX, getTranslationY, getTranslationZ, getUniqueDrawingId, getVerticalFadingEdgeLength, getVerticalScrollbarPosition, getVerticalScrollbarThumbDrawable, getVerticalScrollbarTrackDrawable, getVerticalScrollbarWidth, getViewTranslationResponse, getViewTreeObserver, getVisibility, getWidth, getWindowId, getWindowInsetsController, getWindowSystemUiVisibility, getWindowToken, getWindowVisibility, getWindowVisibleDisplayFrame, getX, getY, getZ, hasExplicitFocusable, hasFocusable, hasNestedScrollingParent, hasOnClickListeners, hasOnLongClickListeners, hasOverlappingRendering, hasPointerCapture, hasWindowFocus, inflate, invalidate, invalidateDrawable, invalidateOutline, isAccessibilityDataSensitive, isAccessibilityFocused, isAccessibilityHeading, isActivated, isAttachedToWindow, isAutoHandwritingEnabled, isClickable, isContextClickable, isCredential, isDirty, isDrawingCacheEnabled, isDuplicateParentStateEnabled, isEnabled, isFocusable, isFocusableInTouchMode, isFocused, isFocusedByDefault, isForceDarkAllowed, isHandwritingDelegate, isHapticFeedbackEnabled, isHardwareAccelerated, isHorizontalFadingEdgeEnabled, isHorizontalScrollBarEnabled, isHovered, isImportantForAccessibility, isImportantForAutofill, isImportantForContentCapture, isInEditMode, isInLayout, isInTouchMode, isKeyboardNavigationCluster, isLaidOut, isLayoutDirectionResolved, isLayoutRequested, isLongClickable, isNestedScrollingEnabled, isOpaque, isPaddingRelative, isPivotSet, isPreferKeepClear, isPressed, isSaveEnabled, isSaveFromParentEnabled, isScreenReaderFocusable, isScrollContainer, isScrollbarFadingEnabled, isSelected, isShowingLayoutBounds, isShown, isSoundEffectsEnabled, isTemporarilyDetached, isTextAlignmentResolved, isTextDirectionResolved, isVerticalFadingEdgeEnabled, isVerticalScrollBarEnabled, isVisibleToUserForAutofill, keyboardNavigationClusterSearch, measure, offsetLeftAndRight, offsetTopAndBottom, onApplyWindowInsets, onCancelPendingInputEvents, onCapturedPointerEvent, onCheckIsTextEditor, onCreateInputConnection, onCreateViewTranslationRequest, onCreateVirtualViewTranslationRequests, onDragEvent, onDrawForeground, onFilterTouchEventForSecurity, onFinishTemporaryDetach, onGenericMotionEvent, onHoverChanged, onHoverEvent, onInitializeAccessibilityEvent, onInitializeAccessibilityNodeInfo, onKeyDown, onKeyLongPress, onKeyMultiple, onKeyPreIme, onKeyShortcut, onKeyUp, onPointerCaptureChange, onPopulateAccessibilityEvent, onProvideAutofillStructure, onProvideAutofillVirtualStructure, onProvideContentCaptureStructure, onProvideStructure, onProvideVirtualStructure, onReceiveContent, onRtlPropertiesChanged, onScreenStateChanged, onScrollCaptureSearch, onStartTemporaryDetach, onTouchEvent, onTrackballEvent, onViewTranslationResponse, onVirtualViewTranslationResponses, onVisibilityAggregated, onWindowFocusChanged, onWindowSystemUiVisibilityChanged, performAccessibilityAction, performClick, performContextClick, performHapticFeedback, performLongClick, performReceiveContent, playSoundEffect, post, postDelayed, postInvalidate, postInvalidateDelayed, postInvalidateOnAnimation, postOnAnimation, postOnAnimationDelayed, refreshDrawableState, releasePointerCapture, removeCallbacks, removeOnAttachStateChangeListener, removeOnLayoutChangeListener, removeOnUnhandledKeyEventListener, requestApplyInsets, requestFitSystemWindows, requestFocusFromTouch, requestLayout, requestPointerCapture, requestRectangleOnScreen, requestUnbufferedDispatch, requireViewById, resetPivot, resolveSize, resolveSizeAndState, restoreHierarchyState, saveAttributeDataForStyleable, saveHierarchyState, scheduleDrawable, scrollBy, scrollTo, sendAccessibilityEvent, sendAccessibilityEventUnchecked, setAccessibilityDataSensitive, setAccessibilityDelegate, setAccessibilityHeading, setAccessibilityLiveRegion, setAccessibilityPaneTitle, setAccessibilityTraversalAfter, setAccessibilityTraversalBefore, setActivated, setAllowClickWhenDisabled, setAllowedHandwritingDelegatePackage, setAllowedHandwritingDelegatorPackage, setAlpha, setAnimation, setAnimationMatrix, setAutoHandwritingEnabled, setAutofillHints, setAutofillId, setBackground, setBackgroundColor, setBackgroundDrawable, setBackgroundResource, setBackgroundTintBlendMode, setBackgroundTintList, setBackgroundTintMode, setBottom, setCameraDistance, setClickable, setClipBounds, setClipToOutline, setContentCaptureSession, setContentDescription, setContextClickable, setDefaultFocusHighlightEnabled, setDrawingCacheBackgroundColor, setDrawingCacheEnabled, setDrawingCacheQuality, setDuplicateParentStateEnabled, setElevation, setEnabled, setFadingEdgeLength, setFilterTouchesWhenObscured, setFitsSystemWindows, setFocusable, setFocusableInTouchMode, setFocusedByDefault, setForceDarkAllowed, setForeground, setForegroundTintBlendMode, setForegroundTintList, setForegroundTintMode, setHandwritingBoundsOffsets, setHandwritingDelegatorCallback, setHapticFeedbackEnabled, setHasTransientState, setHorizontalFadingEdgeEnabled, setHorizontalScrollBarEnabled, setHorizontalScrollbarThumbDrawable, setHorizontalScrollbarTrackDrawable, setHovered, setId, setImportantForAccessibility, setImportantForAutofill, setImportantForContentCapture, setIsCredential, setIsHandwritingDelegate, setKeepScreenOn, setKeyboardNavigationCluster, setLabelFor, setLayerPaint, setLayerType, setLayoutDirection, setLayoutParams, setLeft, setLeftTopRightBottom, setLongClickable, setMinimumHeight, setMinimumWidth, setNestedScrollingEnabled, setNextClusterForwardId, setNextFocusDownId, setNextFocusForwardId, setNextFocusLeftId, setNextFocusRightId, setNextFocusUpId, setOnApplyWindowInsetsListener, setOnCapturedPointerListener, setOnClickListener, setOnContextClickListener, setOnCreateContextMenuListener, setOnDragListener, setOnFocusChangeListener, setOnGenericMotionListener, setOnHoverListener, setOnKeyListener, setOnLongClickListener, setOnReceiveContentListener, setOnScrollChangeListener, setOnSystemUiVisibilityChangeListener, setOnTouchListener, setOutlineAmbientShadowColor, setOutlineProvider, setOutlineSpotShadowColor, setOverScrollMode, setPadding, setPaddingRelative, setPivotX, setPivotY, setPointerIcon, setPreferKeepClear, setPreferKeepClearRects, setPressed, setRenderEffect, setRevealOnFocusHint, setRight, setRotation, setRotationX, setRotationY, setSaveEnabled, setSaveFromParentEnabled, setScaleX, setScaleY, setScreenReaderFocusable, setScrollBarDefaultDelayBeforeFade, setScrollBarFadeDuration, setScrollBarSize, setScrollBarStyle, setScrollCaptureCallback, setScrollCaptureHint, setScrollContainer, setScrollIndicators, setScrollX, setScrollY, setScrollbarFadingEnabled, setSelected, setSoundEffectsEnabled, setStateDescription, setStateListAnimator, setSystemGestureExclusionRects, setSystemUiVisibility, setTag, setTextAlignment, setTextDirection, setTooltipText, setTop, setTouchDelegate, setTransitionAlpha, setTransitionName, setTransitionVisibility, setTranslationX, setTranslationY, setTranslationZ, setVerticalFadingEdgeEnabled, setVerticalScrollBarEnabled, setVerticalScrollbarPosition, setVerticalScrollbarThumbDrawable, setVerticalScrollbarTrackDrawable, setViewTranslationCallback, setVisibility, setWillNotCacheDrawing, setWillNotDraw, setX, setY, setZ, showContextMenu, startActionMode, startAnimation, startDrag, startDragAndDrop, startNestedScroll, stopNestedScroll, toString, transformMatrixToGlobal, transformMatrixToLocal, unscheduleDrawable, updateDragShadow, willNotCacheDrawing, willNotDraw -
Methods inherited from class com.shuyu.gsyvideoplayer.listener.GSYMediaPlayerListener
onBufferingUpdate -
Methods inherited from class android.view.View.OnClickListener
onClick -
Methods inherited from class android.view.View.OnTouchListener
onTouch -
Methods inherited from class android.widget.SeekBar.OnSeekBarChangeListener
onProgressChanged, onStartTrackingTouch, onStopTrackingTouch -
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
-
Constructor Detail
-
GSYBaseVideoPlayer
GSYBaseVideoPlayer(Context context)
-
GSYBaseVideoPlayer
GSYBaseVideoPlayer(Context context, AttributeSet attrs)
-
GSYBaseVideoPlayer
GSYBaseVideoPlayer(Context context, AttributeSet attrs, int defStyleAttr)
-
-
Method Detail
-
isNeedAutoAdaptation
boolean isNeedAutoAdaptation()
-
onBackFullscreen
void onBackFullscreen()
-
onPrepared
void onPrepared()
-
onInfo
void onInfo(int what, int extra)
-
isVerticalFullByVideoSize
boolean isVerticalFullByVideoSize()
是否根据视频尺寸,自动选择竖屏全屏或者横屏全屏,注意,这时候默认旋转无效
-
onConfigurationChanged
void onConfigurationChanged(Activity activity, Configuration newConfig, OrientationUtils orientationUtils)
旋转处理
- Parameters:
activity- 页面newConfig- 配置orientationUtils- 旋转工具类
-
onConfigurationChanged
void onConfigurationChanged(Activity activity, Configuration newConfig, OrientationUtils orientationUtils, boolean hideActionBar, boolean hideStatusBar)
旋转处理
- Parameters:
activity- 页面newConfig- 配置orientationUtils- 旋转工具类hideActionBar- 是否隐藏actionbarhideStatusBar- 是否隐藏statusbar
-
getOrientationOption
OrientationOption getOrientationOption()
可配置旋转 OrientationUtils
-
startWindowFullscreen
GSYBaseVideoPlayer startWindowFullscreen(Context context, boolean actionBar, boolean statusBar)
利用window层播放全屏效果
- Parameters:
actionBar- 是否有actionBar,有的话需要隐藏statusBar- 是否有状态bar,有的话需要隐藏
-
showSmallVideo
GSYBaseVideoPlayer showSmallVideo(Point size, boolean actionBar, boolean statusBar)
显示小窗口
-
hideSmallVideo
void hideSmallVideo()
隐藏小窗口
-
isShowFullAnimation
boolean isShowFullAnimation()
-
setShowFullAnimation
void setShowFullAnimation(boolean showFullAnimation)
全屏动画
- Parameters:
showFullAnimation- 是否使用全屏动画效果
-
isRotateViewAuto
boolean isRotateViewAuto()
-
setRotateViewAuto
void setRotateViewAuto(boolean rotateViewAuto)
是否开启自动旋转
-
isLockLand
boolean isLockLand()
-
setLockLand
void setLockLand(boolean lockLand)
一全屏就锁屏横屏,默认false竖屏,可配合setRotateViewAuto使用
-
isRotateWithSystem
boolean isRotateWithSystem()
-
setRotateWithSystem
void setRotateWithSystem(boolean rotateWithSystem)
是否更新系统旋转,false的话,系统禁止旋转也会跟着旋转
- Parameters:
rotateWithSystem- 默认true
-
getFullWindowPlayer
GSYVideoPlayer getFullWindowPlayer()
获取全屏播放器对象
-
getSmallWindowPlayer
GSYVideoPlayer getSmallWindowPlayer()
获取小窗口播放器对象
-
getCurrentPlayer
GSYBaseVideoPlayer getCurrentPlayer()
获取当前长在播放的播放控件
-
setBackFromFullScreenListener
void setBackFromFullScreenListener(View.OnClickListener backFromFullScreenListener)
全屏返回监听,如果设置了,默认返回动作无效包含返回键和全屏返回按键,前提是这两个按键存在
-
setFullHideActionBar
void setFullHideActionBar(boolean actionBar)
-
setFullHideStatusBar
void setFullHideStatusBar(boolean statusBar)
-
isFullHideActionBar
boolean isFullHideActionBar()
-
isFullHideStatusBar
boolean isFullHideStatusBar()
-
getSaveBeforeFullSystemUiVisibility
int getSaveBeforeFullSystemUiVisibility()
-
setSaveBeforeFullSystemUiVisibility
void setSaveBeforeFullSystemUiVisibility(int systemUiVisibility)
-
isAutoFullWithSize
boolean isAutoFullWithSize()
-
setAutoFullWithSize
void setAutoFullWithSize(boolean autoFullWithSize)
是否根据视频尺寸,自动选择竖屏全屏或者横屏全屏,注意,这时候默认旋转无效
- Parameters:
autoFullWithSize- 默认false
-
setNeedOrientationUtils
void setNeedOrientationUtils(boolean need)
是否需要旋转的 OrientationUtils
- Parameters:
need- 默认 true
-
isNeedOrientationUtils
boolean isNeedOrientationUtils()
-
setNeedAutoAdaptation
void setNeedAutoAdaptation(boolean needAutoAdaptation)
是否需要适配在竖屏横屏时,由于刘海屏或者打孔屏占据空间,导致标题显示被遮盖的问题
- Parameters:
needAutoAdaptation- 默认false
-
isOnlyRotateLand
boolean isOnlyRotateLand()
-
setOnlyRotateLand
void setOnlyRotateLand(boolean onlyRotateLand)
旋转时仅处理横屏
-
-
-
-