// ignore_for_file: non_constant_identifier_names, camel_case_types, missing_return, unused_import, unused_local_variable, dead_code, unnecessary_cast
//////////////////////////////////////////////////////////
// GENERATED BY FLUTTIFY. DO NOT EDIT IT.
//////////////////////////////////////////////////////////

import 'dart:typed_data';

import 'package:tencent_live_fluttify/src/ios/ios.export.g.dart';
import 'package:flutter/foundation.dart';
import 'package:flutter/services.dart';

import 'package:foundation_fluttify/foundation_fluttify.dart';

class TXLivePlayer extends NSObject  {
  //region constants
  static const String name__ = 'TXLivePlayer';

  
  //endregion

  //region creators
  static Future<TXLivePlayer> create__({ bool init = true /* ios only */ }) async {
    final refId = await MethodChannel('com.fluttify/tencent_live_fluttify', StandardMethodCodec(FluttifyMessageCodec('tencent_live_fluttify'))).invokeMethod('ObjectFactory::createTXLivePlayer', {'init': init});
    final object = TXLivePlayer()..refId = refId..tag__ = 'tencent_live_fluttify';
    return object;
  }
  
  static Future<List<TXLivePlayer>> create_batch__(int length, { bool init = true /* ios only */ }) async {
    if (false) {
      return Future.error('all args must have same length!');
    }
    final List resultBatch = await MethodChannel('com.fluttify/tencent_live_fluttify', StandardMethodCodec(FluttifyMessageCodec('tencent_live_fluttify'))).invokeMethod('ObjectFactory::create_batchTXLivePlayer', {'length': length, 'init': init});
  
    final List<TXLivePlayer> typedResult = resultBatch.map((result) => TXLivePlayer()..refId = result..tag__ = 'tencent_live_fluttify').toList();
    return typedResult;
  }
  
  //endregion

  //region getters
  Future<bool> get_enableHWAcceleration() async {
    final __result__ = await MethodChannel('com.fluttify/tencent_live_fluttify', StandardMethodCodec(FluttifyMessageCodec('tencent_live_fluttify'))).invokeMethod("TXLivePlayer::get_enableHWAcceleration", {'__this__': this});
    return __result__ == null ? null : (__result__);
  }
  
  Future<TXLivePlayConfig> get_config() async {
    final __result__ = await MethodChannel('com.fluttify/tencent_live_fluttify', StandardMethodCodec(FluttifyMessageCodec('tencent_live_fluttify'))).invokeMethod("TXLivePlayer::get_config", {'__this__': this});
    return __result__ == null ? null : (TXLivePlayConfig()..refId = __result__..tag__ = 'tencent_live_fluttify');
  }
  
  Future<bool> get_isAutoPlay() async {
    final __result__ = await MethodChannel('com.fluttify/tencent_live_fluttify', StandardMethodCodec(FluttifyMessageCodec('tencent_live_fluttify'))).invokeMethod("TXLivePlayer::get_isAutoPlay", {'__this__': this});
    return __result__ == null ? null : (__result__);
  }
  
  //endregion

  //region setters
  Future<void> set_delegate(TXLivePlayListener delegate) async {
    await MethodChannel('com.fluttify/tencent_live_fluttify', StandardMethodCodec(FluttifyMessageCodec('tencent_live_fluttify'))).invokeMethod('TXLivePlayer::set_delegate', <String, dynamic>{'__this__': this, });
  
    MethodChannel('TXLivePlayListener::Callback', StandardMethodCodec(FluttifyMessageCodec('tencent_live_fluttify')))
      .setMethodCallHandler((methodCall) async {
        try {
          final args = methodCall.arguments as Map;
          switch (methodCall.method) {
            case 'Callback::TXLivePlayListener::onPlayEvent_withParam':
              // print log
              if (fluttifyLogEnabled) {
                debugPrint('fluttify-dart-callback: onPlayEvent_withParam([\'EvtID\':${args['EvtID']}, \'param\':${args['param']}])');
              }
          
              // handle the native call
              delegate?.onPlayEvent_withParam(args['EvtID'], args['param']);
              break;
            case 'Callback::TXLivePlayListener::onNetStatus':
              // print log
              if (fluttifyLogEnabled) {
                debugPrint('fluttify-dart-callback: onNetStatus([\'param\':${args['param']}])');
              }
          
              // handle the native call
              delegate?.onNetStatus(args['param']);
              break;
            default:
              break;
          }
        } catch (e) {
          debugPrint(e);
          throw e;
        }
      });
  }
  
  Future<void> set_videoProcessDelegate(TXVideoCustomProcessDelegate videoProcessDelegate) async {
    await MethodChannel('com.fluttify/tencent_live_fluttify', StandardMethodCodec(FluttifyMessageCodec('tencent_live_fluttify'))).invokeMethod('TXLivePlayer::set_videoProcessDelegate', <String, dynamic>{'__this__': this, });
  
    MethodChannel('TXVideoCustomProcessDelegate::Callback', StandardMethodCodec(FluttifyMessageCodec('tencent_live_fluttify')))
      .setMethodCallHandler((methodCall) async {
        try {
          final args = methodCall.arguments as Map;
          switch (methodCall.method) {
            case 'Callback::TXVideoCustomProcessDelegate::onPreProcessTexture_width_height':
              // print log
              if (fluttifyLogEnabled) {
                debugPrint('fluttify-dart-callback: onPreProcessTexture_width_height([\'texture\':${args['texture']}, \'width\':${args['width']}, \'height\':${args['height']}])');
              }
          
              // handle the native call
              videoProcessDelegate?.onPreProcessTexture_width_height(args['texture'], args['width'], args['height']);
              break;
            case 'Callback::TXVideoCustomProcessDelegate::onTextureDestoryed':
              // print log
              if (fluttifyLogEnabled) {
                debugPrint('fluttify-dart-callback: onTextureDestoryed([])');
              }
          
              // handle the native call
              videoProcessDelegate?.onTextureDestoryed();
              break;
            case 'Callback::TXVideoCustomProcessDelegate::onDetectFacePoints':
              // print log
              if (fluttifyLogEnabled) {
                debugPrint('fluttify-dart-callback: onDetectFacePoints([\'points\':${args['points']}])');
              }
          
              // handle the native call
              videoProcessDelegate?.onDetectFacePoints((args['points'] as List).cast<String>().map((__it__) => TypeOpTencentLiveFluttifyIOS(__it__).as__<NSObject>()).toList());
              break;
            case 'Callback::TXVideoCustomProcessDelegate::onPlayerPixelBuffer':
              // print log
              if (fluttifyLogEnabled) {
                debugPrint('fluttify-dart-callback: onPlayerPixelBuffer([\'pixelBuffer\':${args['pixelBuffer']}])');
              }
          
              // handle the native call
              videoProcessDelegate?.onPlayerPixelBuffer(TypeOpTencentLiveFluttifyIOS((args['pixelBuffer'] as Object))?.as__<NSValue>());
              break;
            default:
              break;
          }
        } catch (e) {
          debugPrint(e);
          throw e;
        }
      });
  }
  
