public interface AliyunTemplatePlayer
v3.27.0 新增
模板播放器
Modifier and Type | Method and Description |
---|---|
java.util.List<AliyunTemplateParam> |
getAllParams()
获取模板参数
|
long |
getCurrentPlayPosition()
获取当前播放位置(受时间特效影响的)
|
long |
getDuration()
获取播放时长
|
AliyunEditorProject |
getEditorProject()
获取工程配置
|
int |
init(SurfaceView surfaceView,
int width,
int height)
初始化
|
boolean |
isPaused()
状态获取,是否暂停
|
boolean |
isPlaying()
Gets whether playback is in progress.
|
void |
onDestroy()
生命周期销毁时调用
|
int |
pause()
暂停播放
|
int |
play()
开始播放
|
int |
seek(long time)
seek到某个时间点
|
void |
setPlayerCallBack(EditorCallBack playerCallBack)
设置播放器回调
|
int init(SurfaceView surfaceView, int width, int height)
surfaceView
- 显示viewwidth
- 显示宽度height
- 显示高度void setPlayerCallBack(EditorCallBack playerCallBack)
playerCallBack
- 播放器回调int play()
int seek(long time)
time
- 时间,单位:微秒AliyunErrorCode.ERROR_TRES_ILLEGAL_EDITOR_STATE
AliyunEditorErrorCode.SVIDEO_EDITOR_NATIVE_NOT_INITED
AliyunEditorErrorCode.SVIDEO_EDITOR_INVALID_STATE
AliyunEditorErrorCode.SVIDEO_EDITOR_SEEK_IN_OFFSET
AliyunEditorErrorCode.SVIDEO_EDITOR_SEEK_ERROR
AliyunEditorErrorCode.ALIVC_FRAMEWORK_AUDIO_PROCESS_SEEK_FAILED
int pause()
long getCurrentPlayPosition()
long getDuration()
boolean isPlaying()
boolean isPaused()
void onDestroy()
AliyunEditorProject getEditorProject()
java.util.List<AliyunTemplateParam> getAllParams()