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

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

MediaPlayer setOnVideoSizeChangedListener examples from Open Source projects
This code example shows how to use the following methods: prepare, setDataSource, setOnCompletionListener, setOnPreparedListener, setOnSeekCompleteListener
19:	mediaPlayer = new MediaPlayer(); 
-
21:	mediaPlayer.setDataSource(assetDescriptor.getFileDescriptor(), 
-
24:	mediaPlayer.prepare(); 
-
26:	mediaPlayer.setOnCompletionListener(this); 
27:	mediaPlayer.setOnSeekCompleteListener(this); 
28:	mediaPlayer.setOnPreparedListener(this); 
29:	mediaPlayer.setOnVideoSizeChangedListener(this); 
Full Snippet Info
6
CodeRank
This code example shows how to use the following methods: prepare, setAudioStreamType, setDataSource, setDisplay, setOnBufferingUpdateListener
65:	mMediaPlayer = new MediaPlayer(); 
66:	mMediaPlayer.setDataSource(path); 
-
68:	mMediaPlayer.setDisplay(holder); 
69:	mMediaPlayer.prepare(); 
70:	mMediaPlayer.setOnBufferingUpdateListener(this); 
71:	mMediaPlayer.setOnCompletionListener(this); 
72:	mMediaPlayer.setOnPreparedListener(this); 
73:	mMediaPlayer.setOnVideoSizeChangedListener(this); 
74:	mMediaPlayer.setAudioStreamType(AudioManager.STREAM_MUSIC); 
Full Snippet Info
7
CodeRank
This code example shows how to use the following methods: prepare, setAudioStreamType, setDataSource, setDisplay, setOnVideoSizeChangedListener
142:	mMediaPlayer = new MediaPlayer(); 
143:	mMediaPlayer.setOnVideoSizeChangedListener(mVideoSizeListener); 
144:	mMediaPlayer.setAudioStreamType(AudioManager.STREAM_RING); // Use ringer volume 
145:	mMediaPlayer.setDataSource(getActivity(), videoSource); 
146:	mMediaPlayer.setDisplay(mVideoPreview.getHolder()); 
147:	mMediaPlayer.prepare(); 
Full Snippet Info
6
CodeRank
This code example shows how to use the following methods: setOnBufferingUpdateListener, setOnCompletionListener, setOnErrorListener, setOnInfoListener, setOnPreparedListener
50:	mMediaPlayer = new MediaPlayer(); 
51:	mMediaPlayer.setOnBufferingUpdateListener(this); 
52:	mMediaPlayer.setOnCompletionListener(this); 
53:	mMediaPlayer.setOnErrorListener(this); 
54:	mMediaPlayer.setOnInfoListener(this); 
55:	mMediaPlayer.setOnPreparedListener(this); 
56:	mMediaPlayer.setOnSeekCompleteListener(this); 
57:	mMediaPlayer.setOnVideoSizeChangedListener(this); 
Full Snippet Info
6
CodeRank
This code example shows how to use the following methods: prepare, setDataSource, setOnCompletionListener, setOnPreparedListener, setOnSeekCompleteListener
19:	mediaPlayer = new MediaPlayer(); 
-
21:	mediaPlayer.setDataSource(assetDescriptor.getFileDescriptor(), assetDescriptor.getStartOffset(), assetDescriptor.getLength()); 
22:	mediaPlayer.prepare(); 
-
24:	mediaPlayer.setOnCompletionListener(this); 
25:	mediaPlayer.setOnSeekCompleteListener(this); 
26:	mediaPlayer.setOnPreparedListener(this); 
27:	mediaPlayer.setOnVideoSizeChangedListener(this); 
Full Snippet Info
6
CodeRank
This code example shows how to use the following methods: prepare, setDataSource, setOnCompletionListener, setOnPreparedListener, setOnSeekCompleteListener
20:	mediaPlayer = new MediaPlayer(); 
-
22:	mediaPlayer.setDataSource(assetDescriptor.getFileDescriptor(), 
-
25:	mediaPlayer.prepare(); 
-
27:	mediaPlayer.setOnCompletionListener(this); 
28:	mediaPlayer.setOnSeekCompleteListener(this); 
29:	mediaPlayer.setOnPreparedListener(this); 
30:	mediaPlayer.setOnVideoSizeChangedListener(this); 
Full Snippet Info
6
CodeRank
This code example shows how to use the following methods: prepare, setDataSource, setOnCompletionListener, setOnPreparedListener, setOnSeekCompleteListener
19:	mediaPlayer = new MediaPlayer(); 
-
21:	mediaPlayer.setDataSource(assetDescriptor.getFileDescriptor(), 
-
24:	mediaPlayer.prepare(); 
-
26:	mediaPlayer.setOnCompletionListener(this); 
27:	mediaPlayer.setOnSeekCompleteListener(this); 
28:	mediaPlayer.setOnPreparedListener(this); 
29:	mediaPlayer.setOnVideoSizeChangedListener(this); 
Full Snippet Info
6
CodeRank
This code example shows how to use the following methods: prepare, setAudioStreamType, setDataSource, setDisplay, setOnBufferingUpdateListener
58:	mMediaPlayer = new MediaPlayer(); 
-
61:	mMediaPlayer.setDataSource(path); 
-
68:	mMediaPlayer.setDisplay(holder); 
69:	mMediaPlayer.prepare(); 
70:	mMediaPlayer.setOnBufferingUpdateListener(this); 
71:	mMediaPlayer.setOnCompletionListener(this); 
72:	mMediaPlayer.setOnPreparedListener(this); 
73:	mMediaPlayer.setOnVideoSizeChangedListener(this); 
74:	mMediaPlayer.setAudioStreamType(AudioManager.STREAM_MUSIC); 
Full Snippet Info
6
CodeRank
This code example shows how to use the following methods: prepare, setDataSource, setOnCompletionListener, setOnPreparedListener, setOnSeekCompleteListener
20:	mediaPlayer = new MediaPlayer(); 
-
22:	mediaPlayer.setDataSource(assetDescriptor.getFileDescriptor(), 
-
25:	mediaPlayer.prepare(); 
-
27:	mediaPlayer.setOnCompletionListener(this); 
28:	mediaPlayer.setOnSeekCompleteListener(this); 
29:	mediaPlayer.setOnPreparedListener(this); 
30:	mediaPlayer.setOnVideoSizeChangedListener(this); 
Full Snippet Info
6
CodeRank
This code example shows how to use the following methods: prepare, setDataSource, setOnCompletionListener, setOnPreparedListener, setOnSeekCompleteListener
19:	mediaPlayer = new MediaPlayer(); 
-
21:	mediaPlayer.setDataSource(assetDescriptor.getFileDescriptor(), 
-
24:	mediaPlayer.prepare(); 
-
26:	mediaPlayer.setOnCompletionListener(this); 
27:	mediaPlayer.setOnSeekCompleteListener(this); 
28:	mediaPlayer.setOnPreparedListener(this); 
29:	mediaPlayer.setOnVideoSizeChangedListener(this); 
Full Snippet Info
6
CodeRank
This code example shows how to use the following methods: prepare, setDataSource, setOnCompletionListener, setOnPreparedListener, setOnSeekCompleteListener
19:	mediaPlayer = new MediaPlayer(); 
-
21:	mediaPlayer.setDataSource(assetDescriptor.getFileDescriptor(), 
-
24:	mediaPlayer.prepare(); 
-
26:	mediaPlayer.setOnCompletionListener(this); 
27:	mediaPlayer.setOnSeekCompleteListener(this); 
28:	mediaPlayer.setOnPreparedListener(this); 
29:	mediaPlayer.setOnVideoSizeChangedListener(this); 
Full Snippet Info
6
CodeRank
This code example shows how to use the following methods: prepare, setDataSource, setOnCompletionListener, setOnPreparedListener, setOnSeekCompleteListener
19:	mediaPlayer = new MediaPlayer(); 
-
21:	mediaPlayer.setDataSource(assetDescriptor.getFileDescriptor(), 
-
24:	mediaPlayer.prepare(); 
-
26:	mediaPlayer.setOnCompletionListener(this); 
27:	mediaPlayer.setOnSeekCompleteListener(this); 
28:	mediaPlayer.setOnPreparedListener(this); 
29:	mediaPlayer.setOnVideoSizeChangedListener(this); 
Full Snippet Info
6
CodeRank
This code example shows how to use the following methods: prepare, setAudioStreamType, setDataSource, setDisplay, setOnBufferingUpdateListener
53:	mMediaPlayer = new MediaPlayer(); 
54:	mMediaPlayer.setDataSource(path); 
55:	mMediaPlayer.setDisplay(holder); 
56:	mMediaPlayer.prepare(); 
57:	mMediaPlayer.setOnBufferingUpdateListener(this); 
58:	mMediaPlayer.setOnCompletionListener(this); 
59:	mMediaPlayer.setOnPreparedListener(this); 
60:	mMediaPlayer.setOnVideoSizeChangedListener(this); 
61:	mMediaPlayer.setAudioStreamType(AudioManager.STREAM_MUSIC); 
Full Snippet Info
5
CodeRank
This code example shows how to use the following methods: prepare, setDataSource, setOnCompletionListener, setOnPreparedListener, setOnSeekCompleteListener
20:	mediaPlayer = new MediaPlayer(); 
-
22:	mediaPlayer.setDataSource(assetDescriptor.getFileDescriptor(), 
-
25:	mediaPlayer.prepare(); 
-
27:	mediaPlayer.setOnCompletionListener(this); 
28:	mediaPlayer.setOnSeekCompleteListener(this); 
29:	mediaPlayer.setOnPreparedListener(this); 
30:	mediaPlayer.setOnVideoSizeChangedListener(this); 
Full Snippet Info
6
CodeRank
This code example shows how to use the following methods: prepare, setDataSource, setOnCompletionListener, setOnPreparedListener, setOnSeekCompleteListener
19:	mediaPlayer = new MediaPlayer(); 
-
21:	mediaPlayer.setDataSource(assetDescriptor.getFileDescriptor(), 
-
24:	mediaPlayer.prepare(); 
-
26:	mediaPlayer.setOnCompletionListener(this); 
27:	mediaPlayer.setOnSeekCompleteListener(this); 
28:	mediaPlayer.setOnPreparedListener(this); 
29:	mediaPlayer.setOnVideoSizeChangedListener(this); 
Full Snippet Info
6
CodeRank
This code example shows how to use the following methods: prepare, setAudioStreamType, setDataSource, setDisplay, setOnBufferingUpdateListener
129:	mMediaPlayer = new MediaPlayer(); 
130:	mMediaPlayer.setDataSource(path); 
131:	mMediaPlayer.setDisplay(holder); 
132:	mMediaPlayer.prepare(); 
133:	mMediaPlayer.setOnBufferingUpdateListener(this); 
134:	mMediaPlayer.setOnCompletionListener(this); 
135:	mMediaPlayer.setOnPreparedListener(this); 
136:	mMediaPlayer.setOnVideoSizeChangedListener(this); 
137:	mMediaPlayer.setAudioStreamType(AudioManager.STREAM_MUSIC); 
Full Snippet Info
5
CodeRank
This code example shows how to use the following methods: setOnVideoSizeChangedListener
203:	player.setOnVideoSizeChangedListener(listener); 
Full Snippet Info
5
CodeRank
This code example shows how to use the following methods: getDuration, prepare, setAudioStreamType, setDataSource, setDisplay
154:	mMediaPlayer = new MediaPlayer(); 
155:	mMediaPlayer.setDataSource(path); 
156:	mMediaPlayer.setDisplay(holder); 
157:	mMediaPlayer.prepare(); 
158:	mMediaPlayer.setOnBufferingUpdateListener(this); 
159:	mMediaPlayer.setOnCompletionListener(this); 
160:	mMediaPlayer.setOnPreparedListener(this); 
161:	mMediaPlayer.setOnVideoSizeChangedListener(this); 
162:	mMediaPlayer.setAudioStreamType(AudioManager.STREAM_MUSIC); 
163:	mSeekBar.setMax(mMediaPlayer.getDuration()); 
Full Snippet Info
5
CodeRank
This code example shows how to use the following methods: prepare, setAudioStreamType, setDataSource, setDisplay, setOnBufferingUpdateListener
56:	mp = new MediaPlayer(); 
-
58:	mp.setDataSource(vedioPath); 
-
60:	mp.setDisplay(sfHolder); 
61:	mp.setAudioStreamType(AudioManager.STREAM_MUSIC); 
-
65:	mp.prepare(); 
66:	mp.setOnBufferingUpdateListener(mpBufUpdListener); 
67:	mp.setOnCompletionListener(mpCompletListener); 
68:	mp.setOnPreparedListener(mpPrepListener); 
69:	mp.setOnVideoSizeChangedListener(mpVidSizeChgListener); 
70:	mp.start(); 
Full Snippet Info
5
CodeRank
This code example shows how to use the following methods: prepareAsync, setAudioStreamType, setDataSource, setDisplay, setOnBufferingUpdateListener
247:	mMediaPlayer = new MediaPlayer(); 
248:	mMediaPlayer.setOnPreparedListener(mPreparedListener); 
249:	mMediaPlayer.setOnVideoSizeChangedListener(mSizeChangedListener); 
-
253:	mMediaPlayer.setOnCompletionListener(mCompletionListener); 
254:	mMediaPlayer.setOnErrorListener(mErrorListener); 
255:	mMediaPlayer.setOnBufferingUpdateListener(mBufferingUpdateListener); 
-
257:	mMediaPlayer.setDataSource(mContext, mUri); 
258:	mMediaPlayer.setDisplay(mSurfaceHolder); 
259:	mMediaPlayer.setAudioStreamType(AudioManager.STREAM_MUSIC); 
260:	mMediaPlayer.setScreenOnWhilePlaying(true); 
261:	mMediaPlayer.prepareAsync(); 
Full Snippet Info
3
CodeRank
This code example shows how to use the following methods: prepareAsync, setAudioStreamType, setDataSource, setDisplay, setOnBufferingUpdateListener
218:	mMediaPlayer = new MediaPlayer(); 
219:	mMediaPlayer.setOnPreparedListener(mPreparedListener); 
220:	mMediaPlayer.setOnVideoSizeChangedListener(mSizeChangedListener); 
-
224:	mMediaPlayer.setOnCompletionListener(mCompletionListener); 
225:	mMediaPlayer.setOnErrorListener(mErrorListener); 
226:	mMediaPlayer.setOnBufferingUpdateListener(mBufferingUpdateListener); 
-
228:	mMediaPlayer.setDataSource(mContext, mUri); 
229:	mMediaPlayer.setDisplay(mSurfaceHolder); 
230:	mMediaPlayer.setAudioStreamType(AudioManager.STREAM_MUSIC); 
231:	mMediaPlayer.setScreenOnWhilePlaying(true); 
232:	mMediaPlayer.prepareAsync(); 
Full Snippet Info
3
CodeRank
This code example shows how to use the following methods: prepareAsync, setAudioStreamType, setDataSource, setDisplay, setOnBufferingUpdateListener
218:	mMediaPlayer = new MediaPlayer(); 
219:	mMediaPlayer.setOnPreparedListener(mPreparedListener); 
220:	mMediaPlayer.setOnVideoSizeChangedListener(mSizeChangedListener); 
-
224:	mMediaPlayer.setOnCompletionListener(mCompletionListener); 
225:	mMediaPlayer.setOnErrorListener(mErrorListener); 
226:	mMediaPlayer.setOnBufferingUpdateListener(mBufferingUpdateListener); 
-
228:	mMediaPlayer.setDataSource(mContext, mUri); 
229:	mMediaPlayer.setDisplay(mSurfaceHolder); 
230:	mMediaPlayer.setAudioStreamType(AudioManager.STREAM_MUSIC); 
231:	mMediaPlayer.setScreenOnWhilePlaying(true); 
232:	mMediaPlayer.prepareAsync(); 
Full Snippet Info
3
CodeRank
This code example shows how to use the following methods: prepareAsync, setAudioStreamType, setDataSource, setDisplay, setOnBufferingUpdateListener
218:	mMediaPlayer = new MediaPlayer(); 
219:	mMediaPlayer.setOnPreparedListener(mPreparedListener); 
220:	mMediaPlayer.setOnVideoSizeChangedListener(mSizeChangedListener); 
-
224:	mMediaPlayer.setOnCompletionListener(mCompletionListener); 
225:	mMediaPlayer.setOnErrorListener(mErrorListener); 
226:	mMediaPlayer.setOnBufferingUpdateListener(mBufferingUpdateListener); 
-
228:	mMediaPlayer.setDataSource(mContext, mUri); 
229:	mMediaPlayer.setDisplay(mSurfaceHolder); 
230:	mMediaPlayer.setAudioStreamType(AudioManager.STREAM_MUSIC); 
231:	mMediaPlayer.setScreenOnWhilePlaying(true); 
232:	mMediaPlayer.prepareAsync(); 
Full Snippet Info
3
CodeRank
This code example shows how to use the following methods: getDuration, prepare, release, setAudioStreamType, setDataSource
257:	mp = new MediaPlayer(); 
258:	mp.setAudioStreamType(AudioManager.STREAM_MUSIC); 
-
260:	mp.setOnErrorListener(this); 
-
262:	mp.setDisplay(mHolder); 
-
265:	mp.setDataSource(path); 
-
271:	mp.prepare(); 
272:	Log.v(TAG, "Duration:  ===>" + mp.getDuration()); 
273:	mp.setOnBufferingUpdateListener(this); 
274:	mp.setOnCompletionListener(this); 
275:	mp.setOnVideoSizeChangedListener(this); 
276:	mp.setOnPreparedListener(this); 
-
289:	mp.stop(); 
290:	mp.release(); 
Full Snippet Info
3
CodeRank
Related MediaPlayer setOnVideoSizeChangedListener Questions & Answers:
setOnVideoSizeChangedListener Method Overview
Register a callback to be invoked when the video size is known or updated.
See Also