  Future<void> set_audioRawDataDelegate(TXAudioRawDataDelegate audioRawDataDelegate) async {
    await MethodChannel('com.fluttify/tencent_live_fluttify', StandardMethodCodec(FluttifyMessageCodec('tencent_live_fluttify'))).invokeMethod('TXLivePlayer::set_audioRawDataDelegate', <String, dynamic>{'__this__': this, });
  
    MethodChannel('TXAudioRawDataDelegate::Callback', StandardMethodCodec(FluttifyMessageCodec('tencent_live_fluttify')))
      .setMethodCallHandler((methodCall) async {
        try {
          final args = methodCall.arguments as Map;
          switch (methodCall.method) {
            case 'Callback::TXAudioRawDataDelegate::onAudioInfoChanged_channels':
              // print log
              if (fluttifyLogEnabled) {
                debugPrint('fluttify-dart-callback: onAudioInfoChanged_channels([\'sampleRate\':${args['sampleRate']}, \'channels\':${args['channels']}])');
              }
          
              // handle the native call
              audioRawDataDelegate?.onAudioInfoChanged_channels(args['sampleRate'], args['channels']);
              break;
            case 'Callback::TXAudioRawDataDelegate::onPcmDataAvailable_pts':
              // print log
              if (fluttifyLogEnabled) {
                debugPrint('fluttify-dart-callback: onPcmDataAvailable_pts([\'data\':${args['data']}, \'timestamp\':${args['timestamp']}])');
              }
          
              // handle the native call
              audioRawDataDelegate?.onPcmDataAvailable_pts(TypeOpTencentLiveFluttifyIOS((args['data'] as Object))?.as__<NSData>(), args['timestamp']);
              break;
            default:
              break;
          }
        } catch (e) {
          debugPrint(e);
          throw e;
        }
      });
  }
  
  Future<void> set_enableHWAcceleration(bool enableHWAcceleration) async {
    await MethodChannel('com.fluttify/tencent_live_fluttify', StandardMethodCodec(FluttifyMessageCodec('tencent_live_fluttify'))).invokeMethod('TXLivePlayer::set_enableHWAcceleration', <String, dynamic>{'__this__': this, "enableHWAcceleration": enableHWAcceleration});
  
  
  }
  
  Future<void> set_config(TXLivePlayConfig config) async {
    await MethodChannel('com.fluttify/tencent_live_fluttify', StandardMethodCodec(FluttifyMessageCodec('tencent_live_fluttify'))).invokeMethod('TXLivePlayer::set_config', <String, dynamic>{'__this__': this, "config": config});
  
  
  }
  
  Future<void> set_recordDelegate(TXLiveRecordListener recordDelegate) async {
    await MethodChannel('com.fluttify/tencent_live_fluttify', StandardMethodCodec(FluttifyMessageCodec('tencent_live_fluttify'))).invokeMethod('TXLivePlayer::set_recordDelegate', <String, dynamic>{'__this__': this, });
  
    MethodChannel('TXLiveRecordListener::Callback', StandardMethodCodec(FluttifyMessageCodec('tencent_live_fluttify')))
      .setMethodCallHandler((methodCall) async {
        try {
          final args = methodCall.arguments as Map;
          switch (methodCall.method) {
            case 'Callback::TXLiveRecordListener::onRecordProgress':
              // print log
              if (fluttifyLogEnabled) {
                debugPrint('fluttify-dart-callback: onRecordProgress([\'milliSecond\':${args['milliSecond']}])');
              }
          
              // handle the native call
              recordDelegate?.onRecordProgress(args['milliSecond']);
              break;
            case 'Callback::TXLiveRecordListener::onRecordComplete':
              // print log
              if (fluttifyLogEnabled) {
                debugPrint('fluttify-dart-callback: onRecordComplete([\'result\':${args['result']}])');
              }
          
              // handle the native call
              recordDelegate?.onRecordComplete(TypeOpTencentLiveFluttifyIOS((args['result'] as Object))?.as__<TXRecordResult>());
              break;
            case 'Callback::TXLiveRecordListener::onRecordEvent':
              // print log
              if (fluttifyLogEnabled) {
                debugPrint('fluttify-dart-callback: onRecordEvent([\'evt\':${args['evt']}])');
              }
          
              // handle the native call
              recordDelegate?.onRecordEvent(args['evt']);
              break;
            default:
              break;
          }
        } catch (e) {
          debugPrint(e);
          throw e;
        }
      });
  }
  
  Future<void> set_isAutoPlay(bool isAutoPlay) async {
    await MethodChannel('com.fluttify/tencent_live_fluttify', StandardMethodCodec(FluttifyMessageCodec('tencent_live_fluttify'))).invokeMethod('TXLivePlayer::set_isAutoPlay', <String, dynamic>{'__this__': this, "isAutoPlay": isAutoPlay});
  
  
  }
  
  //endregion

  //region methods
  
  Future<void> setupVideoWidget_containView_insertIndex(CGRect frame, UIView view, int idx) async {
    // print log
    if (fluttifyLogEnabled) {
      debugPrint('fluttify-dart: TXLivePlayer@$refId::setupVideoWidget([\'idx\':$idx])');
    }
  
    // invoke native method
    final __result__ = await MethodChannel('com.fluttify/tencent_live_fluttify', StandardMethodCodec(FluttifyMessageCodec('tencent_live_fluttify'))).invokeMethod('TXLivePlayer::setupVideoWidget_containView_insertIndex', {"frame": frame, "view": view, "idx": idx, "__this__": this});
  
  
    // handle native call
  
  
    // convert native result to dart side object
    if (__result__ == null) {
      return null;
    } else {
      final __return__ = __result__;
      return __return__;
    }
  }
  
  
  Future<void> removeVideoWidget() async {
    // print log
    if (fluttifyLogEnabled) {
      debugPrint('fluttify-dart: TXLivePlayer@$refId::removeVideoWidget([])');
    }
  
    // invoke native method
    final __result__ = await MethodChannel('com.fluttify/tencent_live_fluttify', StandardMethodCodec(FluttifyMessageCodec('tencent_live_fluttify'))).invokeMethod('TXLivePlayer::removeVideoWidget', {"__this__": this});
  
  
    // handle native call
  
  
    // convert native result to dart side object
    if (__result__ == null) {
      return null;
    } else {
      final __return__ = __result__;
      return __return__;
    }
  }
  
  
  Future<int> startPlay_type(String url, TX_Enum_PlayType playType) async {
    // print log
    if (fluttifyLogEnabled) {
      debugPrint('fluttify-dart: TXLivePlayer@$refId::startPlay([\'url\':$url])');
    }
  
    // invoke native method
    final __result__ = await MethodChannel('com.fluttify/tencent_live_fluttify', StandardMethodCodec(FluttifyMessageCodec('tencent_live_fluttify'))).invokeMethod('TXLivePlayer::startPlay_type', {"url": url, "playType": playType.toValue(), "__this__": this});
  
  
    // handle native call
  
  
    // convert native result to dart side object
    if (__result__ == null) {
      return null;
    } else {
      final __return__ = __result__;
      return __return__;
    }
  }
  
  
  Future<int> stopPlay() async {
    // print log
    if (fluttifyLogEnabled) {
      debugPrint('fluttify-dart: TXLivePlayer@$refId::stopPlay([])');
    }
  
    // invoke native method
    final __result__ = await MethodChannel('com.fluttify/tencent_live_fluttify', StandardMethodCodec(FluttifyMessageCodec('tencent_live_fluttify'))).invokeMethod('TXLivePlayer::stopPlay', {"__this__": this});
  
  
    // handle native call
  
  
    // convert native result to dart side object
    if (__result__ == null) {
      return null;
    } else {
      final __return__ = __result__;
      return __return__;
    }
  }
  
  
  Future<bool> isPlaying() async {
    // print log
    if (fluttifyLogEnabled) {
      debugPrint('fluttify-dart: TXLivePlayer@$refId::isPlaying([])');
    }
  
    // invoke native method
    final __result__ = await MethodChannel('com.fluttify/tencent_live_fluttify', StandardMethodCodec(FluttifyMessageCodec('tencent_live_fluttify'))).invokeMethod('TXLivePlayer::isPlaying', {"__this__": this});
  
  
    // handle native call
  
  
    // convert native result to dart side object
    if (__result__ == null) {
      return null;
    } else {
      final __return__ = __result__;
      return __return__;
    }
  }
  
  
  Future<void> pause() async {
    // print log
    if (fluttifyLogEnabled) {
      debugPrint('fluttify-dart: TXLivePlayer@$refId::pause([])');
    }
  
    // invoke native method
    final __result__ = await MethodChannel('com.fluttify/tencent_live_fluttify', StandardMethodCodec(FluttifyMessageCodec('tencent_live_fluttify'))).invokeMethod('TXLivePlayer::pause', {"__this__": this});
  
  
    // handle native call
  
  
    // convert native result to dart side object
    if (__result__ == null) {
      return null;
    } else {
      final __return__ = __result__;
      return __return__;
    }
  }
  
  
  Future<void> resume() async {
    // print log
    if (fluttifyLogEnabled) {
      debugPrint('fluttify-dart: TXLivePlayer@$refId::resume([])');
    }
  
    // invoke native method
    final __result__ = await MethodChannel('com.fluttify/tencent_live_fluttify', StandardMethodCodec(FluttifyMessageCodec('tencent_live_fluttify'))).invokeMethod('TXLivePlayer::resume', {"__this__": this});
  
  
    // handle native call
  
  
    // convert native result to dart side object
    if (__result__ == null) {
      return null;
    } else {
      final __return__ = __result__;
      return __return__;
    }
  }
  
  
  Future<void> setRenderRotation(TX_Enum_Type_HomeOrientation rotation) async {
    // print log
    if (fluttifyLogEnabled) {
      debugPrint('fluttify-dart: TXLivePlayer@$refId::setRenderRotation([])');
    }
  
    // invoke native method
    final __result__ = await MethodChannel('com.fluttify/tencent_live_fluttify', StandardMethodCodec(FluttifyMessageCodec('tencent_live_fluttify'))).invokeMethod('TXLivePlayer::setRenderRotation', {"rotation": rotation.toValue(), "__this__": this});
  
  
    // handle native call
  
  
    // convert native result to dart side object
    if (__result__ == null) {
      return null;
    } else {
      final __return__ = __result__;
      return __return__;
    }
  }
  
  
  Future<void> setRenderMode(TX_Enum_Type_RenderMode renderMode) async {
    // print log
    if (fluttifyLogEnabled) {
      debugPrint('fluttify-dart: TXLivePlayer@$refId::setRenderMode([])');
    }
  
    // invoke native method
    final __result__ = await MethodChannel('com.fluttify/tencent_live_fluttify', StandardMethodCodec(FluttifyMessageCodec('tencent_live_fluttify'))).invokeMethod('TXLivePlayer::setRenderMode', {"renderMode": renderMode.toValue(), "__this__": this});
  
  
    // handle native call
  
  
    // convert native result to dart side object
    if (__result__ == null) {
      return null;
    } else {
      final __return__ = __result__;
      return __return__;
    }
  }
  
  
  Future<void> snapshot(void snapshotCompletionBlock(UIImage __arg_0__)) async {
    // print log
    if (fluttifyLogEnabled) {
      debugPrint('fluttify-dart: TXLivePlayer@$refId::snapshot([])');
    }
  
    // invoke native method
    final __result__ = await MethodChannel('com.fluttify/tencent_live_fluttify', StandardMethodCodec(FluttifyMessageCodec('tencent_live_fluttify'))).invokeMethod('TXLivePlayer::snapshot', {"__this__": this});
  
  
    // handle native call
    MethodChannel('void|TXImage*#__arg_0__::Callback@$refId', StandardMethodCodec(FluttifyMessageCodec('tencent_live_fluttify')))
        .setMethodCallHandler((methodCall) async {
          try {
            final args = methodCall.arguments as Map;
            switch (methodCall.method) {
              case 'Callback::void|TXImage*#__arg_0__::void|TXImage*#__arg_0__':
                // print log
                if (fluttifyLogEnabled) {
          
                }
          
                // handle the native call
                if (snapshotCompletionBlock != null) snapshotCompletionBlock(TypeOpTencentLiveFluttifyIOS((args['__arg_0__'] as Object))?.as__<UIImage>());
                break;
              default:
                break;
            }
          } catch (e) {
            debugPrint(e);
            throw e;
          }
        });
  
    // convert native result to dart side object
    if (__result__ == null) {
      return null;
    } else {
      final __return__ = __result__;
      return __return__;
    }
  }
  
  
  Future<void> setMute(bool bEnable) async {
    // print log
    if (fluttifyLogEnabled) {
      debugPrint('fluttify-dart: TXLivePlayer@$refId::setMute([\'bEnable\':$bEnable])');
    }
  
    // invoke native method
    final __result__ = await MethodChannel('com.fluttify/tencent_live_fluttify', StandardMethodCodec(FluttifyMessageCodec('tencent_live_fluttify'))).invokeMethod('TXLivePlayer::setMute', {"bEnable": bEnable, "__this__": this});
  
  
    // handle native call
  
  
    // convert native result to dart side object
    if (__result__ == null) {
      return null;
    } else {
      final __return__ = __result__;
      return __return__;
    }
  }
  
  
  Future<void> setVolume(int volume) async {
    // print log
    if (fluttifyLogEnabled) {
      debugPrint('fluttify-dart: TXLivePlayer@$refId::setVolume([\'volume\':$volume])');
    }
  
    // invoke native method
    final __result__ = await MethodChannel('com.fluttify/tencent_live_fluttify', StandardMethodCodec(FluttifyMessageCodec('tencent_live_fluttify'))).invokeMethod('TXLivePlayer::setVolume', {"volume": volume, "__this__": this});
  
  
    // handle native call
  
  
    // convert native result to dart side object
    if (__result__ == null) {
      return null;
    } else {
      final __return__ = __result__;
      return __return__;
    }
  }
  
  
  static Future<void> setAudioRoute(TXAudioRouteType audioRoute) async {
    // print log
    if (fluttifyLogEnabled) {
      debugPrint('fluttify-dart: TXLivePlayer::setAudioRoute([])');
    }
  
    // invoke native method
    final __result__ = await MethodChannel('com.fluttify/tencent_live_fluttify', StandardMethodCodec(FluttifyMessageCodec('tencent_live_fluttify'))).invokeMethod('TXLivePlayer::setAudioRoute', {"audioRoute": audioRoute.toValue()});
  
  
    // handle native call
  
  
    // convert native result to dart side object
    if (__result__ == null) {
      return null;
    } else {
      final __return__ = __result__;
      return __return__;
    }
  }
  
  
  Future<void> setAudioVolumeEvaluationListener(void volumeEvaluationListener(int __arg_0__)) async {
    // print log
    if (fluttifyLogEnabled) {
      debugPrint('fluttify-dart: TXLivePlayer@$refId::setAudioVolumeEvaluationListener([])');
    }
  
    // invoke native method
    final __result__ = await MethodChannel('com.fluttify/tencent_live_fluttify', StandardMethodCodec(FluttifyMessageCodec('tencent_live_fluttify'))).invokeMethod('TXLivePlayer::setAudioVolumeEvaluationListener', {"__this__": this});
  
  
    // handle native call
    MethodChannel('void|int#__arg_0__::Callback@$refId', StandardMethodCodec(FluttifyMessageCodec('tencent_live_fluttify')))
        .setMethodCallHandler((methodCall) async {
          try {
            final args = methodCall.arguments as Map;
            switch (methodCall.method) {
              case 'Callback::void|int#__arg_0__::void|int#__arg_0__':
                // print log
                if (fluttifyLogEnabled) {
          
                }
          
                // handle the native call
                if (volumeEvaluationListener != null) volumeEvaluationListener(args['__arg_0__']);
                break;
              default:
                break;
            }
          } catch (e) {
            debugPrint(e);
            throw e;
          }
        });
  
    // convert native result to dart side object
    if (__result__ == null) {
      return null;
    } else {
      final __return__ = __result__;
      return __return__;
    }
  }
  
  
  Future<void> enableAudioVolumeEvaluation(int interval) async {
    // print log
    if (fluttifyLogEnabled) {
      debugPrint('fluttify-dart: TXLivePlayer@$refId::enableAudioVolumeEvaluation([\'interval\':$interval])');
    }
  
    // invoke native method
    final __result__ = await MethodChannel('com.fluttify/tencent_live_fluttify', StandardMethodCodec(FluttifyMessageCodec('tencent_live_fluttify'))).invokeMethod('TXLivePlayer::enableAudioVolumeEvaluation', {"interval": interval, "__this__": this});
  
  
    // handle native call
  
  
    // convert native result to dart side object
    if (__result__ == null) {
      return null;
    } else {
      final __return__ = __result__;
      return __return__;
    }
  }
  
  
  Future<int> prepareLiveSeek_bizId(String domain, int bizId) async {
    // print log
    if (fluttifyLogEnabled) {
      debugPrint('fluttify-dart: TXLivePlayer@$refId::prepareLiveSeek([\'domain\':$domain, \'bizId\':$bizId])');
    }
  
    // invoke native method
    final __result__ = await MethodChannel('com.fluttify/tencent_live_fluttify', StandardMethodCodec(FluttifyMessageCodec('tencent_live_fluttify'))).invokeMethod('TXLivePlayer::prepareLiveSeek_bizId', {"domain": domain, "bizId": bizId, "__this__": this});
  
  
    // handle native call
  
  
    // convert native result to dart side object
    if (__result__ == null) {
      return null;
    } else {
      final __return__ = __result__;
      return __return__;
    }
  }
  
  
  Future<int> resumeLive() async {
    // print log
    if (fluttifyLogEnabled) {
      debugPrint('fluttify-dart: TXLivePlayer@$refId::resumeLive([])');
    }
  
    // invoke native method
    final __result__ = await MethodChannel('com.fluttify/tencent_live_fluttify', StandardMethodCodec(FluttifyMessageCodec('tencent_live_fluttify'))).invokeMethod('TXLivePlayer::resumeLive', {"__this__": this});
  
  
    // handle native call
  
  
    // convert native result to dart side object
    if (__result__ == null) {
      return null;
    } else {
      final __return__ = __result__;
      return __return__;
    }
  }
  
  
  Future<int> seek(double time) async {
    // print log
    if (fluttifyLogEnabled) {
      debugPrint('fluttify-dart: TXLivePlayer@$refId::seek([\'time\':$time])');
    }
  
    // invoke native method
    final __result__ = await MethodChannel('com.fluttify/tencent_live_fluttify', StandardMethodCodec(FluttifyMessageCodec('tencent_live_fluttify'))).invokeMethod('TXLivePlayer::seek', {"time": time, "__this__": this});
  
  
    // handle native call
  
  
    // convert native result to dart side object
    if (__result__ == null) {
      return null;
    } else {
      final __return__ = __result__;
      return __return__;
    }
  }
  
  
  Future<int> startRecord(TXRecordType recordType) async {
    // print log
    if (fluttifyLogEnabled) {
      debugPrint('fluttify-dart: TXLivePlayer@$refId::startRecord([])');
    }
  
    // invoke native method
    final __result__ = await MethodChannel('com.fluttify/tencent_live_fluttify', StandardMethodCodec(FluttifyMessageCodec('tencent_live_fluttify'))).invokeMethod('TXLivePlayer::startRecord', {"recordType": recordType.toValue(), "__this__": this});
  
  
    // handle native call
  
  
    // convert native result to dart side object
    if (__result__ == null) {
      return null;
    } else {
      final __return__ = __result__;
      return __return__;
    }
  }
  
  
  Future<int> stopRecord() async {
    // print log
    if (fluttifyLogEnabled) {
      debugPrint('fluttify-dart: TXLivePlayer@$refId::stopRecord([])');
    }
  
    // invoke native method
    final __result__ = await MethodChannel('com.fluttify/tencent_live_fluttify', StandardMethodCodec(FluttifyMessageCodec('tencent_live_fluttify'))).invokeMethod('TXLivePlayer::stopRecord', {"__this__": this});
  
  
    // handle native call
  
  
    // convert native result to dart side object
    if (__result__ == null) {
      return null;
    } else {
      final __return__ = __result__;
      return __return__;
    }
  }
  
  
  Future<void> setRate(double rate) async {
    // print log
    if (fluttifyLogEnabled) {
      debugPrint('fluttify-dart: TXLivePlayer@$refId::setRate([\'rate\':$rate])');
    }
  
    // invoke native method
    final __result__ = await MethodChannel('com.fluttify/tencent_live_fluttify', StandardMethodCodec(FluttifyMessageCodec('tencent_live_fluttify'))).invokeMethod('TXLivePlayer::setRate', {"rate": rate, "__this__": this});
  
  
    // handle native call
  
  
    // convert native result to dart side object
    if (__result__ == null) {
      return null;
    } else {
      final __return__ = __result__;
      return __return__;
    }
  }
  
  
  Future<void> setLogViewMargin(UIEdgeInsets margin) async {
    // print log
    if (fluttifyLogEnabled) {
      debugPrint('fluttify-dart: TXLivePlayer@$refId::setLogViewMargin([])');
    }
  
    // invoke native method
    final __result__ = await MethodChannel('com.fluttify/tencent_live_fluttify', StandardMethodCodec(FluttifyMessageCodec('tencent_live_fluttify'))).invokeMethod('TXLivePlayer::setLogViewMargin', {"margin": margin, "__this__": this});
  
  
    // handle native call
  
  
    // convert native result to dart side object
    if (__result__ == null) {
      return null;
    } else {
      final __return__ = __result__;
      return __return__;
    }
  }
  
  
  Future<void> showVideoDebugLog(bool isShow) async {
    // print log
    if (fluttifyLogEnabled) {
      debugPrint('fluttify-dart: TXLivePlayer@$refId::showVideoDebugLog([\'isShow\':$isShow])');
    }
  
    // invoke native method
    final __result__ = await MethodChannel('com.fluttify/tencent_live_fluttify', StandardMethodCodec(FluttifyMessageCodec('tencent_live_fluttify'))).invokeMethod('TXLivePlayer::showVideoDebugLog', {"isShow": isShow, "__this__": this});
  
  
    // handle native call
  
  
    // convert native result to dart side object
    if (__result__ == null) {
      return null;
    } else {
      final __return__ = __result__;
      return __return__;
    }
  }
  
  
  Future<int> switchStream(String playUrl) async {
    // print log
    if (fluttifyLogEnabled) {
      debugPrint('fluttify-dart: TXLivePlayer@$refId::switchStream([\'playUrl\':$playUrl])');
    }
  
    // invoke native method
    final __result__ = await MethodChannel('com.fluttify/tencent_live_fluttify', StandardMethodCodec(FluttifyMessageCodec('tencent_live_fluttify'))).invokeMethod('TXLivePlayer::switchStream', {"playUrl": playUrl, "__this__": this});
  
  
    // handle native call
  
  
    // convert native result to dart side object
    if (__result__ == null) {
      return null;
    } else {
      final __return__ = __result__;
      return __return__;
    }
  }
  
  
  Future<void> callExperimentalAPI(String jsonStr) async {
    // print log
    if (fluttifyLogEnabled) {
      debugPrint('fluttify-dart: TXLivePlayer@$refId::callExperimentalAPI([\'jsonStr\':$jsonStr])');
    }
  
    // invoke native method
    final __result__ = await MethodChannel('com.fluttify/tencent_live_fluttify', StandardMethodCodec(FluttifyMessageCodec('tencent_live_fluttify'))).invokeMethod('TXLivePlayer::callExperimentalAPI', {"jsonStr": jsonStr, "__this__": this});
  
  
    // handle native call
  
  
    // convert native result to dart side object
    if (__result__ == null) {
      return null;
    } else {
      final __return__ = __result__;
      return __return__;
    }
  }
  
