public class PLVideoView
extends android.widget.FrameLayout
PLMediaPlayer
It uses a SurfaceView
to render the video frameandroid.widget.FrameLayout.LayoutParams
android.view.ViewGroup.MarginLayoutParams, android.view.ViewGroup.OnHierarchyChangeListener
android.view.View.AccessibilityDelegate, android.view.View.BaseSavedState, android.view.View.DragShadowBuilder, android.view.View.MeasureSpec, android.view.View.OnApplyWindowInsetsListener, android.view.View.OnAttachStateChangeListener, android.view.View.OnClickListener, android.view.View.OnCreateContextMenuListener, android.view.View.OnDragListener, android.view.View.OnFocusChangeListener, android.view.View.OnGenericMotionListener, android.view.View.OnHoverListener, android.view.View.OnKeyListener, android.view.View.OnLayoutChangeListener, android.view.View.OnLongClickListener, android.view.View.OnSystemUiVisibilityChangeListener, android.view.View.OnTouchListener
Modifier and Type | Field and Description |
---|---|
static int |
ASPECT_RATIO_16_9
Display with aspect radio 16:9, may crop
|
static int |
ASPECT_RATIO_4_3
Display with aspect radio 4:3, may crop
|
static int |
ASPECT_RATIO_FIT_PARENT
Scale the video according to screen, default
|
static int |
ASPECT_RATIO_ORIGIN
Using the original video size
|
static int |
ASPECT_RATIO_PAVED_PARENT
Pave all the screen, may crop
|
FOCUS_AFTER_DESCENDANTS, FOCUS_BEFORE_DESCENDANTS, FOCUS_BLOCK_DESCENDANTS, LAYOUT_MODE_CLIP_BOUNDS, LAYOUT_MODE_OPTICAL_BOUNDS, PERSISTENT_ALL_CACHES, PERSISTENT_ANIMATION_CACHE, PERSISTENT_NO_CACHE, PERSISTENT_SCROLLING_CACHE
ACCESSIBILITY_LIVE_REGION_ASSERTIVE, ACCESSIBILITY_LIVE_REGION_NONE, ACCESSIBILITY_LIVE_REGION_POLITE, ALPHA, DRAWING_CACHE_QUALITY_AUTO, DRAWING_CACHE_QUALITY_HIGH, DRAWING_CACHE_QUALITY_LOW, FIND_VIEWS_WITH_CONTENT_DESCRIPTION, FIND_VIEWS_WITH_TEXT, FOCUS_BACKWARD, FOCUS_DOWN, FOCUS_FORWARD, FOCUS_LEFT, FOCUS_RIGHT, FOCUS_UP, FOCUSABLES_ALL, FOCUSABLES_TOUCH_MODE, GONE, HAPTIC_FEEDBACK_ENABLED, IMPORTANT_FOR_ACCESSIBILITY_AUTO, IMPORTANT_FOR_ACCESSIBILITY_NO, IMPORTANT_FOR_ACCESSIBILITY_NO_HIDE_DESCENDANTS, IMPORTANT_FOR_ACCESSIBILITY_YES, INVISIBLE, KEEP_SCREEN_ON, LAYER_TYPE_HARDWARE, LAYER_TYPE_NONE, LAYER_TYPE_SOFTWARE, LAYOUT_DIRECTION_INHERIT, LAYOUT_DIRECTION_LOCALE, LAYOUT_DIRECTION_LTR, LAYOUT_DIRECTION_RTL, MEASURED_HEIGHT_STATE_SHIFT, MEASURED_SIZE_MASK, MEASURED_STATE_MASK, MEASURED_STATE_TOO_SMALL, NO_ID, OVER_SCROLL_ALWAYS, OVER_SCROLL_IF_CONTENT_SCROLLS, OVER_SCROLL_NEVER, ROTATION, ROTATION_X, ROTATION_Y, SCALE_X, SCALE_Y, SCREEN_STATE_OFF, SCREEN_STATE_ON, SCROLL_AXIS_HORIZONTAL, SCROLL_AXIS_NONE, SCROLL_AXIS_VERTICAL, SCROLLBAR_POSITION_DEFAULT, SCROLLBAR_POSITION_LEFT, SCROLLBAR_POSITION_RIGHT, SCROLLBARS_INSIDE_INSET, SCROLLBARS_INSIDE_OVERLAY, SCROLLBARS_OUTSIDE_INSET, SCROLLBARS_OUTSIDE_OVERLAY, SOUND_EFFECTS_ENABLED, STATUS_BAR_HIDDEN, STATUS_BAR_VISIBLE, SYSTEM_UI_FLAG_FULLSCREEN, SYSTEM_UI_FLAG_HIDE_NAVIGATION, SYSTEM_UI_FLAG_IMMERSIVE, SYSTEM_UI_FLAG_IMMERSIVE_STICKY, SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN, SYSTEM_UI_FLAG_LAYOUT_HIDE_NAVIGATION, SYSTEM_UI_FLAG_LAYOUT_STABLE, SYSTEM_UI_FLAG_LOW_PROFILE, SYSTEM_UI_FLAG_VISIBLE, SYSTEM_UI_LAYOUT_FLAGS, TEXT_ALIGNMENT_CENTER, TEXT_ALIGNMENT_GRAVITY, TEXT_ALIGNMENT_INHERIT, TEXT_ALIGNMENT_TEXT_END, TEXT_ALIGNMENT_TEXT_START, TEXT_ALIGNMENT_VIEW_END, TEXT_ALIGNMENT_VIEW_START, TEXT_DIRECTION_ANY_RTL, TEXT_DIRECTION_FIRST_STRONG, TEXT_DIRECTION_INHERIT, TEXT_DIRECTION_LOCALE, TEXT_DIRECTION_LTR, TEXT_DIRECTION_RTL, TRANSLATION_X, TRANSLATION_Y, TRANSLATION_Z, VISIBLE, X, Y, Z
Constructor and Description |
---|
PLVideoView(android.content.Context context)
Constructor of PLVideoView
|
PLVideoView(android.content.Context context,
android.util.AttributeSet attrs)
Constructor of PLVideoView
|
PLVideoView(android.content.Context context,
android.util.AttributeSet attrs,
int defStyleAttr)
Constructor of PLVideoView
|
PLVideoView(android.content.Context context,
android.util.AttributeSet attrs,
int defStyleAttr,
int defStyleRes)
Constructor of PLVideoView
|
Modifier and Type | Method and Description |
---|---|
boolean |
canPause()
Can pause.
|
boolean |
canSeekBackward()
Can seek backward.
|
boolean |
canSeekForward()
Can seek forward.
|
int |
getBufferPercentage()
Gets buffer percentage.
|
long |
getCurrentPosition()
Gets current position.
|
int |
getDisplayAspectRatio()
Get the display aspect ratio
|
long |
getDuration()
Gets the duration of the file or stream.
|
android.view.SurfaceView |
getSurfaceView()
Gets surface view.
|
boolean |
isLooping()
Checks whether looping or non-looping.
|
boolean |
isPlaying()
Checks whether the MediaPlayer is playing.
|
boolean |
onKeyDown(int keyCode,
android.view.KeyEvent event) |
boolean |
onTouchEvent(android.view.MotionEvent ev) |
boolean |
onTrackballEvent(android.view.MotionEvent ev) |
void |
pause()
Pause play.
|
void |
seekTo(long msec)
Seeks to specified time position.
|
void |
setAVOptions(AVOptions options)
Set custom play option
|
void |
setBufferingIndicator(android.view.View indicator)
Sets the indicator view
The indicator will be shown when the player is buffering
|
void |
setDisplayAspectRatio(int previewMode)
Set the display aspect ratio
The display layout will resize immediately after called
|
void |
setLooping(boolean looping)
Sets the player to be looping or non-looping.
|
void |
setMediaController(IMediaController controller)
Sets the MediaController widget
|
void |
setOnBufferingUpdateListener(PLMediaPlayer.OnBufferingUpdateListener listener)
Register a callback to be invoked when the status of a network
stream's buffer has changed.
|
void |
setOnCompletionListener(PLMediaPlayer.OnCompletionListener listener)
Register a callback to be invoked when the end of a media source
has been reached during playback.
|
void |
setOnErrorListener(PLMediaPlayer.OnErrorListener listener)
Register a callback to be invoked when an error has happened
during an asynchronous operation.
|
void |
setOnInfoListener(PLMediaPlayer.OnInfoListener listener)
Register a callback to be invoked when an info/warning is available.
|
void |
setOnPreparedListener(PLMediaPlayer.OnPreparedListener listener)
Register a callback to be invoked when the media source is ready
for playback.
|
void |
setOnSeekCompleteListener(PLMediaPlayer.OnSeekCompleteListener listener)
Register a callback to be invoked when a seek operation has been
completed.
|
void |
setOnVideoSizeChangedListener(PLMediaPlayer.OnVideoSizeChangedListener listener)
Register a callback to be invoked when the video size is
known or updated.
|
void |
setScreenOnWhilePlaying(boolean screenOn)
Control whether we should use the attached SurfaceHolder to keep the
screen on while video playback is occurring.
|
void |
setVideoPath(java.lang.String path)
Sets video path.
|
void |
setVideoURI(android.net.Uri uri)
Sets video URI.
|
void |
setVolume(float leftVolume,
float rightVolume)
Sets the volume on this player.
|
void |
setWakeMode(android.content.Context context,
int mode)
Set the low-level power management behavior for this MediaPlayer.
|
void |
start()
Start play.
|
void |
stopPlayback()
Releases resources associated with this object.
|
draw, drawableHotspotChanged, gatherTransparentRegion, generateLayoutParams, getConsiderGoneChildrenWhenMeasuring, getForeground, getForegroundGravity, getForegroundTintList, getForegroundTintMode, getMeasureAllChildren, jumpDrawablesToCurrentState, onInitializeAccessibilityEvent, onInitializeAccessibilityNodeInfo, setForeground, setForegroundGravity, setForegroundTintList, setForegroundTintMode, setMeasureAllChildren, setVisibility, shouldDelayChildPressedState
addChildrenForAccessibility, addFocusables, addStatesFromChildren, addTouchables, addView, addView, addView, addView, addView, bringChildToFront, childDrawableStateChanged, childHasTransientStateChanged, clearChildFocus, clearDisappearingChildren, clearFocus, dispatchApplyWindowInsets, dispatchConfigurationChanged, dispatchDisplayHint, dispatchDragEvent, dispatchDrawableHotspotChanged, dispatchKeyEvent, dispatchKeyEventPreIme, dispatchKeyShortcutEvent, dispatchSetActivated, dispatchSetSelected, dispatchSystemUiVisibilityChanged, dispatchTouchEvent, dispatchTrackballEvent, dispatchUnhandledMove, dispatchWindowFocusChanged, dispatchWindowSystemUiVisiblityChanged, dispatchWindowVisibilityChanged, endViewTransition, findFocus, findViewsWithText, focusableViewAvailable, focusSearch, getChildAt, getChildCount, getChildMeasureSpec, getChildVisibleRect, getClipChildren, getClipToPadding, getDescendantFocusability, getFocusedChild, getLayoutAnimation, getLayoutAnimationListener, getLayoutMode, getLayoutTransition, getNestedScrollAxes, getOverlay, getPersistentDrawingCache, getTouchscreenBlocksFocus, hasFocus, hasFocusable, hasTransientState, indexOfChild, invalidateChild, invalidateChildInParent, isAlwaysDrawnWithCacheEnabled, isAnimationCacheEnabled, isMotionEventSplittingEnabled, isTransitionGroup, layout, notifySubtreeAccessibilityStateChanged, offsetDescendantRectToMyCoords, offsetRectIntoDescendantCoords, onInterceptHoverEvent, onInterceptTouchEvent, onNestedFling, onNestedPreFling, onNestedPrePerformAccessibilityAction, onNestedPreScroll, onNestedScroll, onNestedScrollAccepted, onRequestSendAccessibilityEvent, onStartNestedScroll, onStopNestedScroll, recomputeViewAttributes, removeAllViews, removeAllViewsInLayout, removeView, removeViewAt, removeViewInLayout, removeViews, removeViewsInLayout, requestChildFocus, requestChildRectangleOnScreen, requestDisallowInterceptTouchEvent, requestFocus, requestSendAccessibilityEvent, requestTransparentRegion, scheduleLayoutAnimation, setAddStatesFromChildren, setAlwaysDrawnWithCacheEnabled, setAnimationCacheEnabled, setClipChildren, setClipToPadding, setDescendantFocusability, setLayoutAnimation, setLayoutAnimationListener, setLayoutMode, setLayoutTransition, setMotionEventSplittingEnabled, setOnHierarchyChangeListener, setPersistentDrawingCache, setTouchscreenBlocksFocus, setTransitionGroup, showContextMenuForChild, startActionModeForChild, startLayoutAnimation, startViewTransition, updateViewLayout
addFocusables, addOnAttachStateChangeListener, addOnLayoutChangeListener, animate, announceForAccessibility, bringToFront, buildDrawingCache, buildDrawingCache, buildLayer, callOnClick, cancelLongPress, cancelPendingInputEvents, canResolveLayoutDirection, canResolveTextAlignment, canResolveTextDirection, canScrollHorizontally, canScrollVertically, checkInputConnectionProxy, clearAnimation, combineMeasuredStates, computeScroll, computeSystemWindowInsets, createAccessibilityNodeInfo, createContextMenu, destroyDrawingCache, dispatchGenericMotionEvent, dispatchNestedFling, dispatchNestedPreFling, dispatchNestedPrePerformAccessibilityAction, dispatchNestedPreScroll, dispatchNestedScroll, dispatchPopulateAccessibilityEvent, findViewById, findViewWithTag, focusSearch, forceLayout, generateViewId, getAccessibilityLiveRegion, getAccessibilityNodeProvider, getAccessibilityTraversalAfter, getAccessibilityTraversalBefore, getAlpha, getAnimation, getApplicationWindowToken, getBackground, getBackgroundTintList, getBackgroundTintMode, getBaseline, getBottom, getCameraDistance, getClipBounds, getClipToOutline, getContentDescription, getContext, getDefaultSize, getDisplay, getDrawableState, getDrawingCache, getDrawingCache, getDrawingCacheBackgroundColor, getDrawingCacheQuality, getDrawingRect, getDrawingTime, getElevation, getFilterTouchesWhenObscured, getFitsSystemWindows, getFocusables, getFocusedRect, getGlobalVisibleRect, getGlobalVisibleRect, getHandler, getHeight, getHitRect, getHorizontalFadingEdgeLength, getId, getImportantForAccessibility, getKeepScreenOn, getKeyDispatcherState, getLabelFor, getLayerType, getLayoutDirection, getLayoutParams, getLeft, getLocalVisibleRect, getLocationInWindow, getLocationOnScreen, getMatrix, getMeasuredHeight, getMeasuredHeightAndState, getMeasuredState, getMeasuredWidth, getMeasuredWidthAndState, getMinimumHeight, getMinimumWidth, getNextFocusDownId, getNextFocusForwardId, getNextFocusLeftId, getNextFocusRightId, getNextFocusUpId, getOnFocusChangeListener, getOutlineProvider, getOverScrollMode, getPaddingBottom, getPaddingEnd, getPaddingLeft, getPaddingRight, getPaddingStart, getPaddingTop, getParent, getParentForAccessibility, getPivotX, getPivotY, getResources, getRight, getRootView, getRotation, getRotationX, getRotationY, getScaleX, getScaleY, getScrollBarDefaultDelayBeforeFade, getScrollBarFadeDuration, getScrollBarSize, getScrollBarStyle, getScrollX, getScrollY, getSolidColor, getStateListAnimator, getSystemUiVisibility, getTag, getTag, getTextAlignment, getTextDirection, getTop, getTouchables, getTouchDelegate, getTransitionName, getTranslationX, getTranslationY, getTranslationZ, getVerticalFadingEdgeLength, getVerticalScrollbarPosition, getVerticalScrollbarWidth, getViewTreeObserver, getVisibility, getWidth, getWindowId, getWindowSystemUiVisibility, getWindowToken, getWindowVisibility, getWindowVisibleDisplayFrame, getX, getY, getZ, hasNestedScrollingParent, hasOnClickListeners, hasOverlappingRendering, hasWindowFocus, inflate, invalidate, invalidate, invalidate, invalidateDrawable, invalidateOutline, isAccessibilityFocused, isActivated, isAttachedToWindow, isClickable, isDirty, isDrawingCacheEnabled, isDuplicateParentStateEnabled, isEnabled, isFocusable, isFocusableInTouchMode, isFocused, isHapticFeedbackEnabled, isHardwareAccelerated, isHorizontalFadingEdgeEnabled, isHorizontalScrollBarEnabled, isHovered, isImportantForAccessibility, isInEditMode, isInLayout, isInTouchMode, isLaidOut, isLayoutDirectionResolved, isLayoutRequested, isLongClickable, isNestedScrollingEnabled, isOpaque, isPaddingRelative, isPressed, isSaveEnabled, isSaveFromParentEnabled, isScrollbarFadingEnabled, isScrollContainer, isSelected, isShown, isSoundEffectsEnabled, isTextAlignmentResolved, isTextDirectionResolved, isVerticalFadingEdgeEnabled, isVerticalScrollBarEnabled, measure, offsetLeftAndRight, offsetTopAndBottom, onApplyWindowInsets, onCancelPendingInputEvents, onCheckIsTextEditor, onCreateInputConnection, onDragEvent, onFilterTouchEventForSecurity, onFinishTemporaryDetach, onGenericMotionEvent, onHoverChanged, onHoverEvent, onKeyLongPress, onKeyMultiple, onKeyPreIme, onKeyShortcut, onKeyUp, onPopulateAccessibilityEvent, onRtlPropertiesChanged, onScreenStateChanged, onStartTemporaryDetach, onWindowFocusChanged, onWindowSystemUiVisibilityChanged, performAccessibilityAction, performClick, performHapticFeedback, performHapticFeedback, performLongClick, playSoundEffect, post, postDelayed, postInvalidate, postInvalidate, postInvalidateDelayed, postInvalidateDelayed, postInvalidateOnAnimation, postInvalidateOnAnimation, postOnAnimation, postOnAnimationDelayed, refreshDrawableState, removeCallbacks, removeOnAttachStateChangeListener, removeOnLayoutChangeListener, requestApplyInsets, requestFitSystemWindows, requestFocus, requestFocus, requestFocusFromTouch, requestLayout, requestRectangleOnScreen, requestRectangleOnScreen, requestUnbufferedDispatch, resolveSize, resolveSizeAndState, restoreHierarchyState, saveHierarchyState, scheduleDrawable, scrollBy, scrollTo, sendAccessibilityEvent, sendAccessibilityEventUnchecked, setAccessibilityDelegate, setAccessibilityLiveRegion, setAccessibilityTraversalAfter, setAccessibilityTraversalBefore, setActivated, setAlpha, setAnimation, setBackground, setBackgroundColor, setBackgroundDrawable, setBackgroundResource, setBackgroundTintList, setBackgroundTintMode, setBottom, setCameraDistance, setClickable, setClipBounds, setClipToOutline, setContentDescription, setDrawingCacheBackgroundColor, setDrawingCacheEnabled, setDrawingCacheQuality, setDuplicateParentStateEnabled, setElevation, setEnabled, setFadingEdgeLength, setFilterTouchesWhenObscured, setFitsSystemWindows, setFocusable, setFocusableInTouchMode, setHapticFeedbackEnabled, setHasTransientState, setHorizontalFadingEdgeEnabled, setHorizontalScrollBarEnabled, setHovered, setId, setImportantForAccessibility, setKeepScreenOn, setLabelFor, setLayerPaint, setLayerType, setLayoutDirection, setLayoutParams, setLeft, setLongClickable, setMinimumHeight, setMinimumWidth, setNestedScrollingEnabled, setNextFocusDownId, setNextFocusForwardId, setNextFocusLeftId, setNextFocusRightId, setNextFocusUpId, setOnApplyWindowInsetsListener, setOnClickListener, setOnCreateContextMenuListener, setOnDragListener, setOnFocusChangeListener, setOnGenericMotionListener, setOnHoverListener, setOnKeyListener, setOnLongClickListener, setOnSystemUiVisibilityChangeListener, setOnTouchListener, setOutlineProvider, setOverScrollMode, setPadding, setPaddingRelative, setPivotX, setPivotY, setPressed, setRight, setRotation, setRotationX, setRotationY, setSaveEnabled, setSaveFromParentEnabled, setScaleX, setScaleY, setScrollBarDefaultDelayBeforeFade, setScrollBarFadeDuration, setScrollbarFadingEnabled, setScrollBarSize, setScrollBarStyle, setScrollContainer, setScrollX, setScrollY, setSelected, setSoundEffectsEnabled, setStateListAnimator, setSystemUiVisibility, setTag, setTag, setTextAlignment, setTextDirection, setTop, setTouchDelegate, setTransitionName, setTranslationX, setTranslationY, setTranslationZ, setVerticalFadingEdgeEnabled, setVerticalScrollBarEnabled, setVerticalScrollbarPosition, setWillNotCacheDrawing, setWillNotDraw, setX, setY, setZ, showContextMenu, startActionMode, startAnimation, startDrag, startNestedScroll, stopNestedScroll, toString, unscheduleDrawable, unscheduleDrawable, willNotCacheDrawing, willNotDraw
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
canResolveLayoutDirection, canResolveTextAlignment, canResolveTextDirection, createContextMenu, getLayoutDirection, getParent, getParentForAccessibility, getTextAlignment, getTextDirection, isLayoutDirectionResolved, isLayoutRequested, isTextAlignmentResolved, isTextDirectionResolved, requestFitSystemWindows, requestLayout
public static final int ASPECT_RATIO_ORIGIN
public static final int ASPECT_RATIO_FIT_PARENT
public static final int ASPECT_RATIO_PAVED_PARENT
public static final int ASPECT_RATIO_16_9
public static final int ASPECT_RATIO_4_3
public PLVideoView(android.content.Context context)
context
- the contextpublic PLVideoView(android.content.Context context, android.util.AttributeSet attrs)
context
- the contextattrs
- the attrspublic PLVideoView(android.content.Context context, android.util.AttributeSet attrs, int defStyleAttr)
context
- the contextattrs
- the attrsdefStyleAttr
- the def style attrpublic PLVideoView(android.content.Context context, android.util.AttributeSet attrs, int defStyleAttr, int defStyleRes)
context
- the contextattrs
- the attrsdefStyleAttr
- the def style attrdefStyleRes
- the def style respublic android.view.SurfaceView getSurfaceView()
public void setDisplayAspectRatio(int previewMode)
previewMode
- the value of preview mode public int getDisplayAspectRatio()
public void stopPlayback()
public void setAVOptions(AVOptions options)
options
- the options to be setpublic void setVideoPath(java.lang.String path)
path
- the path of the video.public void setVideoURI(android.net.Uri uri)
uri
- the URI of the video.public void setBufferingIndicator(android.view.View indicator)
indicator
- the indicator viewpublic void setMediaController(IMediaController controller)
controller
- the widget which to be attached to the play viewpublic void setVolume(float leftVolume, float rightVolume)
AudioManager.setStreamVolume(int, int, int)
which sets the volume of ALL streams of
a particular type. Note that the passed volume values are raw scalars in range 0.0 to 1.0.
UI controls should be scaled logarithmically.leftVolume
- left volume scalarrightVolume
- right volume scalarpublic void setWakeMode(android.content.Context context, int mode)
This function has the MediaPlayer access the low-level power manager
service to control the device's power usage while playing is occurring.
The parameter is a combination of PowerManager
wake flags.
Use of this method requires Manifest.permission.WAKE_LOCK
permission.
By default, no attempt is made to keep the device awake during playback.
context
- the Context to usemode
- the power/wake mode to setPowerManager
public void setScreenOnWhilePlaying(boolean screenOn)
setWakeMode(android.content.Context, int)
where possible, since it doesn't
require that the application have permission for low-level wake lock
access.screenOn
- Supply true to keep the screen on, false to allow it to turn off.public void setLooping(boolean looping)
looping
- whether to loop or notpublic boolean isLooping()
public void start()
IMediaController.MediaPlayerControl
start
in interface IMediaController.MediaPlayerControl
public void pause()
IMediaController.MediaPlayerControl
pause
in interface IMediaController.MediaPlayerControl
public long getDuration()
IMediaController.MediaPlayerControl
getDuration
in interface IMediaController.MediaPlayerControl
public long getCurrentPosition()
IMediaController.MediaPlayerControl
getCurrentPosition
in interface IMediaController.MediaPlayerControl
public void seekTo(long msec)
IMediaController.MediaPlayerControl
seekTo
in interface IMediaController.MediaPlayerControl
msec
- the pospublic boolean isPlaying()
IMediaController.MediaPlayerControl
isPlaying
in interface IMediaController.MediaPlayerControl
public int getBufferPercentage()
IMediaController.MediaPlayerControl
getBufferPercentage
in interface IMediaController.MediaPlayerControl
public boolean canPause()
IMediaController.MediaPlayerControl
canPause
in interface IMediaController.MediaPlayerControl
public boolean canSeekBackward()
IMediaController.MediaPlayerControl
canSeekBackward
in interface IMediaController.MediaPlayerControl
public boolean canSeekForward()
IMediaController.MediaPlayerControl
canSeekForward
in interface IMediaController.MediaPlayerControl
public void setOnInfoListener(PLMediaPlayer.OnInfoListener listener)
listener
- the callback that will be runpublic void setOnErrorListener(PLMediaPlayer.OnErrorListener listener)
listener
- the callback that will be runpublic void setOnPreparedListener(PLMediaPlayer.OnPreparedListener listener)
listener
- the callback that will be runpublic void setOnCompletionListener(PLMediaPlayer.OnCompletionListener listener)
listener
- the callback that will be runpublic void setOnBufferingUpdateListener(PLMediaPlayer.OnBufferingUpdateListener listener)
listener
- the callback that will be run.public void setOnSeekCompleteListener(PLMediaPlayer.OnSeekCompleteListener listener)
listener
- the callback that will be runpublic void setOnVideoSizeChangedListener(PLMediaPlayer.OnVideoSizeChangedListener listener)
listener
- the callback that will be runpublic boolean onTouchEvent(android.view.MotionEvent ev)
onTouchEvent
in class android.view.View
public boolean onTrackballEvent(android.view.MotionEvent ev)
onTrackballEvent
in class android.view.View
public boolean onKeyDown(int keyCode, android.view.KeyEvent event)
onKeyDown
in interface android.view.KeyEvent.Callback
onKeyDown
in class android.view.View