本文整理汇总了Java中com.pili.pldroid.player.PLMediaPlayer.ERROR_CODE_READ_FRAME_TIMEOUT属性的典型用法代码示例。如果您正苦于以下问题:Java PLMediaPlayer.ERROR_CODE_READ_FRAME_TIMEOUT属性的具体用法?Java PLMediaPlayer.ERROR_CODE_READ_FRAME_TIMEOUT怎么用?Java PLMediaPlayer.ERROR_CODE_READ_FRAME_TIMEOUT使用的例子?那么恭喜您, 这里精选的属性代码示例或许可以为您提供帮助。您也可以进一步了解该属性所在类com.pili.pldroid.player.PLMediaPlayer
的用法示例。
在下文中一共展示了PLMediaPlayer.ERROR_CODE_READ_FRAME_TIMEOUT属性的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。
示例1: getErrorMessage
private static String getErrorMessage(int code) {
String msg;
switch (code) {
case PLMediaPlayer.ERROR_CODE_INVALID_URI:
msg = "Invalid URL !";
break;
case PLMediaPlayer.ERROR_CODE_404_NOT_FOUND:
msg = "404 resource not found !";
break;
case PLMediaPlayer.ERROR_CODE_CONNECTION_REFUSED:
msg = "Connection refused !";
break;
case PLMediaPlayer.ERROR_CODE_CONNECTION_TIMEOUT:
msg = "Connection timeout !";
break;
case PLMediaPlayer.ERROR_CODE_EMPTY_PLAYLIST:
msg = "Empty playlist !";
break;
case PLMediaPlayer.ERROR_CODE_STREAM_DISCONNECTED:
msg = "Stream disconnected !";
break;
case PLMediaPlayer.ERROR_CODE_IO_ERROR:
msg = "Network IO Error !";
break;
case PLMediaPlayer.ERROR_CODE_UNAUTHORIZED:
msg = "Unauthorized Error !";
break;
case PLMediaPlayer.ERROR_CODE_PREPARE_TIMEOUT:
msg = "Prepare timeout !";
break;
case PLMediaPlayer.ERROR_CODE_READ_FRAME_TIMEOUT:
msg = "Read frame timeout !";
break;
case PLMediaPlayer.MEDIA_ERROR_UNKNOWN:
default:
msg = "unknown error !";
break;
}
return msg;
}
开发者ID:452MJ,项目名称:C9MJ,代码行数:40,代码来源:MediaException.java示例2: onError
@Override
public boolean onError(PLMediaPlayer mp, int errorCode) {
boolean isNeedReconnect = false;
Log.e(TAG, "Error happened, errorCode = " + errorCode);
switch (errorCode) {
case PLMediaPlayer.ERROR_CODE_INVALID_URI:
showToastTips("Invalid URL !");
break;
case PLMediaPlayer.ERROR_CODE_404_NOT_FOUND:
showToastTips("404 resource not found !");
break;
case PLMediaPlayer.ERROR_CODE_CONNECTION_REFUSED:
showToastTips("Connection refused !");
break;
case PLMediaPlayer.ERROR_CODE_CONNECTION_TIMEOUT:
showToastTips("Connection timeout !");
isNeedReconnect = true;
break;
case PLMediaPlayer.ERROR_CODE_EMPTY_PLAYLIST:
showToastTips("Empty playlist !");
break;
case PLMediaPlayer.ERROR_CODE_STREAM_DISCONNECTED:
showToastTips("Stream disconnected !");
isNeedReconnect = true;
break;
case PLMediaPlayer.ERROR_CODE_IO_ERROR:
showToastTips("Network IO Error !");
isNeedReconnect = true;
break;
case PLMediaPlayer.ERROR_CODE_UNAUTHORIZED:
showToastTips("Unauthorized Error !");
break;
case PLMediaPlayer.ERROR_CODE_PREPARE_TIMEOUT:
showToastTips("Prepare timeout !");
isNeedReconnect = true;
break;
case PLMediaPlayer.ERROR_CODE_READ_FRAME_TIMEOUT:
showToastTips("Read frame timeout !");
isNeedReconnect = true;
break;
case PLMediaPlayer.MEDIA_ERROR_UNKNOWN:
break;
default:
showToastTips("unknown error !");
break;
}
// Todo pls handle the error status here, reconnect or call finish()
release();
if (isNeedReconnect) {
mActivity.onReConnecting();
prepare();
} else {
mActivity.finish();
}
// Return true means the error has been handled
// If return false, then `onCompletion` will be called
return true;
}
开发者ID:weiwenqiang,项目名称:GitHub,代码行数:58,代码来源:LivePlayerHolder.java示例3: onError
@Override
public boolean onError(PLMediaPlayer plMediaPlayer, int errorCode) {
boolean isNeedReconnect = false;
Log.e(TAG, "Error happened, errorCode = " + errorCode);
switch (errorCode) {
case PLMediaPlayer.ERROR_CODE_INVALID_URI:
showToastTips("Invalid URL !");
break;
case PLMediaPlayer.ERROR_CODE_404_NOT_FOUND:
showToastTips("404 resource not found !");
break;
case PLMediaPlayer.ERROR_CODE_CONNECTION_REFUSED:
showToastTips("Connection refused !");
break;
case PLMediaPlayer.ERROR_CODE_CONNECTION_TIMEOUT:
showToastTips("Connection timeout !");
isNeedReconnect = true;
break;
case PLMediaPlayer.ERROR_CODE_EMPTY_PLAYLIST:
showToastTips("Empty playlist !");
break;
case PLMediaPlayer.ERROR_CODE_STREAM_DISCONNECTED:
showToastTips("Stream disconnected !");
isNeedReconnect = true;
break;
case PLMediaPlayer.ERROR_CODE_IO_ERROR:
showToastTips("Network IO Error !");
isNeedReconnect = true;
break;
case PLMediaPlayer.ERROR_CODE_UNAUTHORIZED:
showToastTips("Unauthorized Error !");
break;
case PLMediaPlayer.ERROR_CODE_PREPARE_TIMEOUT:
showToastTips("Prepare timeout !");
isNeedReconnect = true;
break;
case PLMediaPlayer.ERROR_CODE_READ_FRAME_TIMEOUT:
showToastTips("Read frame timeout !");
isNeedReconnect = true;
break;
case PLMediaPlayer.MEDIA_ERROR_UNKNOWN:
break;
default:
showToastTips("unknown error !");
break;
}
// Todo pls handle the error status here, reconnect or call finish()
if (isNeedReconnect) {
sendReconnectMessage();
} else {
finish();
}
// Return true means the error has been handled
// If return false, then `onCompletion` will be called
return true;
}
开发者ID:pili-engineering,项目名称:PLDroidRTCStreaming,代码行数:56,代码来源:PlaybackActivity.java本文标签属性:
示例:示例英文
代码:代码编程
java:java游戏
PLMediaPlayer:PLMediaPlayer
ERROR_CODE_READ_FRAME_TIMEOUT:ERROR_CODE_READ_FRAME_TIMEOUT