Package org.robolectric.shadows
Class ShadowVideoView
- java.lang.Object
-
- org.robolectric.shadows.ShadowView
-
- org.robolectric.shadows.ShadowSurfaceView
-
- org.robolectric.shadows.ShadowVideoView
-
@Implements(android.widget.VideoView.class) public class ShadowVideoView extends ShadowSurfaceView
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.robolectric.shadows.ShadowSurfaceView
ShadowSurfaceView.FakeSurfaceHolder
-
Nested classes/interfaces inherited from class org.robolectric.shadows.ShadowView
ShadowView.WindowIdHelper
-
-
Field Summary
Fields Modifier and Type Field Description static int
PAUSE
static int
RESUME
static int
START
static int
STOP
static int
SUSPEND
-
Fields inherited from class org.robolectric.shadows.ShadowView
attributeSet, realView, scrollToCoordinates, viewReflector
-
-
Constructor Summary
Constructors Constructor Description ShadowVideoView()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected boolean
canPause()
protected int
getCurrentPosition()
int
getCurrentVideoState()
protected int
getDuration()
MediaPlayer.OnCompletionListener
getOnCompletionListener()
MediaPlayer.OnErrorListener
getOnErrorListener()
MediaPlayer.OnPreparedListener
getOnPreparedListener()
int
getPrevVideoState()
String
getVideoPath()
String
getVideoURIString()
protected boolean
isPlaying()
protected void
pause()
protected void
resume()
protected void
seekTo(int msec)
void
setDuration(int duration)
protected void
setOnCompletionListener(MediaPlayer.OnCompletionListener l)
protected void
setOnErrorListener(MediaPlayer.OnErrorListener l)
protected void
setOnPreparedListener(MediaPlayer.OnPreparedListener l)
protected void
setVideoPath(String path)
protected void
setVideoURI(Uri uri)
protected void
start()
protected void
stopPlayback()
protected void
suspend()
-
Methods inherited from class org.robolectric.shadows.ShadowSurfaceView
getFakeSurfaceHolder, getHolder, onAttachedToWindow
-
Methods inherited from class org.robolectric.shadows.ShadowView
__constructor__, __constructor__, addGlobalPerformClickListener, addGlobalPerformLongClickListener, addOnAttachStateChangeListener, addOnLayoutChangeListener, callOnAttachedToWindow, callOnDetachedFromWindow, checkedPerformClick, clearAnimation, clearWasInvalidated, clickOn, didRequestLayout, draw, dump, dump, dump, dumpAttribute, dumpAttributes, dumpFirstPart, dumpIndent, getGlobalVisibleRect, getLastTouchEvent, getLayerType, getLocationOnScreen, getOnAttachStateChangeListeners, getOnClickListener, getOnCreateContextMenuListener, getOnLayoutChangeListeners, getOnLongClickListener, getOnSystemUiVisibilityChangeListener, getOnTouchListener, getScrollX, getScrollY, getSourceLayoutResId, getWindowDisplayFrame, getWindowId, getWindowVisibleDisplayFrame, initialAwakenScrollBars, innerText, innerText, invalidate, isAttachedToWindow, lastHapticFeedbackPerformed, mapRectFromViewToScreenCoords, onLayout, onLayoutWasCalled, onTouchEvent, performClick, performHapticFeedback, performLongClick, post, postDelayed, postInvalidateDelayed, removeCallbacks, removeGlobalPerformClickListener, removeGlobalPerformLongClickListener, removeOnAttachStateChangeListener, removeOnLayoutChangeListener, requestLayout, reset, scrollBy, scrollTo, setAnimation, setDidRequestLayout, setGlobalVisibleRect, setLayerType, setMyParent, setOnClickListener, setOnCreateContextMenuListener, setOnFocusChangeListener, setOnLongClickListener, setOnSystemUiVisibilityChangeListener, setOnTouchListener, setScrollX, setScrollY, setViewFocus, visualize, wasInvalidated
-
-
-
-
Field Detail
-
STOP
public static final int STOP
- See Also:
- Constant Field Values
-
START
public static final int START
- See Also:
- Constant Field Values
-
SUSPEND
public static final int SUSPEND
- See Also:
- Constant Field Values
-
PAUSE
public static final int PAUSE
- See Also:
- Constant Field Values
-
RESUME
public static final int RESUME
- See Also:
- Constant Field Values
-
-
Method Detail
-
setOnPreparedListener
@Implementation protected void setOnPreparedListener(MediaPlayer.OnPreparedListener l)
-
setOnErrorListener
@Implementation protected void setOnErrorListener(MediaPlayer.OnErrorListener l)
-
setOnCompletionListener
@Implementation protected void setOnCompletionListener(MediaPlayer.OnCompletionListener l)
-
setVideoPath
@Implementation protected void setVideoPath(String path)
-
setVideoURI
@Implementation protected void setVideoURI(Uri uri)
-
start
@Implementation protected void start()
-
stopPlayback
@Implementation protected void stopPlayback()
-
suspend
@Implementation protected void suspend()
-
pause
@Implementation protected void pause()
-
resume
@Implementation protected void resume()
-
isPlaying
@Implementation protected boolean isPlaying()
-
canPause
@Implementation protected boolean canPause()
-
seekTo
@Implementation protected void seekTo(int msec)
-
getCurrentPosition
@Implementation protected int getCurrentPosition()
-
getDuration
@Implementation protected int getDuration()
-
getOnPreparedListener
public MediaPlayer.OnPreparedListener getOnPreparedListener()
- Returns:
- On prepared listener.
-
getOnErrorListener
public MediaPlayer.OnErrorListener getOnErrorListener()
- Returns:
- On error listener.
-
getOnCompletionListener
public MediaPlayer.OnCompletionListener getOnCompletionListener()
- Returns:
- On completion listener.
-
getVideoPath
public String getVideoPath()
- Returns:
- Video path.
-
getVideoURIString
public String getVideoURIString()
- Returns:
- Video URI.
-
getCurrentVideoState
public int getCurrentVideoState()
- Returns:
- Current video state.
-
getPrevVideoState
public int getPrevVideoState()
- Returns:
- Previous video state.
-
setDuration
public void setDuration(int duration)
-
-