load method

  1. @override
Future<void> load(
  1. int playerId,
  2. int mediaId,
  3. String typeOfPlayer,
  4. bool? controlAutoplay,
  5. bool? scrollOnAd,
  6. String? creditsLabelColor,
  7. int? setCornerRadius,
  8. String? localization,
  9. int? doubleTapSeek,
  10. int? seekPreview,
  11. int viewId,
  12. String playerReference,
)
override

Implementation

@override
Future<void> load(
    int playerId,
    int mediaId,
    String typeOfPlayer,
    bool? controlAutoplay,
    bool? scrollOnAd,
    String? creditsLabelColor,
    int? setCornerRadius,
    String? localization,
    int? doubleTapSeek,
    int? seekPreview,
    int viewId,
    String playerReference) async {

  try {
    await methodChannel.invokeMethod('load', {
      'playerId': playerId,
      'mediaId': mediaId,
      'typeOfPlayer': typeOfPlayer,
      'controlAutoplay': controlAutoplay,
      'scrollOnAd': scrollOnAd,
      'creditsLabelColor': creditsLabelColor,
      'setCornerRadius': setCornerRadius,
      'localization': localization,
      'doubleTapSeek': doubleTapSeek,
      'seekPreview': seekPreview,
      'viewId': viewId,
      'playerReference': playerReference,
    });
  } on PlatformException catch (e) {
    debugPrint('Failed to load video: ${e.message}');
    rethrow;
  }
}