Best code examples for MediaPlayer getVideoWidth method (android.media.MediaPlayer.getVideoWidth)

These code examples were ranked by Codota’s semantic indexing as the best open source examples for MediaPlayer getVideoWidth method.
You can now enable Codota on your own code to easily search and navigate your Java codebase.

MediaPlayer getVideoWidth examples from Open Source projects
This code example shows how to use the following methods: getDuration, getVideoHeight, getVideoWidth, prepare, setDataSource
174:	MediaPlayer player = new MediaPlayer(); 
-
176:	player.setDataSource(filePath); 
177:	player.prepare(); 
178:	obj.put("duration", player.getDuration() / 1000); 
-
180:	obj.put("height", player.getVideoHeight()); 
181:	obj.put("width", player.getVideoWidth()); 
Full Snippet Info
8
CodeRank
This code example shows how to use the following methods: getDuration, getVideoHeight, getVideoWidth, prepare, setDataSource
177:	MediaPlayer player = new MediaPlayer(); 
-
179:	player.setDataSource(filePath); 
180:	player.prepare(); 
181:	obj.put("duration", player.getDuration() / 1000); 
-
183:	obj.put("height", player.getVideoHeight()); 
184:	obj.put("width", player.getVideoWidth()); 
Full Snippet Info
7
CodeRank
This code example shows how to use the following methods: getVideoHeight, getVideoWidth, start
52:	mVideoWidth = mMediaPlayer.getVideoWidth(); 
53:	mVideoHeight = mMediaPlayer.getVideoHeight(); 
-
56:	mMediaPlayer.start(); 
Full Snippet Info
6
CodeRank
This code example shows how to use the following methods: getVideoHeight, getVideoWidth, start
143:	videoWidth = mp.getVideoWidth(); 
144:	videoHeight = mp.getVideoHeight(); 
-
170:	mp.start(); 
Full Snippet Info
6
CodeRank
This code example shows how to use the following methods: getDuration, getVideoHeight, getVideoWidth, prepare, setDataSource
177:	MediaPlayer player = new MediaPlayer(); 
-
179:	player.setDataSource(filePath); 
180:	player.prepare(); 
181:	obj.put("duration", player.getDuration() / 1000); 
-
183:	obj.put("height", player.getVideoHeight()); 
184:	obj.put("width", player.getVideoWidth()); 
Full Snippet Info
7
CodeRank
This code example shows how to use the following methods: getVideoHeight, getVideoWidth
200:	videoWidth = mp.getVideoWidth(); 
201:	videoHeight = mp.getVideoHeight(); 
Full Snippet Info
6
CodeRank
This code example shows how to use the following methods: getVideoHeight, getVideoWidth
324:	mVideoWidth = mp.getVideoWidth(); 
325:	mVideoHeight = mp.getVideoHeight(); 
Full Snippet Info
6
CodeRank
This code example shows how to use the following methods: getDuration, getVideoHeight, getVideoWidth, prepare, setDataSource
159:	MediaPlayer player = new MediaPlayer(); 
-
161:	player.setDataSource(filePath); 
162:	player.prepare(); 
163:	obj.put("duration", player.getDuration()); 
-
165:	obj.put("height", player.getVideoHeight()); 
166:	obj.put("width", player.getVideoWidth()); 
Full Snippet Info
6
CodeRank
This code example shows how to use the following methods: getVideoHeight, getVideoWidth
150:	float videoWidth = mMediaPlayer.getVideoWidth(); 
151:	float videoHeight = mMediaPlayer.getVideoHeight(); 
Full Snippet Info
5
CodeRank
This code example shows how to use the following methods: getVideoHeight, getVideoWidth
129:	myResult.add(_myMediaPlayer.getVideoWidth()); 
130:	myResult.add(_myMediaPlayer.getVideoHeight()); 
Full Snippet Info
5
CodeRank
This code example shows how to use the following methods: getVideoHeight, getVideoWidth
139:	float videoWidth = mediaPlayer.getVideoWidth(); 
140:	float videoHeight = mediaPlayer.getVideoHeight(); 
Full Snippet Info
5
CodeRank
This code example shows how to use the following methods: getVideoHeight, getVideoWidth, prepare, setDataSource
37:	mp.setDataSource("android.resource://com.silke.sceneFiendAndroidApp/raw/despicable_me_pre.mp4"); 
-
52:	mp.prepare(); 
-
62:	int videoWidth = mp.getVideoHeight(); 
63:	int videoHeight = mp.getVideoWidth(); 
Full Snippet Info
5
CodeRank
This code example shows how to use the following methods: getVideoHeight, getVideoWidth, start
73:	mVideoWidth = mMediaPlayer.getVideoWidth(); 
74:	mVideoHeight = mMediaPlayer.getVideoHeight(); 
-
80:	mMediaPlayer.start(); 
Full Snippet Info
5
CodeRank
This code example shows how to use the following methods: getVideoHeight, getVideoWidth
323:	return mMediaPlayer.getVideoWidth() + "x" + mMediaPlayer.getVideoHeight(); 
Full Snippet Info
5
CodeRank
This code example shows how to use the following methods: getVideoHeight, getVideoWidth, start
127:	this.videoWidth = this.mediaPlayer.getVideoWidth(); 
128:	this.videoHeight = this.mediaPlayer.getVideoHeight(); 
-
132:	this.mediaPlayer.start(); 
Full Snippet Info
5
CodeRank
This code example shows how to use the following methods: getVideoHeight, getVideoWidth, start
127:	vWidth = player.getVideoWidth(); 
128:	vHeight = player.getVideoHeight(); 
-
146:	player.start(); 
Full Snippet Info
5
CodeRank
This code example shows how to use the following methods: getVideoHeight, getVideoWidth
93:	videoWidth = mediaPlayer.getVideoWidth(); 
94:	videoHeight = mediaPlayer.getVideoHeight(); 
Full Snippet Info
5
CodeRank
This code example shows how to use the following methods: getVideoHeight, getVideoWidth
108:	int videoWidth = player.getVideoWidth(); 
109:	int videoHeight = player.getVideoHeight(); 
Full Snippet Info
5
CodeRank
This code example shows how to use the following methods: getVideoHeight, getVideoWidth
153:	int videoWidth = mediaPlayer.getVideoWidth(); 
154:	int videoHeight = mediaPlayer.getVideoHeight(); 
Full Snippet Info
5
CodeRank
This code example shows how to use the following methods: getVideoHeight, getVideoWidth
183:	return new Point( mediaPlayer.getVideoWidth(), mediaPlayer.getVideoHeight() ); 
Full Snippet Info
4
CodeRank
This code example shows how to use the following methods: getVideoHeight, getVideoWidth
72:	int videoWidth = player.getVideoWidth(); 
73:	int videoHeight = player.getVideoHeight(); 
Full Snippet Info
5
CodeRank
This code example shows how to use the following methods: getVideoHeight, getVideoWidth, start
129:	int width = mediaPlayer.getVideoWidth(); 
130:	int height = mediaPlayer.getVideoHeight(); 
-
136:	mediaPlayer.start(); 
Full Snippet Info
5
CodeRank
This code example shows how to use the following methods: getVideoHeight, getVideoWidth
300:	mVideoWidth = mp.getVideoWidth(); 
301:	mVideoHeight = mp.getVideoHeight(); 
Full Snippet Info
4
CodeRank
This code example shows how to use the following methods: getVideoHeight, getVideoWidth
287:	mVideoWidth = mp.getVideoWidth(); 
288:	mVideoHeight = mp.getVideoHeight(); 
Full Snippet Info
4
CodeRank
This code example shows how to use the following methods: getVideoHeight, getVideoWidth
264:	mVideoWidth = mp.getVideoWidth(); 
265:	mVideoHeight = mp.getVideoHeight(); 
Full Snippet Info
4
CodeRank
This code example shows how to use the following methods: getVideoHeight, getVideoWidth
258:	mVideoWidth = mp.getVideoWidth(); 
259:	mVideoHeight = mp.getVideoHeight(); 
Full Snippet Info
4
CodeRank
This code example shows how to use the following methods: getVideoWidth
87:	return mMediaPlayer.getVideoWidth(); 
Full Snippet Info
5
CodeRank
This code example shows how to use the following methods: getVideoWidth
244:	mp_.getVideoWidth(); 
Full Snippet Info
4
CodeRank
This code example shows how to use the following methods: getVideoWidth
103:	return player.getVideoWidth(); 
Full Snippet Info
4
CodeRank
Related MediaPlayer getVideoWidth Questions & Answers:
MediaPlayer class can be used to control playback of audio/video files and streams. An example on how to use the methods in this class can be found in VideoView.