  //endregion
}

extension TXLivePlayer_Batch on List<TXLivePlayer> {
  //region getters
  Future<List<bool>> get_enableHWAcceleration_batch() async {
    final resultBatch = await MethodChannel('com.fluttify/tencent_live_fluttify', StandardMethodCodec(FluttifyMessageCodec('tencent_live_fluttify'))).invokeMethod("TXLivePlayer::get_enableHWAcceleration_batch", [for (final __item__ in this) {'__this__': __item__}]);
  
    final typedResult = (resultBatch as List).cast<bool>().map((__result__) => __result__).toList();
    return typedResult;
  }
  
  Future<List<TXLivePlayConfig>> get_config_batch() async {
    final resultBatch = await MethodChannel('com.fluttify/tencent_live_fluttify', StandardMethodCodec(FluttifyMessageCodec('tencent_live_fluttify'))).invokeMethod("TXLivePlayer::get_config_batch", [for (final __item__ in this) {'__this__': __item__}]);
  
    final typedResult = (resultBatch as List).cast<String>().map((__result__) => TXLivePlayConfig()..refId = __result__..tag__ = 'tencent_live_fluttify').toList();
    return typedResult;
  }
  
  Future<List<bool>> get_isAutoPlay_batch() async {
    final resultBatch = await MethodChannel('com.fluttify/tencent_live_fluttify', StandardMethodCodec(FluttifyMessageCodec('tencent_live_fluttify'))).invokeMethod("TXLivePlayer::get_isAutoPlay_batch", [for (final __item__ in this) {'__this__': __item__}]);
  
    final typedResult = (resultBatch as List).cast<bool>().map((__result__) => __result__).toList();
    return typedResult;
  }
  
