1
我做了一個流程序來播放一個廣告+音頻+廣告。我打第一個廣告罰款,然後我切換到音頻罰款,然後我失敗在播放最後一個廣告,我得到錯誤(38,0)。我檢查了我有設置數據源,onPrepareListener,我試着我可以找到的所有東西,但仍然在android 4.1.1上得到這個錯誤 我的方法MPStarting後我得到錯誤,我甚至沒有達到最終的方法只爲最後ad.if有任何信息需要更多plz讓我知道謝謝。 這裏是相關Android播放器錯誤(-38,0)
MPStarting(Track)
{ try
{
if (_playlist !=null && _playlist.GetCurrent() != null)
{
Episode ep = (Episode) _playlist.GetCurrent();
_player = new MediaPlayer();
AdsInfo startAd = ep.getAdWithType(PlayTime.start_ad);
AdsInfo endAd = ep.getAdWithType(PlayTime.end_ad);
if(currAudio == null && startAd != null)
currAudio = startAd;
else if(currAudio == startAd)
currAudio = ep;
else if (currAudio instanceof Episode && endAd != null)
currAudio = ep.getAdWithType(PlayTime.end_ad);
}
if(_player != null)
{
_player.setDataSource(dataSource);
_player.setOnPreparedListener(this);
_player.setOnCompletionListener(this);
_player.setOnBufferingUpdateListener(this);
_player.setOnSeekCompleteListener(this);
_player.setOnErrorListener(this);
_player.prepareAsync();
}
catch (Exception e)
{
Log.i("mpcPlayer","MPStarting "+ e.getLocalizedMessage());
}
}
}
@Override
public void onCompletion(MediaPlayer mp)
{
//here i check on current playing
//i always stop player if it is playing ,reset,release and make player = null
// then i call MPStarting and i send the current audio then return
}
你是否正在播放Ad3 –
串流mp3曲目,有時我從SDcard播放SD卡 –
應該不是問題。當我們從流媒體服務器播放時,當mediaplayer超時緩衝過期時,我們通常會遇到此錯誤。如果可能的話,總是嘗試從SD卡播放。 –