/** Unspecified media player error. * @see android.media.MediaPlayer.OnErrorListener */ public static final int MEDIA_ERROR_UNKNOWN = 1; /** Media server died. In this case, the application must release the * MediaPlayer object and instantiate a new one. * @see android.media.MediaPlayer.OnErrorListener */ public static final int MEDIA_ERROR_SERVER_DIED = 100; /** The video is streamed and its container is not valid for progressive * playback i.e the video's index (e.g moov atom) is not at the start of the * file. * @see android.media.MediaPlayer.OnErrorListener */ public static final int MEDIA_ERROR_NOT_VALID_FOR_PROGRESSIVE_PLAYBACK = 200; /** File or network related operation errors. */ public static final int MEDIA_ERROR_IO = -1004; /** Bitstream is not conforming to the related coding standard or file spec. */ public static final int MEDIA_ERROR_MALFORMED = -1007; /** Bitstream is conforming to the related coding standard or file spec, but * the media framework does not support the feature. */ public static final int MEDIA_ERROR_UNSUPPORTED = -1010; /** Some operation takes too long to complete, usually more than 3-5 seconds. */ public static final int MEDIA_ERROR_TIMED_OUT = -110;
MediaPlayer error类型汇总
最新推荐文章于 2023-12-05 18:28:04 发布
这篇博客详细介绍了MediaPlayer在播放过程中可能遇到的各种错误代码,包括MEDIA_ERROR_UNKNOWN、MEDIA_ERROR_SERVER_DIED等,涵盖了从文件错误到不支持的媒体格式等各种情况。对于每个错误代码,都提供了相应的处理建议,如释放并重建MediaPlayer对象或检查文件格式的正确性。
5278

被折叠的 条评论
为什么被折叠?



