/**@class android.widget.VideoView implements android.widget.MediaController.MediaPlayerControl implements android.media.SubtitleController.Anchor @extends android.view.SurfaceView Displays a video file. The VideoView class can load images from various sources (such as resources or content providers), takes care of computing its measurement from the video so that it can be used in any layout manager, and provides various display options such as scaling and tinting.<p> <em>Note: VideoView does not retain its full state when going into the background.</em> In particular, it does not restore the current play state, play position, selected tracks, or any subtitle tracks added via {@link #addSubtitleSource addSubtitleSource()}. Applications should save and restore these on their own in {@link android.app.Activity#onSaveInstanceState} and {@link android.app.Activity#onRestoreInstanceState}.<p> Also note that the audio session id (from {@link #getAudioSessionId}) may change from its previously returned value when the VideoView is restored. <p> By default, VideoView requests audio focus with {@link AudioManager#AUDIOFOCUS_GAIN}. Use {@link #setAudioFocusRequest}(int) to change this behavior. <p> The default {@link AudioAttributes} used during playback have a usage of {@link AudioAttributes#USAGE_MEDIA} and a content type of {@link AudioAttributes#CONTENT_TYPE_MOVIE}, use {@link #setAudioAttributes}(AudioAttributes) to modify them. */ var VideoView = { /** */ getAccessibilityClassName : function( ) {}, /** */ resolveAdjustedSize : function( ) {}, /**Sets video path. @param {String} path the path of the video. */ setVideoPath : function( ) {}, /**Sets video URI. @param {Object {Uri}} uri the URI of the video. */ setVideoURI : function( ) {}, /**Sets video URI using specific headers. @param {Object {Uri}} uri the URI of the video. @param {Object {java.util.Map}} headers the headers for the URI request. Note that the cross domain redirection is allowed by default, but that can be changed with key/value pairs through the headers parameter with "android-allow-cross-domain-redirect" as the key and "0" or "1" as the value to disallow or allow cross domain redirection. */ setVideoURI : function( ) {}, /**Sets which type of audio focus will be requested during the playback, or configures playback to not request audio focus. Valid values for focus requests are {@link AudioManager#AUDIOFOCUS_GAIN}, {@link AudioManager#AUDIOFOCUS_GAIN_TRANSIENT}, {@link AudioManager#AUDIOFOCUS_GAIN_TRANSIENT_MAY_DUCK}, and {@link AudioManager#AUDIOFOCUS_GAIN_TRANSIENT_EXCLUSIVE}. Or use {@link AudioManager#AUDIOFOCUS_NONE} to express that audio focus should not be requested when playback starts. You can for instance use this when playing a silent animation through this class, and you don't want to affect other audio applications playing in the background. @param {Number} focusGain the type of audio focus gain that will be requested, or {@link AudioManager#AUDIOFOCUS_NONE} to disable the use audio focus during playback. */ setAudioFocusRequest : function( ) {}, /**Sets the {@link AudioAttributes} to be used during the playback of the video. @param {Object {AudioAttributes}} attributes non-null <code>AudioAttributes</code>. */ setAudioAttributes : function( ) {}, /**Adds an external subtitle source file (from the provided input stream.) Note that a single external subtitle source may contain multiple or no supported tracks in it. If the source contained at least one track in it, one will receive an {@link MediaPlayer#MEDIA_INFO_METADATA_UPDATE} info message. Otherwise, if reading the source takes excessive time, one will receive a {@link MediaPlayer#MEDIA_INFO_SUBTITLE_TIMED_OUT} message. If the source contained no supported track (including an empty source file or null input stream), one will receive a {@link MediaPlayer#MEDIA_INFO_UNSUPPORTED_SUBTITLE} message. One can find the total number of available tracks using {@link MediaPlayer#getTrackInfo()} to see what additional tracks become available after this method call. @param {Object {InputStream}} is input stream containing the subtitle data. It will be closed by the media framework. @param {Object {MediaFormat}} format the format of the subtitle track(s). Must contain at least the mime type ({@link MediaFormat#KEY_MIME}) and the language ({@link MediaFormat#KEY_LANGUAGE}) of the file. If the file itself contains the language information, specify "und" for the language. */ addSubtitleSource : function( ) {}, /** */ stopPlayback : function( ) {}, /** */ setMediaController : function( ) {}, /**Register a callback to be invoked when the media file is loaded and ready to go. @param {Object {MediaPlayer.OnPreparedListener}} l The callback that will be run */ setOnPreparedListener : function( ) {}, /**Register a callback to be invoked when the end of a media file has been reached during playback. @param {Object {MediaPlayer.OnCompletionListener}} l The callback that will be run */ setOnCompletionListener : function( ) {}, /**Register a callback to be invoked when an error occurs during playback or setup. If no listener is specified, or if the listener returned false, VideoView will inform the user of any errors. @param {Object {MediaPlayer.OnErrorListener}} l The callback that will be run */ setOnErrorListener : function( ) {}, /**Register a callback to be invoked when an informational event occurs during playback or setup. @param {Object {MediaPlayer.OnInfoListener}} l The callback that will be run */ setOnInfoListener : function( ) {}, /** */ onTouchEvent : function( ) {}, /** */ onTrackballEvent : function( ) {}, /** */ onKeyDown : function( ) {}, /** */ start : function( ) {}, /** */ pause : function( ) {}, /** */ suspend : function( ) {}, /** */ resume : function( ) {}, /** */ getDuration : function( ) {}, /** */ getCurrentPosition : function( ) {}, /** */ seekTo : function( ) {}, /** */ isPlaying : function( ) {}, /** */ getBufferPercentage : function( ) {}, /** */ canPause : function( ) {}, /** */ canSeekBackward : function( ) {}, /** */ canSeekForward : function( ) {}, /** */ getAudioSessionId : function( ) {}, /** */ draw : function( ) {}, /** @hide */ setSubtitleWidget : function( ) {}, /** @hide */ getSubtitleLooper : function( ) {}, };