FlutterAliLiveShiftPlayer class

Inheritance

Properties

eventChannel EventChannel
getter/setter pairinherited
hashCode int
The hash code for this object.
no setterinherited
onCompletion OnCompletion?
getter/setter pairinherited
onError OnError?
getter/setter pairinherited
onEventReportParams OnEventReportParams?
getter/setter pairinherited
onInfo OnInfo?
getter/setter pairinherited
onLoadingBegin OnLoadingBegin?
getter/setter pairinherited
onLoadingEnd OnLoadingEnd?
getter/setter pairinherited
onLoadingProgress OnLoadingProgress?
getter/setter pairinherited
onPipStatusChanged OnPipStatusChanged?
getter/setter pairinherited
onPrepared OnPrepared?
getter/setter pairinherited
onRenderingStart OnRenderingStart?
getter/setter pairinherited
onSeekComplete OnSeekComplete?
getter/setter pairinherited
onSeekLiveCompletion OnSeekLiveCompletion?
getter/setter pairinherited
onSeiData OnSeiData?
getter/setter pairinherited
onSnapShot OnSnapShot?
getter/setter pairinherited
onStateChanged OnStateChanged?
getter/setter pairinherited
onSubtitleExtAdded OnSubtitleExtAdded?
getter/setter pairinherited
onSubtitleHeader OnSubtitleHeader?
getter/setter pairinherited
onSubtitleHide OnSubtitleHide?
getter/setter pairinherited
onSubtitleShow OnSubtitleShow?
getter/setter pairinherited
onThumbnailGetFail OnThumbnailGetFail?
getter/setter pairinherited
onThumbnailGetSuccess OnThumbnailGetSuccess?
getter/setter pairinherited
onThumbnailPreparedFail OnThumbnailPreparedFail?
getter/setter pairinherited
onThumbnailPreparedSuccess OnThumbnailPreparedSuccess?
getter/setter pairinherited
onTimeShiftUpdater OnTimeShiftUpdater?
getter/setter pairinherited
onTrackChanged OnTrackChanged?
getter/setter pairinherited
onTrackReady OnTrackReady?
getter/setter pairinherited
onVideoRendered OnVideoRendered?
getter/setter pairinherited
onVideoSizeChanged OnVideoSizeChanged?
getter/setter pairinherited
onWillStartPip OnWillStartPip?
getter/setter pairinherited
onWillStopPip OnWillStopPip?
getter/setter pairinherited
playerId String
getter/setter pairoverride
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

