-
- All Implemented Interfaces:
-
android.graphics.drawable.Drawable.Callback
,android.view.KeyEvent.Callback
,android.view.ViewManager
,android.view.ViewParent
,android.view.accessibility.AccessibilityEventSource
,com.brightcove.player.event.Component
@Emits(events = {EventType.CAPTIONS_AVAILABLE})@ListensFor(events = {EventType.CAPTION, EventType.COMPLETED, EventType.DID_LOAD_CLOSED_CAPTIONS, EventType.PROGRESS, EventType.TOGGLE_CLOSED_CAPTIONS, ShowHideController.DID_SHOW_MEDIA_CONTROLS, ShowHideController.DID_HIDE_MEDIA_CONTROLS, EventType.SELECT_CLOSED_CAPTION_TRACK, EventType.DID_ENTER_PICTURE_IN_PICTURE_MODE, EventType.DID_EXIT_PICTURE_IN_PICTURE_MODE, EventType.SEEKBAR_DRAGGING_START, EventType.SEEKBAR_DRAGGING_STOP, EventType.AD_BREAK_STARTED, EventType.AD_BREAK_COMPLETED}) public class BrightcoveClosedCaptioningView extends FrameLayout implements Component
This view (a FrameLayout) implements the proper layout and formatting for closed captions for a BaseVideoView. This view is also a component which is responsible for initiating the loading and parsing of captions.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public enum
BrightcoveClosedCaptioningView.ClosedCaptioningMode
Specifies the type of captions being used currently.
-
Field Summary
Fields Modifier and Type Field Description public final static int
DEFAULT_HORIZONTAL_GRAVITY
public final static int
DEFAULT_VERTICAL_GRAVITY
protected ArrayList<LinearLayout>
currentCaptionBlocks
private boolean
keepCaptionsWithinVideoBounds
private float
safeAreaPercent
-
Constructor Summary
Constructors Constructor Description BrightcoveClosedCaptioningView(Context context)
BrightcoveClosedCaptioningView(Context context, AttributeSet attrs)
BrightcoveClosedCaptioningView(Context context, AttributeSet attrs, int defStyle)
-
Method Summary
Modifier and Type Method Description ArrayList<LinearLayout>
getCurrentCaptionBlocks()
void
setKeepCaptionsWithinVideoBounds(boolean keepCaptionsWithinVideoBounds)
The default behaviour of the BrightcoveClosedCaptioningView is to restrict the caption positioning to be withinthe bounds of the actual video, not the VideoView. void
setSafeAreaPercent(float safeAreaPercent)
Optionally override the default SAFE_AREA with a custom percent.Example: for a caption margin of 5% of the video view's height and width, use 0.05.For a caption margin of 2.5% of the video view's height and width, use 0.025. int
getSafeAreaMarginWidth()
Computes the FCC "safe-area margin" width based on the current width of this instance and the SAFE_AREA. int
getSafeAreaMarginHeight()
Computes the FCC "safe-area margin" height based on the current height of this instance and the SAFE_AREA. void
initialize(EventEmitter emitter)
Initializes the CaptionsView with the given EventEmitter. void
initialize(EventEmitter emitter, BaseVideoView baseVideoView)
Initializes the CaptionsView with the given EventEmitter and BaseVideoView. void
clear()
Clears the currently loaded captions from this CaptionsView. void
setMode(@NonNull() BrightcoveClosedCaptioningView.ClosedCaptioningMode mode)
Specifies the CaptionMode for this CaptionsView. BrightcoveClosedCaptioningView.ClosedCaptioningMode
getMode()
Retrieves the current com.brightcove.player.view.BrightcoveClosedCaptioningView.ClosedCaptioningMode. ArrayList<LinearLayout>
findCaptionsForPosition(int position)
ArrayList<LinearLayout>
findCaptionsForPosition(long position)
Retrieves the specific view block containing rendered captions for the given video position in milliseconds,if one exists. void
prepareDFXPCaptions(TTMLDocument document)
Prepares the rendered View blocks for all captions listed in the given TTMLDocument. void
prepareWebVTTCaptions(WebVTTDocument document)
Prepares the rendered View blocks for all captions listed in the given WebVTTDocument. void
prepareLayout()
void
refreshCaptions()
void
refreshCaptions(int seekToTime)
void
refreshCaptions(long seekToTime)
-
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 java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
-
Constructor Detail
-
BrightcoveClosedCaptioningView
BrightcoveClosedCaptioningView(Context context)
-
BrightcoveClosedCaptioningView
BrightcoveClosedCaptioningView(Context context, AttributeSet attrs)
-
BrightcoveClosedCaptioningView
BrightcoveClosedCaptioningView(Context context, AttributeSet attrs, int defStyle)
-
-
Method Detail
-
getCurrentCaptionBlocks
ArrayList<LinearLayout> getCurrentCaptionBlocks()
-
setKeepCaptionsWithinVideoBounds
void setKeepCaptionsWithinVideoBounds(boolean keepCaptionsWithinVideoBounds)
The default behaviour of the BrightcoveClosedCaptioningView is to restrict the caption positioning to be withinthe bounds of the actual video, not the VideoView. By setting this, the developer can decide whether to renderthe captions outside the video, e.g. in the case of a player that is 16:9 but is viewing a 2.35:1 video.
- Parameters:
keepCaptionsWithinVideoBounds
- if true, always render the captions within the video bounds.If false, allow captions to be rendered in the letterboxing (the areaoutside the video itself, but within the VideoView).
-
setSafeAreaPercent
void setSafeAreaPercent(float safeAreaPercent)
Optionally override the default SAFE_AREA with a custom percent.Example: for a caption margin of 5% of the video view's height and width, use 0.05.For a caption margin of 2.5% of the video view's height and width, use 0.025.
- Parameters:
safeAreaPercent
- the percentage as a decimal where 0.
-
getSafeAreaMarginWidth
int getSafeAreaMarginWidth()
Computes the FCC "safe-area margin" width based on the current width of this instance and the SAFE_AREA. Since Android defines margin as outside of the view andpadding as within, the value returned by this method should be considered theminimum amount of padding for the CaptionsView itself.
-
getSafeAreaMarginHeight
int getSafeAreaMarginHeight()
Computes the FCC "safe-area margin" height based on the current height of this instance and the SAFE_AREA. Since Android defines margin as outside of the view andpadding as within, the value returned by this method should be considered theminimum amount of padding for the CaptionsView itself.
-
initialize
@Deprecated() void initialize(EventEmitter emitter)
Initializes the CaptionsView with the given EventEmitter.
- Parameters:
emitter
- the desired EventEmitter
-
initialize
void initialize(EventEmitter emitter, BaseVideoView baseVideoView)
Initializes the CaptionsView with the given EventEmitter and BaseVideoView.
- Parameters:
emitter
- the desired EventEmitterbaseVideoView
- the BaseVideoView to hook up to
-
clear
void clear()
Clears the currently loaded captions from this CaptionsView.
-
setMode
void setMode(@NonNull() BrightcoveClosedCaptioningView.ClosedCaptioningMode mode)
Specifies the CaptionMode for this CaptionsView. Can be any valid value of com.brightcove.player.view.BrightcoveClosedCaptioningView.ClosedCaptioningMode.
- Parameters:
mode
- the desired com.brightcove.player.view.BrightcoveClosedCaptioningView.ClosedCaptioningMode
-
getMode
@NonNull() BrightcoveClosedCaptioningView.ClosedCaptioningMode getMode()
Retrieves the current com.brightcove.player.view.BrightcoveClosedCaptioningView.ClosedCaptioningMode.
-
findCaptionsForPosition
@Deprecated() ArrayList<LinearLayout> findCaptionsForPosition(int position)
-
findCaptionsForPosition
ArrayList<LinearLayout> findCaptionsForPosition(long position)
Retrieves the specific view block containing rendered captions for the given video position in milliseconds,if one exists. If there are no captions at the given position, null is returned.
- Parameters:
position
- the video position in milliseconds
-
prepareDFXPCaptions
void prepareDFXPCaptions(TTMLDocument document)
Prepares the rendered View blocks for all captions listed in the given TTMLDocument. This initially clears thestate of the current caption blocks and time position mapping.
- Parameters:
document
- the TTMLDocument containing the captions to prepare
-
prepareWebVTTCaptions
void prepareWebVTTCaptions(WebVTTDocument document)
Prepares the rendered View blocks for all captions listed in the given WebVTTDocument. This initiallyclears the state of the current caption blocks and time position mapping.
- Parameters:
document
- the WebVTTDocument containing the captions to prepare
-
prepareLayout
@Deprecated() void prepareLayout()
-
refreshCaptions
void refreshCaptions()
-
refreshCaptions
@Deprecated() void refreshCaptions(int seekToTime)
-
refreshCaptions
void refreshCaptions(long seekToTime)
-
-
-
-