Code example for Surface

0
 
			@Override 
			public void onSurfaceTextureAvailable(SurfaceTexture surface,
					int width, int height) {
 
				Surface s = new Surface(surface);
 
				try { 
					mMediaPlayer = new MediaPlayer();
					mMediaPlayer.setDataSource(path);
					mMediaPlayer.setSurface(s);
 
					mMediaPlayer
							.setOnPreparedListener(new OnPreparedListener() {
 
								private MediaPlayer mp_;
 
								@Override 
								public void onPrepared(MediaPlayer mp) {
 
									// MediaController mediaController = new