addExtSubtitle(String url) Future<void>
添加外挂字幕
inherited
clearScreen() Future<void>
清空画面
inherited
clearScreenSync() Future<void>
清空同步画面
inherited
create() Future<void>
创建直播时移播放器
override
createThumbnailHelper(String thumbnail) Future
设置缩略图URL
inherited
destroy() Future<void>
销毁播放器
inherited
enableDowngrade(String source, AVPConfig config) Future<void>
播放器降级设置 source 降级url config 降级配置
inherited
enableHardwareDecoder() Future
当前是否开启硬件解码
inherited
getAlphaRenderMode() Future
获取Alpha渲染模式
inherited
getBufferedPosition() Future
获取已经缓存的位置
inherited
getCacheConfig() Future
inherited
getCacheFilePath(String url) Future
根据url获取缓存的文件名
inherited
getCacheFilePathWithVid(String vid, String format, String definition) Future
根据vid获取缓存的文件名
inherited
getCacheFilePathWithVidAtPreviewTime(String vid, String format, String definition, String previewTime) Future
根据vid+试看时长获取缓存的文件名
inherited
getConfig() Future
获取播放器设置
inherited
getCurrentDownloadSpeed() Future
获取当前下载速度
inherited
getCurrentLiveTime() Future
直播时移,获取直播时间
getCurrentPosition() Future
获取当前播放位置
inherited
getCurrentTime() Future
直播时移,获取当前播放时间
getCurrentTrack(int trackIdx) Future
获取当前播放track
inherited
getCurrentUtcTime() Future
获取当前播放位置的utc时间
inherited
getDuration() Future
获取视频的长度
inherited
getLocalCacheLoadedSize() Future
获取当前播放命中的缓存文件大小
inherited
getMediaInfo() Future
获取媒体信息,包括track信息
inherited
getMirrorMode() Future
获取渲染镜像模式
inherited
getOption(AVPOption key) Future
获取播放器的参数
inherited
getPlayConfig() Future<AVPConfig>
获取播放器设置 新版本增加,逐步替代getConfig
inherited
getPlayerName() Future
获取播放时使用的播放器名字
inherited
getPropertyString(AVPPropertyKey key) Future
根据key获取相应的信息
inherited
getRate() Future
获取播放速率
inherited
getRotateMode() Future
获取渲染旋转模式
inherited
getScalingMode() Future
获取渲染填充模式
inherited
getSubMediaInfo() Future
获取媒体子流信息,包括track信息
inherited
getUserData() Future
设置UserData,用于一些全局API的透传,以区分player实例。
inherited
getVideoHeight() Future
获取视频的高度
inherited
getVideoRotation() Future
获取视频的旋转角度
inherited
getVideoWidth() Future
获取视频的宽度
inherited
getVolume() Future
获取播放器的音量(非系统音量)
inherited
isAutoPlay() Future
当前是否自动播放
inherited
isLoop() Future
当前是否循环播放
inherited
isMuted() Future
当前是否静音
inherited
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
pause() Future<void>
暂停播放
inherited
play() Future<void>
开始播放
inherited
prepare() Future<void>
播放准备
inherited
register() → void
inherited
releaseAsync() Future<void>
异步释放播放器
inherited
reload() Future<void>
重新加载 比如网络超时时,可以重新加载。
inherited
requestBitmapAtPosition(int position) Future
获取指定位置的缩略图
inherited
seekTo(int position, int seekMode) Future<void>
跳转到指定的播放位置
inherited
seekToLiveTime(int liveTime) Future<void>
直播时移,跳转到指定时移位置
selectExtSubtitle(int trackIndex, bool enable) Future<void>
选择外挂字幕
inherited
selectTrack(int trackIdx, {int accurate = -1}) Future<void>
根据trackIndex,切换清晰度 trackIdx 选择清晰度的index,-1代表自适应码率 accurate 0 为不精确 1 为精确 不填为忽略
inherited
sendCustomEvent(String args) Future<void>
发送用户自定义事件 通过埋点事件回调onEventReportParams
inherited
setAlphaRenderMode(int mode) Future<void>
Alpha渲染模式,支持alpha在右侧、左侧、上侧、下侧,默认值无
inherited
setAutoPlay(bool isAutoPlay) Future<void>
设置是否自动播放
inherited
setCacheConfig(Map map) Future<void>
设置缓存配置
inherited
setConfig(Map map) Future<void>
播放器设置,传递map
inherited
setConvertURLCallback(String newUrl) Future
播放前转换播放URL。 对于视频播放,请在播放前尝试转换播放URL
inherited
setDataSource(String timeLineUrl, String url, {String? coverPath, String? format, String? title}) Future<void>
直播时移,设置直播时移地址
setDefaultBandWidth(int parse) Future<void>
设置多码率时默认播放的码率 将会选择与之最接近的一路流播放
inherited
setEnableHardwareDecoder(bool isHardWare) Future<void>
设置是否开启硬件解码
inherited
setEventReportParamsDelegate(int argt) Future
设置埋点事件回调onEventReportParams代理
inherited
setFastStart(bool fastStart) Future<void>
设置视频快速启动
inherited
setFilterConfig(String configJson) Future<void>
设置滤镜配置 在prepare之前调用此方法。如果想更新,调用updateFilterConfig
inherited
setFilterInvalid(String target, String invalid) Future<void>
开启关闭滤镜
inherited
setLiveSts({String? url, String? accessKeyId, String? accessKeySecret, String? securityToken, String? region, String? domain, String? app, String? stream, EncryptionType? encryptionType, List<String>? definitionList, dynamic playerId}) Future<void>
使用LiveSts 方式播放直播流
inherited
setLoop(bool isloop) Future<void>
设置是否循环播放
inherited
setMaxAccurateSeekDelta(int delta) Future<void>
设置精准seek的最大间隔
inherited
setMirrorMode(int mode) Future<void>
设置渲染镜像模式
inherited
setMuted(bool isMuted) Future<void>
设置是否静音
inherited
setOnCompletion(OnCompletion completion) → void
播放器事件回调,播放完成事件
inherited
setOnError(OnError onError) → void
错误代理回调
inherited
setOnEventReportParams(OnEventReportParams eventReportParams) → void
埋点事件参数回调
inherited
setOnInfo(OnInfo info) → void
视频当前播放位置回调
inherited
setOnLoadingStatusListener({required OnLoadingBegin loadingBegin, required OnLoadingProgress loadingProgress, required OnLoadingEnd loadingEnd}) → void
视频缓冲相关回调 loadingBegin: 播放器事件回调,缓冲开始事件 loadingProgress: 视频缓冲进度回调 loadingEnd: 播放器事件回调,缓冲完成事件
inherited
setOnPrepared(OnPrepared prepared) → void
播放器事件回调,准备完成事件
inherited
setOnRenderingStart(OnRenderingStart renderingStart) → void
播放器事件回调,首帧显示事件
inherited
setOnSeekComplete(OnSeekComplete seekComplete) → void
inherited
setOnSeekLiveCompletion(OnSeekLiveCompletion seekLiveCompletion) → void
inherited
setOnSeiData(OnSeiData seiData) → void
SEI回调
inherited
setOnSnapShot(OnSnapShot snapShot) → void
获取截图回调
inherited
setOnStateChanged(OnStateChanged stateChanged) → void
播放器状态改变回调
inherited
setOnSubtitleExtAdded(OnSubtitleExtAdded onSubtitleExtAdded) → void
外挂字幕被添加
inherited
setOnSubtitleHeader(OnSubtitleHeader onSubtitleHeader) → void
字幕头信息回调 ass字幕,如果实现了此回调,则播放器不会渲染字幕,由调用者完成渲染,否则播放器自动完成字幕的渲染
inherited
setOnSubtitleHide(OnSubtitleHide onSubtitleHide) → void
字幕隐藏回调
inherited
setOnSubtitleShow(OnSubtitleShow onSubtitleShow) → void
字幕显示回调
inherited
setOnThumbnailGetListener({required OnThumbnailGetSuccess onThumbnailGetSuccess, required OnThumbnailGetFail onThumbnailGetFail}) → void
获取缩略图相关回调 onThumbnailGetSuccess: 获取缩略图成功回调 onThumbnailGetFail: 获取缩略图失败回调
inherited
setOnThumbnailPreparedListener({required OnThumbnailPreparedSuccess preparedSuccess, required OnThumbnailPreparedFail preparedFail}) → void
inherited
setOnTimeShiftUpdater(OnTimeShiftUpdater timeShiftUpdater) → void
inherited
setOnTrackChanged(OnTrackChanged onTrackChanged) → void
track切换完成回调
inherited
setOnTrackReady(OnTrackReady onTrackReady) → void
获取track信息回调
inherited
setOnVideoRendered(OnVideoRendered onVideoRendered) → void
播放器渲染信息回调
inherited
setOnVideoSizeChanged(OnVideoSizeChanged videoSizeChanged) → void
视频大小变化回调
inherited
setOption(int opt1, Object opt2) Future<void>
设置特定功能选项
inherited
setOutputAudioChannel(int chanel) Future<void>
设置输出声道,若输入源是双声道,则支持切换为左声道、右声道;若输入源是单声道,则设置无效。该设置会同时影响音频渲染及PCM数据回调
inherited
setPictureInPictureEnableForIOS(bool enable) Future
设置画中画功能开启/关闭 仅对iOS系统有效,在iOS 15以上系统应用 需要在onPrepared回调方法中调用
inherited
setPictureInPictureShowMode(int showMode) Future<void>
为画中画功能设置显示模式
inherited
setPipController({required OnPipStatusChanged pipStatusChanged, required OnWillStartPip willStartPip, required OnWillStopPip willStopPip}) → void
画中画播放状态 pipStatusChanged:播放器状态 willStartPip:画中画将要开始 willStopPip:画中画将要结束
inherited
setPlayConfig(AVPConfig config) Future<void>
播放器设置 新版本增加,逐步替代setConfig
inherited
setPlayerView(int viewId) Future<void>
设置播放器的视图playerView
inherited
setPreferPlayerName(String playerName) Future<void>
设置期望使用的播放器名字
inherited
setPrivateService(Int8List data) Future<void>
inherited
setRate(double mode) Future<void>
设置播放速率 0.5-2.0之间,1为正常播放
inherited
setRenderFrameCallbackConfig(bool mAudioData, bool mVideoData) Future<void>
软解码时生效,是否只返回底层音频数据地址,mAudioDataAddr默认为false, 是否只返回底层视频数据地址,默认为true
inherited
setRotateMode(int mode) Future<void>
设置渲染旋转模式
inherited
setScalingMode(int mode) Future<void>
设置渲染填充模式
inherited
setStartTime(int time, int seekMode) Future<void>
以指定位置起播,每次prepare前调用,仅生效一次。(用于代替原先的起播前seek的方案)
inherited
setStreamDelayTime(int trackIdx, int time) Future<void>
设置某路流相对于主时钟的延时时间 默认是0, 目前只支持外挂字幕
inherited
setTraceID(String traceID) Future
设置traceID,用于跟踪debug信息 通过埋点事件回调onEventReportParams
inherited
setUrl(String url) Future<void>
使用url方式来播放视频
inherited
setUserData(String userData) Future<void>
设置UserData,用于一些全局API的透传,以区分player实例。
inherited
setVidAuth({String? vid, String? region, String? playAuth, String? playConfig, List<String>? definitionList, String quality = "", bool forceQuality = false, dynamic playerId}) Future<void>
使用vid+playauth方式播放 可参考:https://help.aliyun.com/document_detail/57294.html playConfig 从generatePlayerConfig获取
inherited
setVideoBackgroundColor(dynamic color) Future<void>
设置视频的背景色
inherited
setVidMps(Map<String, dynamic> mpsInfo) Future<void>
用vid和MPS信息来播放视频 可参考:https://help.aliyun.com/document_detail/53522.html?spm=5176.doc53534.2.5.mhSfOh
inherited
setVidSts({String? vid, String? region, String? accessKeyId, String? accessKeySecret, String? securityToken, String? playConfig, List<String>? definitionList, String quality = "", bool forceQuality = false, dynamic playerId}) Future<void>
用vid和sts来播放视频 sts可参考:https://help.aliyun.com/document_detail/28756.html?spm=a2c4g.11186623.4.4.6f554c07q7B7aS playConfig 从generatePlayerConfig获取
inherited
setVolume(double volume) Future<void>
设置播放器的音量(非系统音量) 范围0.0~2.0,当音量大于1.0时,可能出现噪音,不推荐使用
inherited
snapshot(String path) Future
截图 信息可在获取截图回调中取得
inherited
stop() Future<void>
停止播放
inherited
toString() String
A string representation of this object.
inherited
updateFilterConfig(String target, Map options) Future<void>
更新滤镜配置
inherited
updateLiveStsInfo(String accId, String accKey, String token, String region) Future
更新LiveSts信息
inherited
wrapWithPlayerId({dynamic arg = ''}) → dynamic
接口部分
inherited

Operators

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