  //endregion

  //region setters
  Future<void> set_enableHWAcceleration_batch(List<bool> enableHWAcceleration) async {
    await MethodChannel('com.fluttify/tencent_live_fluttify', StandardMethodCodec(FluttifyMessageCodec())).invokeMethod('TXLivePlayer::set_enableHWAcceleration_batch', [for (int __i__ = 0; __i__ < this.length; __i__++) {'__this__': this[__i__], "enableHWAcceleration": enableHWAcceleration[__i__]}]);
  
  
  }
  
  Future<void> set_config_batch(List<TXLivePlayConfig> config) async {
    await MethodChannel('com.fluttify/tencent_live_fluttify', StandardMethodCodec(FluttifyMessageCodec())).invokeMethod('TXLivePlayer::set_config_batch', [for (int __i__ = 0; __i__ < this.length; __i__++) {'__this__': this[__i__], "config": config[__i__]}]);
  
  
  }
  
  Future<void> set_isAutoPlay_batch(List<bool> isAutoPlay) async {
    await MethodChannel('com.fluttify/tencent_live_fluttify', StandardMethodCodec(FluttifyMessageCodec())).invokeMethod('TXLivePlayer::set_isAutoPlay_batch', [for (int __i__ = 0; __i__ < this.length; __i__++) {'__this__': this[__i__], "isAutoPlay": isAutoPlay[__i__]}]);
  
  
  }
  