Topics covered here are: State Diagram Valid and Invalid States Permissions Register informational and error callbacks Developer Guides For more information about how to use MediaPlayer, read the Media Playback developer guide. State Diagram Playback control of audio/video files and streams is managed as a state machine. The following diagram shows the life cycle and the states of a MediaPlayer object driven by the supported playback control operations. The ovals represent the states a MediaPlayer object may reside in. The arcs represent the playback control operations that drive the object state transition. There are two types of arcs. The arcs with a single arrow head represent synchronous method calls, while those with a double arrow head represent asynchronous method calls.From this state diagram, one can...
getVideoWidth Method Overview
Returns the width of the video.
See Also
  • isLooping
    Checks whether the MediaPlayer is looping or non-looping.
  • isPlaying
    Checks whether the MediaPlayer is playing.
  • prepare
    Prepares the player for playback, synchronously.
  • prepareAsync
    Prepares the player for playback, asynchronously.
  • release
    Releases resources associated with this MediaPlayer object.
  • reset
    Resets the MediaPlayer to its uninitialized state.
  • seekTo
    Seeks to specified time position.
  • setDataSource
    Sets the data source (file-path or http/rtsp URL) to use.
  • setDisplay
    Sets the SurfaceHolder to use for displaying the video portion of the media.
  • setLooping
    Sets the player to be looping or non-looping.
  • setOnCompletionListener
    Register a callback to be invoked when the end of a media source has been reached during playback.
  • setOnErrorListener
    Register a callback to be invoked when an error has happened during an asynchronous operation.
  • setOnInfoListener
    Register a callback to be invoked when an info/warning is available.
  • setScreenOnWhilePlaying
    Control whether we should use the attached SurfaceHolder to keep the screen on while video playback is occurring.
  • setWakeMode
    Set the low-level power management behavior for this MediaPlayer.
  • start
    Starts or resumes playback.
  • stop
    Stops playback after playback has been stopped or paused.