-
- All Implemented Interfaces:
-
android.graphics.drawable.Drawable.Callback,android.view.KeyEvent.Callback,android.view.ViewGroup.OnHierarchyChangeListener,android.view.ViewManager,android.view.ViewParent,android.view.ViewTreeObserver.OnGlobalFocusChangeListener,android.view.accessibility.AccessibilityEventSource
public final class PlayerWebView extends WebView
Created by hugo on 6/13/17.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public interfacePlayerWebView.WebViewErrorListenerpublic interfacePlayerWebView.EventListenerpublic interfacePlayerWebView.OverrideUrlLoadingInterceptorpublic classPlayerWebView.Companion
-
Field Summary
Fields Modifier and Type Field Description private ObjectmJavascriptBridgeprivate StringvideoIdprivate StringplaylistIdprivate BooleanvideoPausedprivate DoublebufferedTimeprivate Doubledurationprivate BooleanisSeekingprivate BooleanisEndedprivate Stringqualityprivate final Longpositionprivate Floatvolumeprivate BooleanplayWhenReady
-
Constructor Summary
Constructors Constructor Description PlayerWebView(Context context)PlayerWebView(Context context, AttributeSet attrs)PlayerWebView(Context context, AttributeSet attrs, Integer defStyleAttr)
-
Method Summary
-
Methods inherited from class com.dailymotion.android.player.sdk.PlayerWebView
addJavascriptInterface, autofill, canGoBack, canGoBackOrForward, canGoForward, canZoomIn, canZoomOut, capturePicture, clearCache, clearFormData, clearHistory, clearMatches, clearSslPreferences, clearView, computeHorizontalScrollOffset, computeHorizontalScrollRange, computeScroll, computeVerticalScrollExtent, computeVerticalScrollOffset, computeVerticalScrollRange, copyBackForwardList, createPrintDocumentAdapter, createPrintDocumentAdapter, createWebMessageChannel, destroy, dispatchDraw, dispatchKeyEvent, documentHasImages, evaluateJavascript, findAll, findAllAsync, findFocus, findNext, flingScroll, freeMemory, getAccessibilityClassName, getAccessibilityNodeProvider, getCertificate, getContentHeight, getFavicon, getHandler, getHitTestResult, getHttpAuthUsernamePassword, getOriginalUrl, getProgress, getRendererPriorityWaivedWhenNotVisible, getRendererRequestedPriority, getScale, getSettings, getTextClassifier, getTitle, getUrl, getWebChromeClient, getWebViewClient, getWebViewLooper, goBack, goBackOrForward, goForward, invokeZoomPicker, isPrivateBrowsingEnabled, isVisibleToUserForAutofill, loadData, loadDataWithBaseURL, loadUrl, onAttachedToWindow, onCheckIsTextEditor, onChildViewAdded, onChildViewRemoved, onConfigurationChanged, onCreateInputConnection, onDragEvent, onDraw, onFinishTemporaryDetach, onFocusChanged, onGenericMotionEvent, onGlobalFocusChanged, onHoverEvent, onKeyDown, onKeyMultiple, onKeyUp, onMeasure, onOverScrolled, onPause, onProvideAutofillVirtualStructure, onProvideVirtualStructure, onResume, onScrollChanged, onSizeChanged, onStartTemporaryDetach, onTrackballEvent, onVisibilityChanged, onWindowFocusChanged, overlayHorizontalScrollbar, overlayVerticalScrollbar, pageDown, pageUp, pauseTimers, performLongClick, postUrl, postVisualStateCallback, postWebMessage, reload, removeJavascriptInterface, requestChildRectangleOnScreen, requestFocus, requestFocusNodeHref, requestImageRef, restoreState, resumeTimers, savePassword, saveState, saveWebArchive, saveWebArchive, setBackgroundColor, setCertificate, setDownloadListener, setFindListener, setHorizontalScrollbarOverlay, setHttpAuthUsernamePassword, setInitialScale, setLayerType, setLayoutParams, setMapTrackballToArrowKeys, setNetworkAvailable, setOverScrollMode, setPictureListener, setRendererPriorityPolicy, setScrollBarStyle, setTextClassifier, setVerticalScrollbarOverlay, setWebChromeClient, setWebViewClient, shouldDelayChildPressedState, showFindDialog, stopLoading, zoomBy, zoomIn, zoomOut -
Methods inherited from class android.view.ViewGroup
addExtraDataToAccessibilityNodeInfo, addFocusables, addOnAttachStateChangeListener, addOnLayoutChangeListener, addOnUnhandledKeyEventListener, animate, announceForAccessibility, autofill, awakenScrollBars, awakenScrollBars, awakenScrollBars, bringToFront, buildDrawingCache, buildDrawingCache, buildLayer, callOnClick, canResolveLayoutDirection, canResolveTextAlignment, canResolveTextDirection, canScrollHorizontally, canScrollVertically, cancelDragAndDrop, cancelLongPress, cancelPendingInputEvents, checkInputConnectionProxy, clearAnimation, computeHorizontalScrollExtent, computeSystemWindowInsets, createAccessibilityNodeInfo, createContextMenu, destroyDrawingCache, dispatchGenericMotionEvent, dispatchNestedFling, dispatchNestedPreFling, dispatchNestedPrePerformAccessibilityAction, dispatchNestedPreScroll, dispatchNestedScroll, dispatchPopulateAccessibilityEvent, draw, drawableHotspotChanged, findViewById, findViewWithTag, fitSystemWindows, focusSearch, forceHasOverlappingRendering, forceLayout, getAccessibilityLiveRegion, getAccessibilityPaneTitle, getAccessibilityTraversalAfter, getAccessibilityTraversalBefore, getAlpha, getAnimation, getApplicationWindowToken, getAutofillHints, getAutofillId, getAutofillType, getAutofillValue, getBackground, getBackgroundTintList, getBackgroundTintMode, getBaseline, getBottom, getBottomFadingEdgeStrength, getBottomPaddingOffset, getCameraDistance, getClipBounds, getClipBounds, getClipToOutline, getContentDescription, getContext, getContextMenuInfo, getDefaultFocusHighlightEnabled, getDisplay, getDrawableState, getDrawingCache, getDrawingCache, getDrawingCacheBackgroundColor, getDrawingCacheQuality, getDrawingRect, getDrawingTime, getElevation, getFilterTouchesWhenObscured, getFitsSystemWindows, getFocusable, getFocusables, getFocusedRect, getForeground, getForegroundGravity, getForegroundTintList, getForegroundTintMode, getGlobalVisibleRect, getGlobalVisibleRect, getHasOverlappingRendering, getHeight, getHitRect, getHorizontalFadingEdgeLength, getHorizontalScrollbarHeight, getId, getImportantForAccessibility, getImportantForAutofill, getKeepScreenOn, getKeyDispatcherState, getLabelFor, getLayerType, getLayoutDirection, getLayoutParams, getLeft, getLeftFadingEdgeStrength, getLeftPaddingOffset, getLocalVisibleRect, getLocationInWindow, getLocationOnScreen, getMatrix, getMeasuredHeight, getMeasuredHeightAndState, getMeasuredState, getMeasuredWidth, getMeasuredWidthAndState, getMinimumHeight, getMinimumWidth, getNextClusterForwardId, getNextFocusDownId, getNextFocusForwardId, getNextFocusLeftId, getNextFocusRightId, getNextFocusUpId, getOnFocusChangeListener, getOutlineAmbientShadowColor, getOutlineProvider, getOutlineSpotShadowColor, getOverScrollMode, getPaddingBottom, getPaddingEnd, getPaddingLeft, getPaddingRight, getPaddingStart, getPaddingTop, getParent, getParentForAccessibility, getPivotX, getPivotY, getPointerIcon, getResources, getRevealOnFocusHint, getRight, getRightFadingEdgeStrength, getRightPaddingOffset, getRootView, getRootWindowInsets, getRotation, getRotationX, getRotationY, getScaleX, getScaleY, getScrollBarDefaultDelayBeforeFade, getScrollBarFadeDuration, getScrollBarSize, getScrollBarStyle, getScrollIndicators, getScrollX, getScrollY, getSolidColor, getStateListAnimator, getSuggestedMinimumHeight, getSuggestedMinimumWidth, getSystemUiVisibility, getTag, getTag, getTextAlignment, getTextDirection, getTooltipText, getTop, getTopFadingEdgeStrength, getTopPaddingOffset, getTouchDelegate, getTouchables, getTransitionName, getTranslationX, getTranslationY, getTranslationZ, getVerticalFadingEdgeLength, getVerticalScrollbarPosition, getVerticalScrollbarWidth, getViewTreeObserver, getVisibility, getWidth, getWindowAttachCount, getWindowId, getWindowSystemUiVisibility, getWindowToken, getWindowVisibility, getWindowVisibleDisplayFrame, getX, getY, getZ, hasExplicitFocusable, hasFocusable, hasNestedScrollingParent, hasOnClickListeners, hasOverlappingRendering, hasPointerCapture, hasWindowFocus, invalidate, invalidate, invalidate, invalidateDrawable, invalidateOutline, isAccessibilityFocused, isAccessibilityHeading, isActivated, isAttachedToWindow, isClickable, isContextClickable, isDirty, isDrawingCacheEnabled, isDuplicateParentStateEnabled, isEnabled, isFocusable, isFocusableInTouchMode, isFocused, isFocusedByDefault, isHapticFeedbackEnabled, isHardwareAccelerated, isHorizontalFadingEdgeEnabled, isHorizontalScrollBarEnabled, isHovered, isImportantForAccessibility, isImportantForAutofill, isInEditMode, isInLayout, isInTouchMode, isKeyboardNavigationCluster, isLaidOut, isLayoutDirectionResolved, isLayoutRequested, isLongClickable, isNestedScrollingEnabled, isOpaque, isPaddingOffsetRequired, isPaddingRelative, isPivotSet, isPressed, isSaveEnabled, isSaveFromParentEnabled, isScreenReaderFocusable, isScrollContainer, isScrollbarFadingEnabled, isSelected, isShown, isSoundEffectsEnabled, isTemporarilyDetached, isTextAlignmentResolved, isTextDirectionResolved, isVerticalFadingEdgeEnabled, isVerticalScrollBarEnabled, keyboardNavigationClusterSearch, measure, offsetLeftAndRight, offsetTopAndBottom, onAnimationEnd, onAnimationStart, onApplyWindowInsets, onCancelPendingInputEvents, onCapturedPointerEvent, onCreateContextMenu, onDisplayHint, onDrawForeground, onDrawScrollBars, onFilterTouchEventForSecurity, onFinishInflate, onHoverChanged, onInitializeAccessibilityEvent, onInitializeAccessibilityNodeInfo, onKeyLongPress, onKeyPreIme, onKeyShortcut, onPointerCaptureChange, onPopulateAccessibilityEvent, onProvideAutofillStructure, onProvideStructure, onRestoreInstanceState, onRtlPropertiesChanged, onSaveInstanceState, onScreenStateChanged, onSetAlpha, onVisibilityAggregated, onWindowSystemUiVisibilityChanged, overScrollBy, performAccessibilityAction, performClick, performContextClick, performContextClick, performHapticFeedback, performHapticFeedback, performLongClick, playSoundEffect, post, postDelayed, postInvalidate, postInvalidate, postInvalidateDelayed, postInvalidateDelayed, postInvalidateOnAnimation, postInvalidateOnAnimation, postOnAnimation, postOnAnimationDelayed, refreshDrawableState, releasePointerCapture, removeCallbacks, removeOnAttachStateChangeListener, removeOnLayoutChangeListener, removeOnUnhandledKeyEventListener, requestApplyInsets, requestFitSystemWindows, requestFocus, requestFocus, requestFocusFromTouch, requestLayout, requestPointerCapture, requestRectangleOnScreen, requestRectangleOnScreen, requestUnbufferedDispatch, requireViewById, resetPivot, restoreHierarchyState, saveHierarchyState, scheduleDrawable, scrollBy, scrollTo, sendAccessibilityEvent, sendAccessibilityEventUnchecked, setAccessibilityDelegate, setAccessibilityHeading, setAccessibilityLiveRegion, setAccessibilityPaneTitle, setAccessibilityTraversalAfter, setAccessibilityTraversalBefore, setActivated, setAlpha, setAnimation, setAutofillHints, setAutofillId, setBackground, setBackgroundDrawable, setBackgroundResource, setBackgroundTintList, setBackgroundTintMode, setBottom, setCameraDistance, setClickable, setClipBounds, setClipToOutline, setContentDescription, setContextClickable, setDefaultFocusHighlightEnabled, setDrawingCacheBackgroundColor, setDrawingCacheEnabled, setDrawingCacheQuality, setDuplicateParentStateEnabled, setElevation, setEnabled, setFadingEdgeLength, setFilterTouchesWhenObscured, setFitsSystemWindows, setFocusable, setFocusable, setFocusableInTouchMode, setFocusedByDefault, setForeground, setForegroundGravity, setForegroundTintList, setForegroundTintMode, setHapticFeedbackEnabled, setHasTransientState, setHorizontalFadingEdgeEnabled, setHorizontalScrollBarEnabled, setHovered, setId, setImportantForAccessibility, setImportantForAutofill, setKeepScreenOn, setKeyboardNavigationCluster, setLabelFor, setLayerPaint, setLayoutDirection, setLeft, setLongClickable, setMeasuredDimension, setMinimumHeight, setMinimumWidth, setNestedScrollingEnabled, setNextClusterForwardId, setNextFocusDownId, setNextFocusForwardId, setNextFocusLeftId, setNextFocusRightId, setNextFocusUpId, setOnApplyWindowInsetsListener, setOnCapturedPointerListener, setOnClickListener, setOnContextClickListener, setOnCreateContextMenuListener, setOnDragListener, setOnFocusChangeListener, setOnGenericMotionListener, setOnHoverListener, setOnKeyListener, setOnLongClickListener, setOnScrollChangeListener, setOnSystemUiVisibilityChangeListener, setOnTouchListener, setOutlineAmbientShadowColor, setOutlineProvider, setOutlineSpotShadowColor, setPadding, setPaddingRelative, setPivotX, setPivotY, setPointerIcon, setPressed, setRevealOnFocusHint, setRight, setRotation, setRotationX, setRotationY, setSaveEnabled, setSaveFromParentEnabled, setScaleX, setScaleY, setScreenReaderFocusable, setScrollBarDefaultDelayBeforeFade, setScrollBarFadeDuration, setScrollBarSize, setScrollContainer, setScrollIndicators, setScrollIndicators, setScrollX, setScrollY, setScrollbarFadingEnabled, setSelected, setSoundEffectsEnabled, setStateListAnimator, setSystemUiVisibility, setTag, setTag, setTextAlignment, setTextDirection, setTooltipText, setTop, setTouchDelegate, setTransitionName, setTranslationX, setTranslationY, setTranslationZ, setVerticalFadingEdgeEnabled, setVerticalScrollBarEnabled, setVerticalScrollbarPosition, setVisibility, setWillNotCacheDrawing, setWillNotDraw, setX, setY, setZ, showContextMenu, showContextMenu, startActionMode, startActionMode, startAnimation, startDrag, startDragAndDrop, startNestedScroll, stopNestedScroll, toString, unscheduleDrawable, unscheduleDrawable, updateDragShadow, verifyDrawable, willNotCacheDrawing, willNotDraw -
Methods inherited from class android.widget.AbsoluteLayout
addChildrenForAccessibility, addFocusables, addKeyboardNavigationClusters, addStatesFromChildren, addTouchables, addView, addView, addView, addView, addView, addViewInLayout, addViewInLayout, attachLayoutAnimationParameters, attachViewToParent, bringChildToFront, canAnimate, childDrawableStateChanged, childHasTransientStateChanged, cleanupLayoutState, clearChildFocus, clearDisappearingChildren, clearFocus, debug, detachAllViewsFromParent, detachViewFromParent, detachViewFromParent, detachViewsFromParent, dispatchApplyWindowInsets, dispatchCapturedPointerEvent, dispatchConfigurationChanged, dispatchDisplayHint, dispatchDragEvent, dispatchDrawableHotspotChanged, dispatchFinishTemporaryDetach, dispatchFreezeSelfOnly, dispatchGenericFocusedEvent, dispatchGenericPointerEvent, dispatchHoverEvent, dispatchKeyEventPreIme, dispatchKeyShortcutEvent, dispatchPointerCaptureChanged, dispatchProvideAutofillStructure, dispatchProvideStructure, dispatchRestoreInstanceState, dispatchSaveInstanceState, dispatchSetActivated, dispatchSetPressed, dispatchSetSelected, dispatchStartTemporaryDetach, dispatchSystemUiVisibilityChanged, dispatchThawSelfOnly, dispatchTouchEvent, dispatchTrackballEvent, dispatchUnhandledMove, dispatchVisibilityChanged, dispatchWindowFocusChanged, dispatchWindowSystemUiVisiblityChanged, dispatchWindowVisibilityChanged, drawChild, drawableStateChanged, endViewTransition, findViewsWithText, focusSearch, focusableViewAvailable, gatherTransparentRegion, getChildAt, getChildCount, getChildDrawingOrder, getChildStaticTransformation, getChildVisibleRect, getClipChildren, getClipToPadding, getDescendantFocusability, getFocusedChild, getLayoutAnimation, getLayoutAnimationListener, getLayoutMode, getLayoutTransition, getNestedScrollAxes, getOverlay, getPersistentDrawingCache, getTouchscreenBlocksFocus, hasFocus, hasTransientState, indexOfChild, invalidateChild, invalidateChildInParent, isAlwaysDrawnWithCacheEnabled, isAnimationCacheEnabled, isChildrenDrawingOrderEnabled, isChildrenDrawnWithCacheEnabled, isMotionEventSplittingEnabled, isTransitionGroup, jumpDrawablesToCurrentState, layout, measureChild, measureChildWithMargins, measureChildren, notifySubtreeAccessibilityStateChanged, offsetDescendantRectToMyCoords, offsetRectIntoDescendantCoords, onCreateDrawableState, onDescendantInvalidated, onDetachedFromWindow, onInterceptHoverEvent, onInterceptTouchEvent, onNestedFling, onNestedPreFling, onNestedPrePerformAccessibilityAction, onNestedPreScroll, onNestedScroll, onNestedScrollAccepted, onRequestFocusInDescendants, onRequestSendAccessibilityEvent, onResolvePointerIcon, onStartNestedScroll, onStopNestedScroll, onViewAdded, onViewRemoved, recomputeViewAttributes, removeAllViews, removeAllViewsInLayout, removeDetachedView, removeView, removeViewAt, removeViewInLayout, removeViews, removeViewsInLayout, requestChildFocus, requestDisallowInterceptTouchEvent, requestSendAccessibilityEvent, requestTransparentRegion, restoreDefaultFocus, scheduleLayoutAnimation, setAddStatesFromChildren, setAlwaysDrawnWithCacheEnabled, setAnimationCacheEnabled, setChildrenDrawingCacheEnabled, setChildrenDrawingOrderEnabled, setChildrenDrawnWithCacheEnabled, setClipChildren, setClipToPadding, setDescendantFocusability, setLayoutAnimation, setLayoutAnimationListener, setLayoutMode, setLayoutTransition, setMotionEventSplittingEnabled, setOnHierarchyChangeListener, setPersistentDrawingCache, setStaticTransformationsEnabled, setTouchscreenBlocksFocus, setTransitionGroup, showContextMenuForChild, showContextMenuForChild, startActionModeForChild, startActionModeForChild, startLayoutAnimation, startViewTransition, updateViewLayout -
Methods inherited from class android.webkit.WebView
checkLayoutParams, generateDefaultLayoutParams, generateLayoutParams, generateLayoutParams, onLayout -
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
-
Constructor Detail
-
PlayerWebView
PlayerWebView(Context context)
-
PlayerWebView
PlayerWebView(Context context, AttributeSet attrs)
-
PlayerWebView
PlayerWebView(Context context, AttributeSet attrs, Integer defStyleAttr)
-
-
Method Detail
-
getMJavascriptBridge
final Object getMJavascriptBridge()
-
setMJavascriptBridge
final Unit setMJavascriptBridge(Object mJavascriptBridge)
-
getVideoId
final String getVideoId()
-
setVideoId
final Unit setVideoId(String videoId)
-
getPlaylistId
final String getPlaylistId()
-
setPlaylistId
final Unit setPlaylistId(String playlistId)
-
getVideoPaused
final Boolean getVideoPaused()
-
setVideoPaused
final Unit setVideoPaused(Boolean videoPaused)
-
getBufferedTime
final Double getBufferedTime()
-
setBufferedTime
final Unit setBufferedTime(Double bufferedTime)
-
getDuration
final Double getDuration()
-
setDuration
final Unit setDuration(Double duration)
-
getIsSeeking
final Boolean getIsSeeking()
-
setIsSeeking
final Unit setIsSeeking(Boolean isSeeking)
-
getIsEnded
final Boolean getIsEnded()
-
setIsEnded
final Unit setIsEnded(Boolean isEnded)
-
getQuality
final String getQuality()
-
setQuality
final Unit setQuality(String quality)
-
getPosition
final Long getPosition()
-
getPlayWhenReady
final Boolean getPlayWhenReady()
-
setPlayWhenReady
final Unit setPlayWhenReady(Boolean playWhenReady)
-
load
@Deprecated(message = Use load(params: Map<String, Any?>?) instead)@JvmOverloads() final Unit load(String videoId, Map<String, Object> loadParams)
-
load
@Deprecated(message = Use load(params: Map<String, Any?>?) instead)@JvmOverloads() final Unit load(String videoId)
-
load
final Unit load(Map<String, Object> params)
Load a video with a given map of params. To see a full list of supported params check: https://developer.dailymotion.com/player/#player-api-methods-load
-
initialize
final Unit initialize(String baseUrl, Map<String, String> queryParameters, Map<String, String> httpHeaders)
-
finishInitialization
final Unit finishInitialization(String baseUrl, Map<String, String> queryParameters, Map<String, String> httpHeaders, AdvertisingIdClient.Info adInfo)
-
queueCommand
final Unit queueCommand(String method, Object params)
-
callPlayerMethod
final Unit callPlayerMethod(String method, Object params)
-
setVisible
final Unit setVisible(Boolean visible, Boolean shouldHandleTimers)
Notify PlayerWebView of the view visibility.
- Parameters:
visible- TRUE, view is visible.shouldHandleTimers- if TRUE, it will call resumeTimers() if visible param is TRUE and pauseTimers() if visible param is FALSE.
-
setMinimizeProgress
final Unit setMinimizeProgress(Float p)
-
setIsLiked
final Unit setIsLiked(Boolean isLiked)
-
setIsInWatchLater
final Unit setIsInWatchLater(Boolean isInWatchLater)
-
showControls
final Unit showControls(Boolean visible)
-
setFullscreenButton
final Unit setFullscreenButton(Boolean fullScreen)
-
setSubtitle
final Unit setSubtitle(String language_code)
-
toggleControls
final Unit toggleControls()
-
togglePlay
final Unit togglePlay()
-
setIsWebContentsDebuggingEnabled
final Unit setIsWebContentsDebuggingEnabled(Boolean isWebContentsDebuggingEnabled)
-
setWebViewErrorListener
final Unit setWebViewErrorListener(PlayerWebView.WebViewErrorListener errorListener)
-
setEventListener
final Unit setEventListener(PlayerWebView.EventListener listener)
-
setEventListener
final Unit setEventListener(Function1<PlayerEvent, Unit> listener)
-
setOverrideUrlLoadingInterceptor
final Unit setOverrideUrlLoadingInterceptor(PlayerWebView.OverrideUrlLoadingInterceptor interceptor)
-
onTouchEvent
Boolean onTouchEvent(MotionEvent event)
-
-
-
-