0
請看看他下面的代碼無法播放Youttube影片
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)
這是爲什麼?請幫忙。
歡迎:) @Artificial_Intelligence –