gpt4 book ai didi

Android 媒体播放器错误 (100,0)

转载 作者:塔克拉玛干 更新时间:2023-11-02 20:22:59 25 4
gpt4 key购买 nike

我已经阅读了网上给出的所有错误代码。

错误指定:

const PVMFStatus PVMFInfoLast = 100; " Placeholder for end of range"

但是我没能处理这个错误,谢谢你的帮助。

最佳答案

为您的类(class)实现 OnErrorListener。

在类主体中写

video_view.setOnErrorListener(this);

然后用这个方法覆盖方法 OnError(MediaPlayer mp , int what , int extra)

@Override
public boolean onError(MediaPlayer mp, int what, int extra)
{
if (what == 100)
{
video_view.stopPlayback();
Intent inn = new Intent(HelloInterruptVideoStream.this,TabAct.class);
startActivity(inn);
}
else if (what == 1)
{
pb2.setVisibility(View.GONE);
Log.i("My Error ", "handled here");
video_view.stopPlayback();
Intent inn = new Intent(HelloInterruptVideoStream.this,TabAct.class);
startActivity(inn);
}
else if(what == 800)
{
video_view.stopPlayback();
Intent inn = new Intent(HelloInterruptVideoStream.this,TabAct.class);
startActivity(inn);
}
else if (what == 701)
{
video_view.stopPlayback();
Intent inn = new Intent(HelloInterruptVideoStream.this,TabAct.class);
startActivity(inn);
}
else if(what == 700)
{
video_view.stopPlayback();

Toast.makeText(getApplicationContext(), "Bad Media format ", Toast.LENGTH_SHORT).show();
Intent inn = new Intent(HelloInterruptVideoStream.this,TabAct.class);
startActivity(inn);
}

else if (what == -38)
{
video_view.stopPlayback();
Intent inn = new Intent(HelloInterruptVideoStream.this,TabAct.class);
startActivity(inn);
}
return false;
}

关于Android 媒体播放器错误 (100,0),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/11985815/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com