AliPlayerWidgetData class
播放器组件数据,用于存储播放器所需的视频数据
Player Widget data, used to store the video data required by the player
Constructors
- AliPlayerWidgetData.new({SceneType sceneType = SceneType.vod, VideoSource? videoSource, @Deprecated('Use videoSource or AliPlayerWidgetData.fromUrl() instead.') String videoUrl = "", String coverUrl = "", String videoTitle = "", String thumbnailUrl = "", bool autoPlay = true, int startTime = 0, int seekMode = FlutterAvpdef.ACCURATE, bool allowedScreenSleep = false, bool isHardWareDecode = true})
- 构造函数,用于创建 AliPlayerWidgetData 实例。
- AliPlayerWidgetData.fromUrl({required String videoUrl, SceneType sceneType = SceneType.vod, String coverUrl = "", String videoTitle = "", String thumbnailUrl = "", bool autoPlay = true, int startTime = 0, int seekMode = FlutterAvpdef.ACCURATE, bool allowedScreenSleep = false, bool isHardWareDecode = true})
-
使用URL创建播放器数据的便捷构造函数
factory
Properties
- allowedScreenSleep ↔ bool
-
是否允许屏幕休眠,默认为 false
getter/setter pair
- autoPlay ↔ bool
-
是否自动播放,默认为 false
getter/setter pair
- coverUrl ↔ String
-
封面图地址,可以为空
getter/setter pair
- hashCode → int
-
The hash code for this object.
no setterinherited
- isHardWareDecode ↔ bool
-
视频解码,默认为true
getter/setter pair
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- sceneType ↔ SceneType
-
播放场景类型,默认为点播 SceneType.vod
getter/setter pair
- seekMode ↔ int
-
视频 seek 模式,默认为精确模式 FlutterAvpdef.ACCURATE
getter/setter pair
- startTime ↔ int
-
视频开始时间,单位毫秒,必须为非负数
getter/setter pair
- thumbnailUrl ↔ String
-
缩略图地址,可以为空
getter/setter pair
- videoSource ↔ VideoSource?
-
视频资源对象,用于定义播放源
getter/setter pair
- videoTitle ↔ String
-
视频标题,可以为空
getter/setter pair
- videoUrl ↔ String
-
视频URL地址
getter/setter pair
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