VodPlayer class

Properties

hashCode int
The hash code for this object.
no setterinherited
playUrl String?
no setter
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

dispose() Future<void>
getAspectRatio() Future<double>
获取宽高比
getDuration() Future<Duration>
获取总长度
getHeight() Future<int>
视频高度
getPosition() Future<Duration>
获取当前播放位置
getVolume() Future<double>
获取音量
getWidth() Future<int>
视频宽度
isLoop() Future<bool>
是否循环播放
isPlaying() Future<bool>
是否正在播放
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
pausePlay() Future<void>
暂停播放,停止获取流数据,保留最后一帧画面
resumePlay() Future<void>
恢复播放,重新获取流数据
seekTo(Duration duration) Future<void>
跳转到视频流指定时间点,单位秒
setAutoPlay(bool autoPlay) Future<void>
是否自动播放
setConfig(VodPlayConfig config) Future<void>
配置播放器
setLoop(bool loop) Future<void>
设置是否循环
setMirror(bool value) Future<void>
设置镜像
setMute(bool mute) Future<void>
是否静音
setOnEventListener({VoidCallback? onWarningVideoDecodeFail, VoidCallback? onWarningAudioDecodeFail, VoidCallback? onWarningReconnect, VoidCallback? onWarningRecvDataLag, VoidCallback? onWarningVideoPlayLag, VoidCallback? onWarningHwAccelerationFail, VoidCallback? onWarningVideoDiscontinuity, VoidCallback? onWarningDNSFail, VoidCallback? onWarningServerConnFail, VoidCallback? onWarningShakeFail, VoidCallback? onEventRcvFirstIFrame, VoidCallback? onEventPlayBegin, VoidCallback? onEventPlayEnd, VoidCallback? onEventConnectSucc, ValueChanged<PlayProgress>? onEventPlayProgress, VoidCallback? onEventPlayLoading, VoidCallback? onEventPlayLoadingEnd, VoidCallback? onEventPlayPrepared}) Future<void>
事件处理
setPlayerView(CloudVideoController playerView) Future<void>
设置播放界面
setRenderMode(RenderMode renderMode) Future<void>
画面调整
setSpeed(double speed) Future<void>
设置速度
setStartTime(Duration duration) Future<void>
设置开始时间
setVolume(double volume) Future<void>
设置音量
startPlay(String playUrl) Future<void>
播放 HTTP URL 形式地址
stopPlay() Future<void>
停止播放
takeSnapshot() Future<Uint8List>
截图
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited

Static Methods

create() Future<VodPlayer>
创建一个播放器
setCacheFolderPath(String path) Future<void>
设置播放引擎的cache目录。设置后,离线下载,预下载,播放器等会优先从此目录读取和存储
setLogLevel(LogLevel level) Future<void>
日志级别
setMaxCacheSize(int size) Future<void>
设置播放引擎的最大缓存大小。设置后会根据设定值自动清理Cache目录的文件。单位MB。