My IMP(低代码音视频工厂)SDK v1.5.0
IMP SDK API Reference Manual for Android Platforms
com.aliyun.roompaas.live.exposable.LivePlayerService Interface Reference

Public Member Functions

void refreshPlay ()
 
void resumePlay ()
 
void pausePlay ()
 
void stopPlay ()
 
void setMutePlay (boolean mute)
 
void tryPlay (Callback< View > callback)
 
SurfaceView playUrl (String url)
 
String getLastTriggerPlayUrl ()
 
void setViewContentMode (@CanvasScale.Mode int mode)
 
void updatePositionTimerInternalMs (long internal)
 
void setUtcTimeListener (LivePlayerManager.UtcTimeListener utcTimeListener)
 
void seekTo (long position)
 
long getDuration ()
 
void setPlayerConfig (AliLivePlayerConfig playerConfig)
 

Detailed Description

直播播放服务

Author
puke
Version
2021/7/2

Member Function Documentation

◆ getDuration()

long com.aliyun.roompaas.live.exposable.LivePlayerService.getDuration ( )

获取总时长

◆ getLastTriggerPlayUrl()

String com.aliyun.roompaas.live.exposable.LivePlayerService.getLastTriggerPlayUrl ( )

获取最后一次尝试播放的url地址,忽略播放状态(是否成功播放未知)

Returns
最后尝试播放的url

◆ pausePlay()

void com.aliyun.roompaas.live.exposable.LivePlayerService.pausePlay ( )

暂停播放

◆ playUrl()

SurfaceView com.aliyun.roompaas.live.exposable.LivePlayerService.playUrl ( String  url)

播放特定url的视频

Returns
播放视图

◆ refreshPlay()

void com.aliyun.roompaas.live.exposable.LivePlayerService.refreshPlay ( )

重新播放

◆ resumePlay()

void com.aliyun.roompaas.live.exposable.LivePlayerService.resumePlay ( )

继续播放

◆ seekTo()

void com.aliyun.roompaas.live.exposable.LivePlayerService.seekTo ( long  position)

跳转到某个时间

Parameters
position

◆ setMutePlay()

void com.aliyun.roompaas.live.exposable.LivePlayerService.setMutePlay ( boolean  mute)

拉流端静音播放

◆ setPlayerConfig()

void com.aliyun.roompaas.live.exposable.LivePlayerService.setPlayerConfig ( AliLivePlayerConfig  playerConfig)

设置AliLivePlayerConfig 参数

Parameters
playerConfig

◆ setUtcTimeListener()

void com.aliyun.roompaas.live.exposable.LivePlayerService.setUtcTimeListener ( LivePlayerManager.UtcTimeListener  utcTimeListener)

设置utcTime回调,获取到utcTime

Parameters
utcTimeListener

◆ setViewContentMode()

void com.aliyun.roompaas.live.exposable.LivePlayerService.setViewContentMode ( @CanvasScale.Mode int  mode)

设置播放器/预览视图画面填充模式 CanvasScale.Mode

Parameters
mode想要设置的模式

◆ stopPlay()

void com.aliyun.roompaas.live.exposable.LivePlayerService.stopPlay ( )

停止播放

◆ tryPlay()

void com.aliyun.roompaas.live.exposable.LivePlayerService.tryPlay ( Callback< View >  callback)

尝试播放直播

Parameters
callback回调函数

◆ updatePositionTimerInternalMs()

void com.aliyun.roompaas.live.exposable.LivePlayerService.updatePositionTimerInternalMs ( long  internal)

recommend to invoke this API when player is paused

Parameters
internalms

The documentation for this interface was generated from the following file: