Re: [android-developers] MediaPlayer is Hanging in reset call

2010-12-11 Thread Julie Andrews
On Fri, Dec 10, 2010 at 9:56 PM, John jo-d...@hotmail.com wrote:

VideoPlayerView = new VideoView(this);
VideoPlayerView.setOnPreparedListener(VideoPrepared);
VideoPlayerView.setOnCompletionListener(VideoFinished);
VideoPlayerView.setOnErrorListener(VideoError);

String VideoResourcePath =
 getResources().getResourceName(R.raw.myVideo);
VideoResourcePath = VideoResourcePath.replace(':', '/');
VideoPlayerView.setVideoPath(android.resource:// +
 VideoResourcePath);

public boolean onError(MediaPlayer mp, int what, int extra)
 {
FailTimer.cancel();
finish();
return true;
}

 Hi,
  I am getting a hang in a MediaPlayer when there is an error.

  I have a separate Activity that I launch to play the MediaPlayer in
 full screen mode. The relevant code from onCreate is posted above.

  I have set a Timer to time out in 15 seconds, so that if the video
 fails to play the activity will exit. However, an error happens, so
 onError is called, and the debugger shows me that I am hung in the
 MediaPlayer.release() / MediaPlayer.reset() call.

  I'm not so interested in discovering why the error happens, as the
 phone I am testing on seems to have issues with running videos. But I
 do want to figure out why the MediaPlayer is hanging.

 Any help?

 Thanks,
 John

 --
 You received this message because you are subscribed to the Google
 Groups Android Developers group.
 To post to this group, send email to android-developers@googlegroups.com
 To unsubscribe from this group, send email to
 android-developers+unsubscr...@googlegroups.comandroid-developers%2bunsubscr...@googlegroups.com
 For more options, visit this group at
 http://groups.google.com/group/android-developers?hl=en




-- 
Julie
http://www.sirsainfo.in/ http://t
http://tradinglogically.blogspot.com http://tradinglogically.blogspot.com
http://vikitionary.blogspot.com
http://gandhi-the-man-of-millenium.blogspot.com/

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

[android-developers] MediaPlayer is Hanging in reset call

2010-12-10 Thread John
VideoPlayerView = new VideoView(this);
VideoPlayerView.setOnPreparedListener(VideoPrepared);
VideoPlayerView.setOnCompletionListener(VideoFinished);
VideoPlayerView.setOnErrorListener(VideoError);

String VideoResourcePath =
getResources().getResourceName(R.raw.myVideo);
VideoResourcePath = VideoResourcePath.replace(':', '/');
VideoPlayerView.setVideoPath(android.resource:// +
VideoResourcePath);

public boolean onError(MediaPlayer mp, int what, int extra) {
FailTimer.cancel();
finish();
return true;
}

Hi,
  I am getting a hang in a MediaPlayer when there is an error.

  I have a separate Activity that I launch to play the MediaPlayer in
full screen mode. The relevant code from onCreate is posted above.

  I have set a Timer to time out in 15 seconds, so that if the video
fails to play the activity will exit. However, an error happens, so
onError is called, and the debugger shows me that I am hung in the
MediaPlayer.release() / MediaPlayer.reset() call.

  I'm not so interested in discovering why the error happens, as the
phone I am testing on seems to have issues with running videos. But I
do want to figure out why the MediaPlayer is hanging.

Any help?

Thanks,
John

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en