videoPlay method
Future<bool>
videoPlay({
- required SCSourceModel source,
- required int contentLength,
- required bool isComplete,
新闻 视频播放
contentLength
视频时长(无时长可传0)
isComplete
是否播放完
Implementation
Future<bool> videoPlay(
{required SCSourceModel source,
required int contentLength,
required bool isComplete}) async {
if (!_supportPlatform || !isInitialize) return false;
final bool? state = await _channel.invokeMethod<bool>(
'videoPlay',
source.toMap().addAllT(
{'contentLength': contentLength, 'isComplete': isComplete}));
return state ?? false;
}