  //endregion

  //region methods
  
  Future<List<void>> setupVideoWidget_containView_insertIndex_batch(List<CGRect> frame, List<UIView> view, List<int> idx) async {
    if (frame.length != view.length || view.length != idx.length) {
      return Future.error('all args must have same length!');
    }
  
    // invoke native method
    final resultBatch = await MethodChannel('com.fluttify/tencent_live_fluttify', StandardMethodCodec(FluttifyMessageCodec('tencent_live_fluttify'))).invokeMethod('TXLivePlayer::setupVideoWidget_containView_insertIndex_batch', [for (int __i__ = 0; __i__ < this.length; __i__++) {"frame": frame[__i__], "view": view[__i__], "idx": idx[__i__], "__this__": this[__i__]}]);
  
  
    // convert native result to dart side object
    if (resultBatch == null) {
      return null;
    } else {
      final typedResult = (resultBatch as List).cast<String>().map((__result__) => __result__).toList();
      return typedResult;
    }
  }
  
  
  Future<List<void>> removeVideoWidget_batch() async {
    if (false) {
      return Future.error('all args must have same length!');
    }
  
    // invoke native method
    final resultBatch = await MethodChannel('com.fluttify/tencent_live_fluttify', StandardMethodCodec(FluttifyMessageCodec('tencent_live_fluttify'))).invokeMethod('TXLivePlayer::removeVideoWidget_batch', [for (int __i__ = 0; __i__ < this.length; __i__++) {"__this__": this[__i__]}]);
  
  
    // convert native result to dart side object
    if (resultBatch == null) {
      return null;
    } else {
      final typedResult = (resultBatch as List).cast<String>().map((__result__) => __result__).toList();
      return typedResult;
    }
  }
  
  
  Future<List<int>> startPlay_type_batch(List<String> url, List<TX_Enum_PlayType> playType) async {
    if (url.length != playType.length) {
      return Future.error('all args must have same length!');
    }
  
    // invoke native method
    final resultBatch = await MethodChannel('com.fluttify/tencent_live_fluttify', StandardMethodCodec(FluttifyMessageCodec('tencent_live_fluttify'))).invokeMethod('TXLivePlayer::startPlay_type_batch', [for (int __i__ = 0; __i__ < this.length; __i__++) {"url": url[__i__], "playType": playType[__i__].toValue(), "__this__": this[__i__]}]);
  
  
    // convert native result to dart side object
    if (resultBatch == null) {
      return null;
    } else {
      final typedResult = (resultBatch as List).cast<int>().map((__result__) => __result__).toList();
      return typedResult;
    }
  }
  
  
  Future<List<int>> stopPlay_batch() async {
    if (false) {
      return Future.error('all args must have same length!');
    }
  
    // invoke native method
    final resultBatch = await MethodChannel('com.fluttify/tencent_live_fluttify', StandardMethodCodec(FluttifyMessageCodec('tencent_live_fluttify'))).invokeMethod('TXLivePlayer::stopPlay_batch', [for (int __i__ = 0; __i__ < this.length; __i__++) {"__this__": this[__i__]}]);
  
  
    // convert native result to dart side object
    if (resultBatch == null) {
      return null;
    } else {
      final typedResult = (resultBatch as List).cast<int>().map((__result__) => __result__).toList();
      return typedResult;
    }
  }
  
  
  Future<List<bool>> isPlaying_batch() async {
    if (false) {
      return Future.error('all args must have same length!');
    }
  
    // invoke native method
    final resultBatch = await MethodChannel('com.fluttify/tencent_live_fluttify', StandardMethodCodec(FluttifyMessageCodec('tencent_live_fluttify'))).invokeMethod('TXLivePlayer::isPlaying_batch', [for (int __i__ = 0; __i__ < this.length; __i__++) {"__this__": this[__i__]}]);
  
  
    // convert native result to dart side object
    if (resultBatch == null) {
      return null;
    } else {
      final typedResult = (resultBatch as List).cast<bool>().map((__result__) => __result__).toList();
      return typedResult;
    }
  }
  
  
  Future<List<void>> pause_batch() async {
    if (false) {
      return Future.error('all args must have same length!');
    }
  
    // invoke native method
    final resultBatch = await MethodChannel('com.fluttify/tencent_live_fluttify', StandardMethodCodec(FluttifyMessageCodec('tencent_live_fluttify'))).invokeMethod('TXLivePlayer::pause_batch', [for (int __i__ = 0; __i__ < this.length; __i__++) {"__this__": this[__i__]}]);
  
  
    // convert native result to dart side object
    if (resultBatch == null) {
      return null;
    } else {
      final typedResult = (resultBatch as List).cast<String>().map((__result__) => __result__).toList();
      return typedResult;
    }
  }
  
  
  Future<List<void>> resume_batch() async {
    if (false) {
      return Future.error('all args must have same length!');
    }
  
    // invoke native method
    final resultBatch = await MethodChannel('com.fluttify/tencent_live_fluttify', StandardMethodCodec(FluttifyMessageCodec('tencent_live_fluttify'))).invokeMethod('TXLivePlayer::resume_batch', [for (int __i__ = 0; __i__ < this.length; __i__++) {"__this__": this[__i__]}]);
  
  
    // convert native result to dart side object
    if (resultBatch == null) {
      return null;
    } else {
      final typedResult = (resultBatch as List).cast<String>().map((__result__) => __result__).toList();
      return typedResult;
    }
  }
  
  
  Future<List<void>> setRenderRotation_batch(List<TX_Enum_Type_HomeOrientation> rotation) async {
    if (false) {
      return Future.error('all args must have same length!');
    }
  
    // invoke native method
    final resultBatch = await MethodChannel('com.fluttify/tencent_live_fluttify', StandardMethodCodec(FluttifyMessageCodec('tencent_live_fluttify'))).invokeMethod('TXLivePlayer::setRenderRotation_batch', [for (int __i__ = 0; __i__ < this.length; __i__++) {"rotation": rotation[__i__].toValue(), "__this__": this[__i__]}]);
  
  
    // convert native result to dart side object
    if (resultBatch == null) {
      return null;
    } else {
      final typedResult = (resultBatch as List).cast<String>().map((__result__) => __result__).toList();
      return typedResult;
    }
  }
  
  
  Future<List<void>> setRenderMode_batch(List<TX_Enum_Type_RenderMode> renderMode) async {
    if (false) {
      return Future.error('all args must have same length!');
    }
  
    // invoke native method
    final resultBatch = await MethodChannel('com.fluttify/tencent_live_fluttify', StandardMethodCodec(FluttifyMessageCodec('tencent_live_fluttify'))).invokeMethod('TXLivePlayer::setRenderMode_batch', [for (int __i__ = 0; __i__ < this.length; __i__++) {"renderMode": renderMode[__i__].toValue(), "__this__": this[__i__]}]);
  
  
    // convert native result to dart side object
    if (resultBatch == null) {
      return null;
    } else {
      final typedResult = (resultBatch as List).cast<String>().map((__result__) => __result__).toList();
      return typedResult;
    }
  }
  
  
  Future<List<void>> setMute_batch(List<bool> bEnable) async {
    if (false) {
      return Future.error('all args must have same length!');
    }
  
    // invoke native method
    final resultBatch = await MethodChannel('com.fluttify/tencent_live_fluttify', StandardMethodCodec(FluttifyMessageCodec('tencent_live_fluttify'))).invokeMethod('TXLivePlayer::setMute_batch', [for (int __i__ = 0; __i__ < this.length; __i__++) {"bEnable": bEnable[__i__], "__this__": this[__i__]}]);
  
  
    // convert native result to dart side object
    if (resultBatch == null) {
      return null;
    } else {
      final typedResult = (resultBatch as List).cast<String>().map((__result__) => __result__).toList();
      return typedResult;
    }
  }
  
  
  Future<List<void>> setVolume_batch(List<int> volume) async {
    if (false) {
      return Future.error('all args must have same length!');
    }
  
    // invoke native method
    final resultBatch = await MethodChannel('com.fluttify/tencent_live_fluttify', StandardMethodCodec(FluttifyMessageCodec('tencent_live_fluttify'))).invokeMethod('TXLivePlayer::setVolume_batch', [for (int __i__ = 0; __i__ < this.length; __i__++) {"volume": volume[__i__], "__this__": this[__i__]}]);
  
  
    // convert native result to dart side object
    if (resultBatch == null) {
      return null;
    } else {
      final typedResult = (resultBatch as List).cast<String>().map((__result__) => __result__).toList();
      return typedResult;
    }
  }
  
  
  static Future<List<void>> setAudioRoute_batch(List<TXAudioRouteType> audioRoute) async {
    if (false) {
      return Future.error('all args must have same length!');
    }
  
    // invoke native method
    final resultBatch = await MethodChannel('com.fluttify/tencent_live_fluttify', StandardMethodCodec(FluttifyMessageCodec('tencent_live_fluttify'))).invokeMethod('TXLivePlayer::setAudioRoute_batch', [for (int __i__ = 0; __i__ < audioRoute.length; __i__++) {"audioRoute": audioRoute[__i__].toValue()}]);
  
  
    // convert native result to dart side object
    if (resultBatch == null) {
      return null;
    } else {
      final typedResult = (resultBatch as List).cast<String>().map((__result__) => __result__).toList();
      return typedResult;
    }
  }
  
  
  Future<List<void>> enableAudioVolumeEvaluation_batch(List<int> interval) async {
    if (false) {
      return Future.error('all args must have same length!');
    }
  
    // invoke native method
    final resultBatch = await MethodChannel('com.fluttify/tencent_live_fluttify', StandardMethodCodec(FluttifyMessageCodec('tencent_live_fluttify'))).invokeMethod('TXLivePlayer::enableAudioVolumeEvaluation_batch', [for (int __i__ = 0; __i__ < this.length; __i__++) {"interval": interval[__i__], "__this__": this[__i__]}]);
  
  
    // convert native result to dart side object
    if (resultBatch == null) {
      return null;
    } else {
      final typedResult = (resultBatch as List).cast<String>().map((__result__) => __result__).toList();
      return typedResult;
    }
  }
  
  
  Future<List<int>> prepareLiveSeek_bizId_batch(List<String> domain, List<int> bizId) async {
    if (domain.length != bizId.length) {
      return Future.error('all args must have same length!');
    }
  
    // invoke native method
    final resultBatch = await MethodChannel('com.fluttify/tencent_live_fluttify', StandardMethodCodec(FluttifyMessageCodec('tencent_live_fluttify'))).invokeMethod('TXLivePlayer::prepareLiveSeek_bizId_batch', [for (int __i__ = 0; __i__ < this.length; __i__++) {"domain": domain[__i__], "bizId": bizId[__i__], "__this__": this[__i__]}]);
  
  
    // convert native result to dart side object
    if (resultBatch == null) {
      return null;
    } else {
      final typedResult = (resultBatch as List).cast<int>().map((__result__) => __result__).toList();
      return typedResult;
    }
  }
  
  
  Future<List<int>> resumeLive_batch() async {
    if (false) {
      return Future.error('all args must have same length!');
    }
  
    // invoke native method
    final resultBatch = await MethodChannel('com.fluttify/tencent_live_fluttify', StandardMethodCodec(FluttifyMessageCodec('tencent_live_fluttify'))).invokeMethod('TXLivePlayer::resumeLive_batch', [for (int __i__ = 0; __i__ < this.length; __i__++) {"__this__": this[__i__]}]);
  
  
    // convert native result to dart side object
    if (resultBatch == null) {
      return null;
    } else {
      final typedResult = (resultBatch as List).cast<int>().map((__result__) => __result__).toList();
      return typedResult;
    }
  }
  
  
  Future<List<int>> seek_batch(List<double> time) async {
    if (false) {
      return Future.error('all args must have same length!');
    }
  
    // invoke native method
    final resultBatch = await MethodChannel('com.fluttify/tencent_live_fluttify', StandardMethodCodec(FluttifyMessageCodec('tencent_live_fluttify'))).invokeMethod('TXLivePlayer::seek_batch', [for (int __i__ = 0; __i__ < this.length; __i__++) {"time": time[__i__], "__this__": this[__i__]}]);
  
  
    // convert native result to dart side object
    if (resultBatch == null) {
      return null;
    } else {
      final typedResult = (resultBatch as List).cast<int>().map((__result__) => __result__).toList();
      return typedResult;
    }
  }
  
  
  Future<List<int>> startRecord_batch(List<TXRecordType> recordType) async {
    if (false) {
      return Future.error('all args must have same length!');
    }
  
    // invoke native method
    final resultBatch = await MethodChannel('com.fluttify/tencent_live_fluttify', StandardMethodCodec(FluttifyMessageCodec('tencent_live_fluttify'))).invokeMethod('TXLivePlayer::startRecord_batch', [for (int __i__ = 0; __i__ < this.length; __i__++) {"recordType": recordType[__i__].toValue(), "__this__": this[__i__]}]);
  
  
    // convert native result to dart side object
    if (resultBatch == null) {
      return null;
    } else {
      final typedResult = (resultBatch as List).cast<int>().map((__result__) => __result__).toList();
      return typedResult;
    }
  }
  
  
  Future<List<int>> stopRecord_batch() async {
    if (false) {
      return Future.error('all args must have same length!');
    }
  
    // invoke native method
    final resultBatch = await MethodChannel('com.fluttify/tencent_live_fluttify', StandardMethodCodec(FluttifyMessageCodec('tencent_live_fluttify'))).invokeMethod('TXLivePlayer::stopRecord_batch', [for (int __i__ = 0; __i__ < this.length; __i__++) {"__this__": this[__i__]}]);
  
  
    // convert native result to dart side object
    if (resultBatch == null) {
      return null;
    } else {
      final typedResult = (resultBatch as List).cast<int>().map((__result__) => __result__).toList();
      return typedResult;
    }
  }
  
  
  Future<List<void>> setRate_batch(List<double> rate) async {
    if (false) {
      return Future.error('all args must have same length!');
    }
  
    // invoke native method
    final resultBatch = await MethodChannel('com.fluttify/tencent_live_fluttify', StandardMethodCodec(FluttifyMessageCodec('tencent_live_fluttify'))).invokeMethod('TXLivePlayer::setRate_batch', [for (int __i__ = 0; __i__ < this.length; __i__++) {"rate": rate[__i__], "__this__": this[__i__]}]);
  
  
    // convert native result to dart side object
    if (resultBatch == null) {
      return null;
    } else {
      final typedResult = (resultBatch as List).cast<String>().map((__result__) => __result__).toList();
      return typedResult;
    }
  }
  
  
  Future<List<void>> setLogViewMargin_batch(List<UIEdgeInsets> margin) async {
    if (false) {
      return Future.error('all args must have same length!');
    }
  
    // invoke native method
    final resultBatch = await MethodChannel('com.fluttify/tencent_live_fluttify', StandardMethodCodec(FluttifyMessageCodec('tencent_live_fluttify'))).invokeMethod('TXLivePlayer::setLogViewMargin_batch', [for (int __i__ = 0; __i__ < this.length; __i__++) {"margin": margin[__i__], "__this__": this[__i__]}]);
  
  
    // convert native result to dart side object
    if (resultBatch == null) {
      return null;
    } else {
      final typedResult = (resultBatch as List).cast<String>().map((__result__) => __result__).toList();
      return typedResult;
    }
  }
  
  
  Future<List<void>> showVideoDebugLog_batch(List<bool> isShow) async {
    if (false) {
      return Future.error('all args must have same length!');
    }
  
    // invoke native method
    final resultBatch = await MethodChannel('com.fluttify/tencent_live_fluttify', StandardMethodCodec(FluttifyMessageCodec('tencent_live_fluttify'))).invokeMethod('TXLivePlayer::showVideoDebugLog_batch', [for (int __i__ = 0; __i__ < this.length; __i__++) {"isShow": isShow[__i__], "__this__": this[__i__]}]);
  
  
    // convert native result to dart side object
    if (resultBatch == null) {
      return null;
    } else {
      final typedResult = (resultBatch as List).cast<String>().map((__result__) => __result__).toList();
      return typedResult;
    }
  }
  
  
  Future<List<int>> switchStream_batch(List<String> playUrl) async {
    if (false) {
      return Future.error('all args must have same length!');
    }
  
    // invoke native method
    final resultBatch = await MethodChannel('com.fluttify/tencent_live_fluttify', StandardMethodCodec(FluttifyMessageCodec('tencent_live_fluttify'))).invokeMethod('TXLivePlayer::switchStream_batch', [for (int __i__ = 0; __i__ < this.length; __i__++) {"playUrl": playUrl[__i__], "__this__": this[__i__]}]);
  
  
    // convert native result to dart side object
    if (resultBatch == null) {
      return null;
    } else {
      final typedResult = (resultBatch as List).cast<int>().map((__result__) => __result__).toList();
      return typedResult;
    }
  }
  
  
  Future<List<void>> callExperimentalAPI_batch(List<String> jsonStr) async {
    if (false) {
      return Future.error('all args must have same length!');
    }
  
    // invoke native method
    final resultBatch = await MethodChannel('com.fluttify/tencent_live_fluttify', StandardMethodCodec(FluttifyMessageCodec('tencent_live_fluttify'))).invokeMethod('TXLivePlayer::callExperimentalAPI_batch', [for (int __i__ = 0; __i__ < this.length; __i__++) {"jsonStr": jsonStr[__i__], "__this__": this[__i__]}]);
  
  
    // convert native result to dart side object
    if (resultBatch == null) {
      return null;
    } else {
      final typedResult = (resultBatch as List).cast<String>().map((__result__) => __result__).toList();
      return typedResult;
    }
  }
  
  //endregion
}