VideoView

Class of android.widget · VideoView.java · Android's reference

public class VideoView extends SurfaceView implements MediaController.MediaPlayerControl

VideoView ← SurfaceView ← View

A view that plays a video. The runtime has no media player for apps yet, so each video that a VideoView opens fails as a format that the device cannot play: the error listener gets MEDIA_ERROR_UNKNOWN with MEDIA_ERROR_UNSUPPORTED, and when no listener takes the error, the completion listener is called, as on Android.

Constructors

public VideoView(Context context) source
public VideoView(Context context, AttributeSet attrs) source
public VideoView(Context context, AttributeSet attrs, int defStyleAttr) source
public VideoView(Context context, AttributeSet attrs, int defStyleAttr, int defStyleRes) source

Methods

public int resolveAdjustedSize(int desiredSize, int measureSpec) source
public void setVideoPath(String path) source
public void setVideoURI(Uri uri) source
public void setVideoURI(Uri uri, Map<String, String> headers) source
public void setAudioFocusRequest(int focusGain) empty body source
public void stopPlayback() source
public void setMediaController(MediaController controller) source
public void setOnPreparedListener(MediaPlayer.OnPreparedListener l) empty body source
public void setOnCompletionListener(MediaPlayer.OnCompletionListener l) source
public void setOnErrorListener(MediaPlayer.OnErrorListener l) source
public void setOnInfoListener(MediaPlayer.OnInfoListener l) empty body source
public boolean onTouchEvent(MotionEvent ev) source
public void start() empty body source
public void pause() empty body source
public void suspend() empty body source
public void resume() source
public int getDuration() source
public int getCurrentPosition() source
public void seekTo(int msec) empty body source
public boolean isPlaying() source
public int getBufferPercentage() source
public boolean canPause() source
public boolean canSeekBackward() source
public boolean canSeekForward() source
public int getAudioSessionId() source
public CharSequence getAccessibilityClassName() source

Made from ScarletNX's Sail at 166ad3910f80. The framework is ScarletNX's (GPL-3.0-or-later); the parts that follow the Android Open Source Project's sources (Apache-2.0) say so in their files.