Video View 错误显示 "Can't Play this video" 一次又一次 Video View
Video View error displays "Can't Play this video" again and again Video View
我在 android 的视频视图中播放了一个视频。我无法停止此警报 "Can't Play this video"。我需要更改警报 "Sorry! Unable to play the video due to user has stopped his live stream"
我使用了以下代码
mStreamVideo.setOnErrorListener(new MediaPlayer.OnErrorListener() {
@Override
public boolean onError(MediaPlayer mp, int what, int extra) {
return true;
}
});
这里试试这个方法...
mStreamVideo.setOnErrorListener(new MediaPlayer.OnErrorListener() {
@Override
public boolean onError(MediaPlayer mp, int what, int extra) {
AlertDialog.Builder build = new AlertDialog.Builder(this);
build.setPositiveButton("OK", new DialogInterface.OnClickListener() {
@Override
public void onClick(DialogInterface dialog, int which) {
}
});
AlertDialog alt = build.create();
alt.setMessage("Sorry! Unable to play the video due to user has stopped his live stream");
alt.show();
return true;
}
});
我在 android 的视频视图中播放了一个视频。我无法停止此警报 "Can't Play this video"。我需要更改警报 "Sorry! Unable to play the video due to user has stopped his live stream"
我使用了以下代码
mStreamVideo.setOnErrorListener(new MediaPlayer.OnErrorListener() {
@Override
public boolean onError(MediaPlayer mp, int what, int extra) {
return true;
}
});
这里试试这个方法...
mStreamVideo.setOnErrorListener(new MediaPlayer.OnErrorListener() {
@Override
public boolean onError(MediaPlayer mp, int what, int extra) {
AlertDialog.Builder build = new AlertDialog.Builder(this);
build.setPositiveButton("OK", new DialogInterface.OnClickListener() {
@Override
public void onClick(DialogInterface dialog, int which) {
}
});
AlertDialog alt = build.create();
alt.setMessage("Sorry! Unable to play the video due to user has stopped his live stream");
alt.show();
return true;
}
});