请看下面的代码
private class IntroVideoHandler implements OnClickListener
{
@Override
public void onClick(View arg0) {
// TODO Auto-generated method stub
MediaPlayer mp = new MediaPlayer();
try {
mp.setDataSource("http://www.youtube.com/watch?v=Cb7QJwQ58T0");
mp.prepareAsync();
mp.start();
} catch (Exception e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
}
在这里,我无法在模拟器或手机中播放 youtube 视频。我收到以下错误
08-22 14:34:47.176: E/MediaPlayer(471): start called in state 4
08-22 14:34:47.176: E/MediaPlayer(471): error (-38, 0)
08-22 14:34:47.306: E/MediaPlayer(471): Error (-38,0)
08-22 14:34:56.426: E/MediaPlayer(471): error (1, -2147483648)
08-22 14:34:56.426: E/MediaPlayer(471): Error (1,-2147483648)
为什么是这样?