AliPlayerWidgetData class
播放器组件数据,用于存储播放器所需的视频数据
Player Widget data, used to store the video data required by the player
Constructors
-
AliPlayerWidgetData({SceneType sceneType = SceneType.vod, required VideoSource videoSource, AndroidViewType androidViewType = AndroidViewType.defaultValue, String coverUrl = "", String videoTitle = "", String thumbnailUrl = "", String externalSubtitleUrl = "", bool autoPlay = true, String traceId = "", int startTime = 0, int seekMode = FlutterAvpdef.ACCURATE, bool allowedScreenSleep = false, bool pauseOnBackground = true, bool isHardWareDecode = true, SubtitleConfig subtitleConfig = const SubtitleConfig(), SubtitleBuilder? subtitleBuilder, OnPlayerConfigCallback? onPlayerConfig, List<
double> playbackSpeeds = SettingConstants.speedOptions, Duration autoHideControlsDuration = SettingConstants.defaultAutoHideControlsDuration, List<ChapterInfo> chapters = const []}) - 构造函数,用于创建 AliPlayerWidgetData 实例。
Properties
- allowedScreenSleep → bool
-
是否允许屏幕休眠,默认为 false(即默认保持屏幕常亮)
final
- androidViewType → AndroidViewType
-
Android 播放器视图类型,默认为 AndroidViewType.defaultValue
final
- autoHideControlsDuration → Duration
-
播放控件自动隐藏的持续时间。
final
- autoPlay → bool
-
是否自动播放,默认为 false
final
-
chapters
→ List<
ChapterInfo> -
章节信息列表(可选)
final
- coverUrl → String
-
封面图地址,可以为空
final
- externalSubtitleUrl → String
-
外挂字幕地址,可以为空
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- isHardWareDecode → bool
-
视频解码,默认为true
final
- onPlayerConfig → OnPlayerConfigCallback?
-
播放器自定义配置回调
final
- pauseOnBackground → bool
-
应用进入后台时是否自动暂停播放。
final
-
playbackSpeeds
→ List<
double> -
自定义可选的播放速度列表。
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- sceneType → SceneType
-
播放场景类型,默认为点播 SceneType.vod
final
- seekMode → int
-
视频 seek 模式,默认为精确模式 FlutterAvpdef.ACCURATE
final
- startTime → int
-
视频开始时间,单位毫秒,必须为非负数
final
- subtitleBuilder ↔ SubtitleBuilder?
-
外挂字幕构建器
getter/setter pair
- subtitleConfig ↔ SubtitleConfig
-
字幕配置
getter/setter pair
- thumbnailUrl → String
-
缩略图地址,可以为空
final
- traceId → String
-
用于跟踪视频播放的 ID,可以为空
final
- videoSource → VideoSource
-
视频资源对象,用于定义播放源(必填,不可变)
final
- videoTitle → String
-
视频标题,可以为空
final
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
将 AliPlayerWidgetData 实例转换为字符串。
override
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited