AliPlayerWidgetData.fromUrl constructor
- @Deprecated('Use videoSource instead.')
- required String videoUrl,
- SceneType sceneType = SceneType.vod,
- String coverUrl = "",
- String videoTitle = "",
- String thumbnailUrl = "",
- bool autoPlay = true,
- String traceId = "",
- int startTime = 0,
- int seekMode = FlutterAvpdef.ACCURATE,
- bool allowedScreenSleep = false,
- bool isHardWareDecode = true,
- SubtitleConfig subtitleConfig = const SubtitleConfig(),
- SubtitleBuilder? subtitleBuilder,
- SubtitlePositionConfig? subtitlePositionConfig,
使用URL创建播放器数据的便捷构造函数
Convenience constructor to create player data using a URL
This method will be removed in a future release.
Implementation
@Deprecated('Use videoSource instead.')
factory AliPlayerWidgetData.fromUrl({
required String videoUrl,
SceneType sceneType = SceneType.vod,
String coverUrl = "",
String videoTitle = "",
String thumbnailUrl = "",
bool autoPlay = true,
String traceId = "",
int startTime = 0,
int seekMode = FlutterAvpdef.ACCURATE,
bool allowedScreenSleep = false,
bool isHardWareDecode = true,
SubtitleConfig subtitleConfig = const SubtitleConfig(),
SubtitleBuilder? subtitleBuilder,
SubtitlePositionConfig? subtitlePositionConfig,
}) {
return AliPlayerWidgetData(
videoSource: VideoSourceFactory.createUrlSource(videoUrl),
sceneType: sceneType,
coverUrl: coverUrl,
videoTitle: videoTitle,
thumbnailUrl: thumbnailUrl,
autoPlay: autoPlay,
traceId: traceId,
startTime: startTime,
seekMode: seekMode,
allowedScreenSleep: allowedScreenSleep,
isHardWareDecode: isHardWareDecode,
subtitleConfig: subtitleConfig,
subtitleBuilder: subtitleBuilder,
subtitlePositionConfig: subtitlePositionConfig,
);
}