com.ksyun.media.player.IMediaPlayer |
Nested Classes | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
interface | IMediaPlayer.OnBufferingUpdateListener | ||||||||||
interface | IMediaPlayer.OnCompletionListener | 播放完成时会发出此回调 | |||||||||
interface | IMediaPlayer.OnErrorListener | 错误监听器,播放器遇到错误时会将相应的错误码通过此回调接口告知开发者 | |||||||||
interface | IMediaPlayer.OnInfoListener | 消息监听器,会将关于播放器的消息告知开发者,例如:视频渲染、音频渲染等 | |||||||||
interface | IMediaPlayer.OnLogEventListener | 日志回调监听器,播放器会将收集的日志交予开发者 | |||||||||
interface | IMediaPlayer.OnMessageListener | 金山云提供给的消息通道监听器,可设置此监听器获取主播端通过消息通道发送的信息 | |||||||||
interface | IMediaPlayer.OnPreparedListener | 与prepareAsync() 相对应,在调用prepareAsync() 之后且准备成功会发出onPrepared回调
|
|||||||||
interface | IMediaPlayer.OnSeekCompleteListener | 在seek成功后会发出此回调 | |||||||||
interface | IMediaPlayer.OnTimedTextListener | 字幕监听器 | |||||||||
interface | IMediaPlayer.OnVideoSizeChangedListener | 视频的宽高发生变化时会有相应的回调 |
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
abstract void | addTimedTextSource(String path) | ||||||||||
abstract void | deselectTrack(int track) | ||||||||||
abstract int | getAudioSessionId() | ||||||||||
abstract long | getCurrentPosition() | ||||||||||
abstract String | getDataSource() | ||||||||||
abstract long | getDuration() | ||||||||||
abstract MediaInfo | getMediaInfo() | ||||||||||
abstract ITrackInfo[] | getTrackInfo() | ||||||||||
abstract int | getVideoHeight() | ||||||||||
abstract int | getVideoSarDen() | ||||||||||
abstract int | getVideoSarNum() | ||||||||||
abstract int | getVideoWidth() | ||||||||||
abstract boolean | isLooping() | ||||||||||
abstract boolean | isPlayable() | ||||||||||
abstract boolean | isPlaying() | ||||||||||
abstract void | pause() | ||||||||||
abstract void | prepareAsync() | ||||||||||
abstract void | release() | ||||||||||
abstract void | reset() | ||||||||||
abstract void | seekTo(long msec) | ||||||||||
abstract void | selectTrack(int track) | ||||||||||
abstract void | setAudioStreamType(int streamtype) | ||||||||||
abstract void | setDataSource(Context context, Uri uri) | ||||||||||
abstract void | setDataSource(FileDescriptor fd) | ||||||||||
abstract void | setDataSource(String path) | ||||||||||
abstract void | setDataSource(Context context, Uri uri, Map<String, String> headers) | ||||||||||
abstract void | setDataSource(IMediaDataSource mediaDataSource) | ||||||||||
abstract void | setDisplay(SurfaceHolder sh) | ||||||||||
abstract void | setKeepInBackground(boolean keepInBackground) | ||||||||||
abstract void | setLogEnabled(boolean enable) | ||||||||||
abstract void | setLooping(boolean looping) | ||||||||||
abstract void | setOnBufferingUpdateListener(IMediaPlayer.OnBufferingUpdateListener listener) | ||||||||||
abstract void | setOnCompletionListener(IMediaPlayer.OnCompletionListener listener) | ||||||||||
abstract void | setOnErrorListener(IMediaPlayer.OnErrorListener listener) | ||||||||||
abstract void | setOnInfoListener(IMediaPlayer.OnInfoListener listener) | ||||||||||
abstract void | setOnMessageListener(IMediaPlayer.OnMessageListener listener) | ||||||||||
abstract void | setOnPreparedListener(IMediaPlayer.OnPreparedListener listener) | ||||||||||
abstract void | setOnSeekCompleteListener(IMediaPlayer.OnSeekCompleteListener listener) | ||||||||||
abstract void | setOnTimedTextListener(IMediaPlayer.OnTimedTextListener listener) | ||||||||||
abstract void | setOnVideoSizeChangedListener(IMediaPlayer.OnVideoSizeChangedListener listener) | ||||||||||
abstract void | setScreenOnWhilePlaying(boolean screenOn) | ||||||||||
abstract void | setSurface(Surface surface) | ||||||||||
abstract void | setVolume(float leftVolume, float rightVolume) | ||||||||||
abstract void | setWakeMode(Context context, int mode) | ||||||||||
abstract void | start() | ||||||||||
abstract void | stop() |
8次以上3xx跳转
http请求返回403
音频解码失败
http请求返回400
连接服务器失败
创建socket失败
DNS解析失败
无效的媒体数据
播放地址无效,只在多URL播放时出现
Input/Output相关错误,一般是网络超时
http请求返回4xx
http请求返回5xx
http请求返回404
http请求返回401
不支持的音频编码类型
不支持的流媒体协议
不支持的视频编码类型
视频解码失败
音频开始播放
播放器缓存结束,开始播放音视频
开始缓存数据,可认为是一次卡顿
播放器使用硬解
该多媒体文件不可快进/快退
reload成功
播放器使用软解
建议使用者调用reload接口
未定义的消息
视频开始渲染
视频方向发生变化
视频复杂,解码器效率不足
IllegalStateException |
---|
IllegalStateException |
---|
IllegalStateException |
---|
IOException | |
---|---|
IllegalArgumentException | |
IllegalStateException | |
SecurityException |
IOException | |
---|---|
IllegalArgumentException | |
IllegalStateException |
IOException | |
---|---|
IllegalArgumentException | |
IllegalStateException | |
SecurityException |
IOException | |
---|---|
IllegalArgumentException | |
IllegalStateException | |
SecurityException |
IllegalStateException |
---|
IllegalStateException |
---|