Saturday, March 8, 2014

Mediaplayer play on difficult problems, Jiqiu


My daughter has recently been doing video playback applications, there are several difficult problems have no solution, but also the god please help me find a solution.

1 Play a video, click the play button will start playing the page, and then start playing online loading, press the return will end the playback page.
But if you start playing the page when the video loading process returns exit the playback page, and then start playing the page, and then quit playing when the page is loaded, if repeated probably about five times, the player will begin playing in the background, the only sound. No image.
I quit when they are calling a mediaplayer destroy method, this problem has not been thought of reasons.

2 Play a video for some time, quit playing the video, and then start to play another video, this time of surfaceview mediaplayer will first appear about the last frame of the video before the broadcast of exit, and then began to replace the current playback video.
This is even present, about 20% probability. Have no idea why.

These two issues really bothered me for a long time, and also please the god pointing!

Thank you.<-! Main posts under Banner (D4) -><-! Posts under the main text (D5) ->
Reply:
About two clear about whether you can surfaceview screen
Reply:
cited a floor shen332401890 reply:
about two clear about whether you can surfaceview screen


Thank you, first question, how to do it. Some more serious.
Reply:
mediaplayer does not destroy method, right?
First stop, then release, try?

 
try {
audioPlayer.stop ();
} Catch (Throwable e) {
}
try {
audioPlayer.release ();
} Catch (Throwable e) {
}

Reply:
1 The first question is obviously not put mediaplay release clean, play in the activity inside the thing to do? Exit the activity destroyed?
Reply:
references, 4th Floor xiyang123_ reply:.
1 The first question is obviously not put mediaplay release clean, play in the activity inside the thing to do? Exit the activity destroyed?

Yes, with a finish ()

Then activity of onstop
ondestory all went.
Reply:
4th floor should be able to help you solve the problem
Reply:
reference to the 6th floor a394268045 reply:
4 floor should be able to help you solve the problem


Determine destroyed. . However, the situation in the network slow to ask, when is the video loads slowly,

Play the next video, full points appear on the last frame of a video.

No comments:

Post a Comment