Hello, the problem is the following: I can not display the video (the program hangs):

try { final String DSTREAM = "http://***.3gp"; mediaplayer = new MediaPlayer(); mediaplayer.setDataSource(DSTREAM); mediaplayer.setAudioStreamType(AudioManager.STREAM_MUSIC); mediaplayer.setDisplay(surfaceview.getHolder()); mediaplayer.setOnPreparedListener(this); mediaplayer.prepareAsync(); } catch (IOException e) { e.printStackTrace(); } 
  • there are a lot of questions ... for example, you are trying to play 3gp as STREAM_MUSIC playback, in fact, you just do not start (mediaplayer.start ()) And the styletrace, if you have one, is also needed ... - Vladyslav Matviienko
  • Reproduction, in fact, just do not start (mediaplayer.start ()). Sorry showed code snippet. The problem was in SurfaceHolder could not get in onCreate, received in onResume. - macced
  • issue your comment as an answer and close the question if it is resolved - Vladyslav Matviienko

0