//The error code is the following sites related documents. //http://developer.android.com/reference/android/media/MediaPlayer.OnErrorListener.html void OnError(MEDIAPLAYER_ERROR iCode, MEDIAPLAYER_ERROR iCodeExtra) { string strError = ""; eror = true; switch (iCode) { case MEDIAPLAYER_ERROR.MEDIA_ERROR_NOT_VALID_FOR_PROGRESSIVE_PLAYBACK: strError = "MEDIA_ERROR_NOT_VALID_FOR_PROGRESSIVE_PLAYBACK"; break; case MEDIAPLAYER_ERROR.MEDIA_ERROR_SERVER_DIED: strError = "MEDIA_ERROR_SERVER_DIED"; break; case MEDIAPLAYER_ERROR.MEDIA_ERROR_UNKNOWN: strError = "MEDIA_ERROR_UNKNOWN"; break; default: strError = "Unknown error " + iCode; break; } strError += " "; switch (iCodeExtra) { case MEDIAPLAYER_ERROR.MEDIA_ERROR_IO: strError += "MEDIA_ERROR_IO"; break; case MEDIAPLAYER_ERROR.MEDIA_ERROR_MALFORMED: strError += "MEDIA_ERROR_MALFORMED"; break; case MEDIAPLAYER_ERROR.MEDIA_ERROR_TIMED_OUT: strError += "MEDIA_ERROR_TIMED_OUT"; break; case MEDIAPLAYER_ERROR.MEDIA_ERROR_UNSUPPORTED: strError += "MEDIA_ERROR_UNSUPPORTED"; break; default: strError = "Unknown error " + iCode; break; } Debug.LogError(strError); if (OnVideoError != null) { OnVideoError(iCode, iCodeExtra); } }
//The error code is the following sites related documents. //http://developer.android.com/reference/android/media/MediaPlayer.OnErrorListener.html void OnError( MEDIAPLAYER_ERROR iCode , MEDIAPLAYER_ERROR iCodeExtra) { string strError = ""; switch (iCode) { case MEDIAPLAYER_ERROR.MEDIA_ERROR_NOT_VALID_FOR_PROGRESSIVE_PLAYBACK: strError = "MEDIA_ERROR_NOT_VALID_FOR_PROGRESSIVE_PLAYBACK"; break; case MEDIAPLAYER_ERROR.MEDIA_ERROR_SERVER_DIED: strError = "MEDIA_ERROR_SERVER_DIED"; break; case MEDIAPLAYER_ERROR.MEDIA_ERROR_UNKNOWN: strError = "MEDIA_ERROR_UNKNOWN"; break; default: strError = "Unknown error " + iCode; break; } strError += " "; switch (iCodeExtra) { case MEDIAPLAYER_ERROR.MEDIA_ERROR_IO: strError += "MEDIA_ERROR_IO"; break; case MEDIAPLAYER_ERROR.MEDIA_ERROR_MALFORMED: strError += "MEDIA_ERROR_MALFORMED"; break; case MEDIAPLAYER_ERROR.MEDIA_ERROR_TIMED_OUT: strError += "MEDIA_ERROR_TIMED_OUT"; break; case MEDIAPLAYER_ERROR.MEDIA_ERROR_UNSUPPORTED: strError += "MEDIA_ERROR_UNSUPPORTED"; break; default: strError = "Unknown error " + iCode; break; } Debug.LogError(strError); }