-
- All Implemented Interfaces:
-
android.graphics.drawable.Drawable.Callback
,android.view.KeyEvent.Callback
,android.view.ViewManager
,android.view.ViewParent
,android.view.accessibility.AccessibilityEventSource
,android.widget.MediaController.MediaPlayerControl
,com.brightcove.player.event.Component
@Emits(events = {EventType.ERROR, EventType.PAUSE, EventType.PLAY, EventType.READY_TO_PLAY, EventType.SEEK_TO, EventType.STOP, EventType.WILL_CHANGE_VIDEO, EventType.ON_FRAME_AVAILABLE, EventType.PROJECTION_FORMAT_CHANGED})@ListensFor(events = {EventType.ACTIVITY_CREATED, EventType.ACTIVITY_SAVE_INSTANCE_STATE, EventType.ACTIVITY_STARTED, EventType.AD_PROGRESS, EventType.CAPTIONS_LANGUAGES, EventType.COMPLETED, EventType.DID_LOAD_CLOSED_CAPTIONS, EventType.DID_PAUSE, EventType.DID_PLAY, EventType.DID_SEEK_TO, EventType.DID_SET_SOURCE, EventType.DID_SET_VIDEO, EventType.DID_STOP, EventType.HIDE_SEEK_CONTROLS, EventType.PROGRESS, EventType.SEEK_TO, EventType.SHOW_SEEK_CONTROLS, EventType.SOURCE_NOT_PLAYABLE, EventType.VIDEO_DURATION_CHANGED, EventType.WILL_CHANGE_VIDEO, EventType.WILL_INTERRUPT_CONTENT}) public abstract class BaseVideoView extends FrameLayout implements Component, MediaController.MediaPlayerControl
BaseVideoView provides the base functionality for BrightcoveVideoView, which for historical reasons isn't named BrightcoveSurfaceVideoView, and BrightcoveTextureVideoView. Those two classes are designed to be dropped into your XML layouts as a replacement for Android's native VideoView. This class provides public methods to mirror that of VideoView, plus additional logic for handling things like playlists. This class uses an EventEmitter to wire together components, like the VideoDisplayComponent and VideoPlaybackController.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public interface
BaseVideoView.OnVideoViewSizeChangedListener
Interface definition for a callback to be invoked when theBaseVideoView's size changes.
-
Field Summary
Fields Modifier and Type Field Description protected EventEmitter
eventEmitter
protected VideoPlaybackController
playbackController
protected VideoDisplayComponent
videoDisplay
protected VideoStillDisplayComponent
videoStillDisplay
protected int
duration
protected long
durationLong
private boolean
streamConcurrencyEnabled
private ConcurrencyClient
concurrencyClient
private MediaPlayer.OnCompletionListener
onCompletionListener
private MediaPlayer.OnInfoListener
onInfoListener
protected MediaPlayer.OnPreparedListener
onPreparedListener
protected ShutterViewController
shutterViewController
private ZoomController
zoomController
private boolean
isVideoZoomingEnabled
-
Constructor Summary
Constructors Constructor Description BaseVideoView(Context context)
BaseVideoView(Context context, AttributeSet attributeSet)
BaseVideoView(Context context, AttributeSet attributeSet, int defStyle)
-
Method Summary
Modifier and Type Method Description EventEmitter
getEventEmitter()
Getter for the EventEmitter used by this View void
setEventEmitter(EventEmitter eventEmitter)
Sets the eventEmitter and instantiates all inner components.Required to be called before further interactions with theeventEmitter. VideoPlaybackController
getPlaybackController()
Returns the video playback controller, the component of the playerresponsible for managing video playback and emitting cue points. VideoDisplayComponent
getVideoDisplay()
Returns the video display, the low-level component responsible fordecoding and rendering a video. VideoStillDisplayComponent
getVideoStillDisplay()
Returns the video still display, the component of the player that showsand hides the still image if one is available for a video. int
getDuration()
long
getDurationLong()
void
setStreamConcurrencyEnabled(boolean enabled)
Enable Generic Stream Concurrency final ConcurrencyClient
getConcurrencyClient()
Gets the {#ConcurrencyClient} instance being used interactwith the Generic Stream Concurrency mechanism void
setOnCompletionListener(MediaPlayer.OnCompletionListener onCompletionListener)
void
setOnInfoListener(MediaPlayer.OnInfoListener onInfoListener)
void
setOnPreparedListener(MediaPlayer.OnPreparedListener onPreparedListener)
ShutterViewController
getShutterViewController()
ZoomController
getZoomController()
Gets the ZoomController associated with the BrightcoveVideoView. boolean
isVideoZoomingEnabled()
Checks if the video zooming feature is currently enabled. void
addOnVideoViewSizeChangedListener(BaseVideoView.OnVideoViewSizeChangedListener onVideoViewSizeChangedListener)
void
removeOnVideoViewSizeChangedListener(BaseVideoView.OnVideoViewSizeChangedListener onVideoViewSizeChangedListener)
void
setStreamConcurrencyRequestHeaders(Map<String, String> requestHeaders)
Sets the headers values that will be passed on each request to theGeneric Stream Concurrency.The values should be for the account ID, video ID and the JWT. void
setStreamConcurrencySessionsListener(ConcurrencyClient.SessionsListener listener)
Sets a listener to get the active sessions void
requestActiveSessions()
Request the current active sessions. boolean
isStreamConcurrencyEnabled()
Checks whether Generic Stream Concurrency is enabled or not void
requestLayout()
boolean
onTouchEvent(MotionEvent motionEvent)
boolean
onInterceptTouchEvent(MotionEvent ev)
void
setVideoZoomingEnabled(boolean enabled)
Enables or disables the video zooming feature. void
setLayoutParams(ViewGroup.LayoutParams layoutParams)
void
finishInitialization()
This method finishes initializing the BaseVideoView. MediaController
getMediaController()
Access the legacy media controller. BrightcoveMediaController
getBrightcoveMediaController()
Access the Brightcove media controller. PictureInPictureManager
getPictureInPictureManager()
abstract RenderView
getRenderView()
Gets refers to the view that will render the video. abstract int
getVideoWidth()
abstract int
getVideoHeight()
int
getMeasuredVideoWidth()
Gets the rendered width of the video on the screen. int
getMeasuredVideoHeight()
Gets the rendered height of the video on the screen. int
getCurrentPosition()
long
getCurrentPositionLong()
int
getBufferPercentage()
boolean
isHlsRecommended()
boolean
canPause()
boolean
canSeekForward()
boolean
canSeekBackward()
int
getAudioSessionId()
boolean
isFullScreen()
Checks whether the application is currently in full-screen mode. boolean
isLandscape()
Checks whether the device is currently in landscape orientation. void
clearOnCompletionListener()
void
clearOnPreparedListener()
void
setMediaController(BrightcoveMediaController mediaController)
Establishes the Brightcove media controller to provide a modern set of media controls. void
setMediaController(MediaController mediaController)
Establishes a legacy Android media controller to provide media controls. void
toggleMediaControlsVisibility()
Toggles the BrightcoveMediaController's visibility when one is set. void
onControllerHide()
boolean
isPlaying()
void
start()
Start playback void
pause()
Pause playback void
stopPlayback()
Stop playback void
seekTo(int msec)
Seek to the time specified void
seekTo(long msec)
Seek to the time specified void
seekToLive()
Video
setVideoPath(String path)
Replaces player content with the video at the specified path. Video
setVideoURI(Uri uri)
Replaces player content with the video at the specified URI. Video
setVideoPath(String videoPath, Map<String, String> languageCodeCaptionsMap)
Replace player content with the video and captions at the specified paths. void
add(Video video)
Adds the video to the end of the video list. MediaPlayback
getPlayback()
void
add(int index, Video video)
Adds the video to the video list at the specified index. void
addAll(Collection<Video> newVideos)
Add all videos in the collection to the end of the list. void
addAll(int index, Collection<Video> newVideos)
Inserts all videos in the collection at the specified index. void
replace(int index, Video video)
Removes and replaces the video at the specified index. Video
get(int index)
int
getCurrentIndex()
Video
getCurrentVideo()
void
setCurrentIndex(int index)
Sets the current video to the specified index. List<Video>
getList()
void
remove(int index)
Removes the video at the specified index. void
clear()
Removes all videos from the list. DefaultSourceSelectionController
getSourceController()
Returns the source controller, the component of the player that selectsthe source to play for a video. Analytics
getAnalytics()
Returns the analytics component, the part of the player that monitors andtracks video playback and engagement. void
addSubtitleSource(Uri uri, BrightcoveCaptionFormat format)
For adding subtitle sources to the Brightcove Player.Loosely based off of the Android SDK method addSubtitleSource. void
setSubtitleLocale(String localeCode)
Sets the locale for a caption source to load, based on the caption locale pulled in.NOTE ABOUT USING WITH THE BRIGHTCOVE CAPTION CONTROLLER ONLY. BrightcoveClosedCaptioningView
getClosedCaptioningView()
BrightcoveClosedCaptioningController
getClosedCaptioningController()
BrightcoveAudioTracksController
getAudioTracksController()
void
setClosedCaptioningEnabled(boolean value)
void
addListener(String eventType, EventListener listener)
void
removeListener(String eventType)
void
removeListeners()
void
setupClosedCaptioningRendering()
Instantiates the Brightcove captioning view. void
disableClosedCaptioningRendering()
ImageView
getStillView()
boolean
isShutterVisible()
boolean
dispatchKeyEvent(KeyEvent event)
-
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 android.widget.MediaController.MediaPlayerControl
canPause, canSeekBackward, canSeekForward, getAudioSessionId, getBufferPercentage, getCurrentPosition, getDuration, isPlaying, pause, seekTo, start
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
-
Constructor Detail
-
BaseVideoView
BaseVideoView(Context context)
-
BaseVideoView
BaseVideoView(Context context, AttributeSet attributeSet)
-
BaseVideoView
BaseVideoView(Context context, AttributeSet attributeSet, int defStyle)
-
-
Method Detail
-
getEventEmitter
EventEmitter getEventEmitter()
Getter for the EventEmitter used by this View
-
setEventEmitter
void setEventEmitter(EventEmitter eventEmitter)
Sets the eventEmitter and instantiates all inner components.Required to be called before further interactions with theeventEmitter.
-
getPlaybackController
VideoPlaybackController getPlaybackController()
Returns the video playback controller, the component of the playerresponsible for managing video playback and emitting cue points.
-
getVideoDisplay
VideoDisplayComponent getVideoDisplay()
Returns the video display, the low-level component responsible fordecoding and rendering a video.
-
getVideoStillDisplay
VideoStillDisplayComponent getVideoStillDisplay()
Returns the video still display, the component of the player that showsand hides the still image if one is available for a video.
-
getDuration
@Deprecated() int getDuration()
-
getDurationLong
long getDurationLong()
-
setStreamConcurrencyEnabled
void setStreamConcurrencyEnabled(boolean enabled)
Enable Generic Stream Concurrency
-
getConcurrencyClient
final ConcurrencyClient getConcurrencyClient()
Gets the {#ConcurrencyClient} instance being used interactwith the Generic Stream Concurrency mechanism
-
setOnCompletionListener
void setOnCompletionListener(MediaPlayer.OnCompletionListener onCompletionListener)
-
setOnInfoListener
void setOnInfoListener(MediaPlayer.OnInfoListener onInfoListener)
-
setOnPreparedListener
void setOnPreparedListener(MediaPlayer.OnPreparedListener onPreparedListener)
-
getShutterViewController
ShutterViewController getShutterViewController()
-
getZoomController
ZoomController getZoomController()
Gets the ZoomController associated with the BrightcoveVideoView.
-
isVideoZoomingEnabled
boolean isVideoZoomingEnabled()
Checks if the video zooming feature is currently enabled.
-
addOnVideoViewSizeChangedListener
void addOnVideoViewSizeChangedListener(BaseVideoView.OnVideoViewSizeChangedListener onVideoViewSizeChangedListener)
-
removeOnVideoViewSizeChangedListener
void removeOnVideoViewSizeChangedListener(BaseVideoView.OnVideoViewSizeChangedListener onVideoViewSizeChangedListener)
-
setStreamConcurrencyRequestHeaders
void setStreamConcurrencyRequestHeaders(Map<String, String> requestHeaders)
Sets the headers values that will be passed on each request to theGeneric Stream Concurrency.The values should be for the account ID, video ID and the JWT.
-
setStreamConcurrencySessionsListener
void setStreamConcurrencySessionsListener(ConcurrencyClient.SessionsListener listener)
Sets a listener to get the active sessions
-
requestActiveSessions
void requestActiveSessions()
Request the current active sessions.Set a {#SessionsListener} to get the returned active sessions through {setStreamConcurrencySessionsListener}
-
isStreamConcurrencyEnabled
boolean isStreamConcurrencyEnabled()
Checks whether Generic Stream Concurrency is enabled or not
-
requestLayout
void requestLayout()
-
onTouchEvent
boolean onTouchEvent(MotionEvent motionEvent)
-
onInterceptTouchEvent
boolean onInterceptTouchEvent(MotionEvent ev)
-
setVideoZoomingEnabled
void setVideoZoomingEnabled(boolean enabled)
Enables or disables the video zooming feature.
- Parameters:
enabled
- True to enable video zooming, false to disable.
-
setLayoutParams
void setLayoutParams(ViewGroup.LayoutParams layoutParams)
-
finishInitialization
void finishInitialization()
This method finishes initializing the BaseVideoView. It shouldonly be called when creating an instance programatically.Otherwise, it is automatically called by onFinishInflate().
-
getMediaController
MediaController getMediaController()
Access the legacy media controller.
-
getBrightcoveMediaController
BrightcoveMediaController getBrightcoveMediaController()
Access the Brightcove media controller.
-
getPictureInPictureManager
@NonNull() PictureInPictureManager getPictureInPictureManager()
-
getRenderView
@Nullable() abstract RenderView getRenderView()
Gets refers to the view that will render the video.
-
getVideoWidth
abstract int getVideoWidth()
-
getVideoHeight
abstract int getVideoHeight()
-
getMeasuredVideoWidth
int getMeasuredVideoWidth()
Gets the rendered width of the video on the screen.
-
getMeasuredVideoHeight
int getMeasuredVideoHeight()
Gets the rendered height of the video on the screen.
-
getCurrentPosition
@Deprecated() int getCurrentPosition()
-
getCurrentPositionLong
long getCurrentPositionLong()
-
getBufferPercentage
int getBufferPercentage()
-
isHlsRecommended
boolean isHlsRecommended()
-
canPause
boolean canPause()
-
canSeekForward
boolean canSeekForward()
-
canSeekBackward
boolean canSeekBackward()
-
getAudioSessionId
int getAudioSessionId()
-
isFullScreen
boolean isFullScreen()
Checks whether the application is currently in full-screen mode.
-
isLandscape
boolean isLandscape()
Checks whether the device is currently in landscape orientation.
-
clearOnCompletionListener
void clearOnCompletionListener()
-
clearOnPreparedListener
void clearOnPreparedListener()
-
setMediaController
void setMediaController(BrightcoveMediaController mediaController)
Establishes the Brightcove media controller to provide a modern set of media controls.
- Parameters:
mediaController
- The Brightcove media controller being established or null to have no media controller.
-
setMediaController
void setMediaController(MediaController mediaController)
Establishes a legacy Android media controller to provide media controls.
- Parameters:
mediaController
- The legacy Android media controller to use or null to have no media controller.
-
toggleMediaControlsVisibility
void toggleMediaControlsVisibility()
Toggles the BrightcoveMediaController's visibility when one is set.
-
onControllerHide
void onControllerHide()
-
isPlaying
boolean isPlaying()
-
start
void start()
Start playback
-
pause
void pause()
Pause playback
-
stopPlayback
void stopPlayback()
Stop playback
-
seekTo
@Deprecated() void seekTo(int msec)
Seek to the time specified
- Parameters:
msec
- time in milliseconds
-
seekTo
void seekTo(long msec)
Seek to the time specified
- Parameters:
msec
- time in milliseconds
-
seekToLive
void seekToLive()
-
setVideoPath
Video setVideoPath(String path)
Replaces player content with the video at the specified path.
- Parameters:
path
- HTTP path to a video
-
setVideoURI
Video setVideoURI(Uri uri)
Replaces player content with the video at the specified URI.
- Parameters:
uri
- Video URI
-
setVideoPath
Video setVideoPath(String videoPath, Map<String, String> languageCodeCaptionsMap)
Replace player content with the video and captions at the specified paths.
- Parameters:
videoPath
- HTTP path to the videolanguageCodeCaptionsMap
- A map of language code to caption urls.
-
getPlayback
MediaPlayback getPlayback()
-
addAll
void addAll(Collection<Video> newVideos)
Add all videos in the collection to the end of the list.
- Parameters:
newVideos
- The videos to append.
-
addAll
void addAll(int index, Collection<Video> newVideos)
Inserts all videos in the collection at the specified index.
- Parameters:
newVideos
- The videos to append.
-
replace
void replace(int index, Video video)
Removes and replaces the video at the specified index.
- Parameters:
index
- The index to replace a media item.video
- The video to replace
-
getCurrentIndex
int getCurrentIndex()
-
getCurrentVideo
Video getCurrentVideo()
-
setCurrentIndex
void setCurrentIndex(int index)
Sets the current video to the specified index.
-
remove
void remove(int index)
Removes the video at the specified index.
-
clear
void clear()
Removes all videos from the list.
-
getSourceController
DefaultSourceSelectionController getSourceController()
Returns the source controller, the component of the player that selectsthe source to play for a video.
-
getAnalytics
Analytics getAnalytics()
Returns the analytics component, the part of the player that monitors andtracks video playback and engagement.
-
addSubtitleSource
void addSubtitleSource(Uri uri, BrightcoveCaptionFormat format)
For adding subtitle sources to the Brightcove Player.Loosely based off of the Android SDK method addSubtitleSource.
-
setSubtitleLocale
void setSubtitleLocale(String localeCode)
Sets the locale for a caption source to load, based on the caption locale pulled in.NOTE ABOUT USING WITH THE BRIGHTCOVE CAPTION CONTROLLER ONLY. ANDROID SUBTITLE MANAGER DOESNT NEED THIS.
- Parameters:
localeCode
- the two character locale code for the caption URI.
-
getClosedCaptioningView
BrightcoveClosedCaptioningView getClosedCaptioningView()
-
getClosedCaptioningController
BrightcoveClosedCaptioningController getClosedCaptioningController()
-
getAudioTracksController
BrightcoveAudioTracksController getAudioTracksController()
-
setClosedCaptioningEnabled
void setClosedCaptioningEnabled(boolean value)
-
addListener
void addListener(String eventType, EventListener listener)
-
removeListener
void removeListener(String eventType)
-
removeListeners
void removeListeners()
-
setupClosedCaptioningRendering
void setupClosedCaptioningRendering()
Instantiates the Brightcove captioning view.
-
disableClosedCaptioningRendering
void disableClosedCaptioningRendering()
-
getStillView
ImageView getStillView()
-
isShutterVisible
boolean isShutterVisible()
-
dispatchKeyEvent
boolean dispatchKeyEvent(KeyEvent event)
-
-
-
-