shareVideo method

  1. @override
Future<void> shareVideo({
  1. required int scene,
  2. String? title,
  3. String? description,
  4. Uint8List? thumbData,
  5. String? videoUrl,
  6. String? videoLowBandUrl,
})
override

分享 - 视频

Implementation

@override
Future<void> shareVideo({
  required int scene,
  String? title,
  String? description,
  Uint8List? thumbData,
  String? videoUrl,
  String? videoLowBandUrl,
}) {
  assert(title == null || title.length <= 512);
  assert(description == null || description.length <= 1024);
  assert(thumbData == null || thumbData.lengthInBytes <= 32 * 1024);
  assert(
    (videoUrl != null && videoUrl.length <= 10 * 1024) ||
        (videoLowBandUrl != null && videoLowBandUrl.length <= 10 * 1024),
  );
  return methodChannel.invokeMethod<void>(
    'shareVideo',
    <String, dynamic>{
      'scene': scene, // Scene
      if (title != null) 'title': title,
      if (description != null) 'description': description,
      if (thumbData != null) 'thumbData': thumbData,
      if (videoUrl != null) 'videoUrl': videoUrl,
      if (videoLowBandUrl != null) 'videoLowBandUrl': videoLowBandUrl,
    },
  );
}