setDataSource method

Future<void> setDataSource(
  1. String timeLineUrl,
  2. String url, {
  3. String? coverPath,
  4. String? format,
  5. String? title,
})

直播时移,设置直播时移地址

Implementation

Future<void> setDataSource(String timeLineUrl, String url,
    {String? coverPath, String? format, String? title}) async {
  Map<String, dynamic> dataSourceMap = {
    'timeLineUrl': timeLineUrl,
    'url': url,
    'coverPath': coverPath,
    'format': format,
    'title': title
  };
  return FlutterAliPlayerFactory.methodChannel
      .invokeMethod('setDataSource', wrapWithPlayerId(arg: dataSourceMap));
}