-
Notifications
You must be signed in to change notification settings - Fork 246
BasicInformation
dengchu817 edited this page Feb 28, 2018
·
3 revisions
/**
* @return 返回SDK版本号
*/
public String getVersion()
/**
* @return 视频宽度
*/
public int getVideoWidth()
/**
* @return 视频高度
*/
public int getVideoHeight()
需设置IMediaPlayer.OnInfoListener监听器,并监听回调事件
public IMediaPlayer.OnInfoListener mOnInfoListener = new IMediaPlayer.OnInfoListener() {
@Override
public boolean onInfo(IMediaPlayer iMediaPlayer, int info, int extra) {
switch(info) {
case IMediaPlayer.MEDIA_INFO_AUDIO_RENDERING_START:
Log.d(TAG, "First Audio!");
break;
case IMediaPlayer.MEDIA_INFO_VIDEO_RENDERING_START:
Log.d(TAG, "First Video!");
break;
}
return false;
}
};
/**
* @return 当前播放进度,单位:Ms
*/
public long getCurrentPosition()
/**
* @return 视频总时长,单位:Ms
*/
public long getDuration()