//////////////////////////////////////////////////////////
// GENERATED BY FLUTTIFY. DO NOT EDIT IT.
//////////////////////////////////////////////////////////

package com.fluttify.tencent_live_fluttify;

import android.content.Context;
import android.view.View;
import android.util.Log;
import android.app.Activity;

import java.util.ArrayList;
import java.util.Collection;
import java.util.List;
import java.util.Map;
import java.util.HashMap;

import io.flutter.plugin.common.BinaryMessenger;
import io.flutter.plugin.common.MethodChannel;
import io.flutter.plugin.common.PluginRegistry.Registrar;
import io.flutter.plugin.common.StandardMessageCodec;
import io.flutter.plugin.common.StandardMethodCodec;
import io.flutter.plugin.platform.PlatformView;
import io.flutter.plugin.platform.PlatformViewFactory;

import me.yohom.foundation_fluttify.core.FluttifyMessageCodec;

import static me.yohom.foundation_fluttify.FoundationFluttifyPluginKt.getHEAP;
import static me.yohom.foundation_fluttify.FoundationFluttifyPluginKt.getEnableLog;

@SuppressWarnings("ALL")
class TXCloudVideoViewFactory extends PlatformViewFactory {

    TXCloudVideoViewFactory(BinaryMessenger messenger, Activity activity) {
        super(StandardMessageCodec.INSTANCE);

        this.messenger = messenger;
        this.activity = activity;

        new MethodChannel(messenger, "com.fluttify/tencent_live_fluttify/com_tencent_rtmp_ui_TXCloudVideoView", new StandardMethodCodec(new FluttifyMessageCodec())).setMethodCallHandler((methodCall, methodResult) -> {
            Map<String, Object> args = (Map<String, Object>) methodCall.arguments;
            TencentLiveFluttifyPlugin.Handler handler = handlerMap.get(methodCall.method);
            if (handler != null) {
                try {
                    handler.call(args, methodResult);
                } catch (Exception e) {
                    e.printStackTrace();
                    methodResult.error(e.getMessage(), null, null);
                }
            } else {
                methodResult.notImplemented();
            }
        });
    }

    private BinaryMessenger messenger;
    private Activity activity;

    private final Map<String, TencentLiveFluttifyPlugin.Handler> handlerMap = new HashMap<String, TencentLiveFluttifyPlugin.Handler>() {{
        // method
        put("com.tencent.rtmp.ui.TXCloudVideoView::onResume", (__args__, __methodResult__) -> {
            // args
        
        
            // ref
            com.tencent.rtmp.ui.TXCloudVideoView __this__ = (com.tencent.rtmp.ui.TXCloudVideoView) ((Map<String, Object>) __args__).get("__this__");
        
            // print log
            if (getEnableLog()) {
                Log.d("fluttify-java", "fluttify-java: com.tencent.rtmp.ui.TXCloudVideoView@" + __this__ + "::onResume(" + "" + ")");
            }
        
            // invoke native method
            Void __result__ = null;
            try {
                __this__.onResume();
            } catch (Throwable throwable) {
                throwable.printStackTrace();
                if (getEnableLog()) {
                    Log.d("Current HEAP: ", getHEAP().toString());
                }
                __methodResult__.error(throwable.getMessage(), null, null);
                return;
            }
        
            __methodResult__.success(__result__);
        });
        // method
        put("com.tencent.rtmp.ui.TXCloudVideoView::onPause", (__args__, __methodResult__) -> {
            // args
        
        
            // ref
            com.tencent.rtmp.ui.TXCloudVideoView __this__ = (com.tencent.rtmp.ui.TXCloudVideoView) ((Map<String, Object>) __args__).get("__this__");
        
            // print log
            if (getEnableLog()) {
                Log.d("fluttify-java", "fluttify-java: com.tencent.rtmp.ui.TXCloudVideoView@" + __this__ + "::onPause(" + "" + ")");
            }
        
            // invoke native method
            Void __result__ = null;
            try {
                __this__.onPause();
            } catch (Throwable throwable) {
                throwable.printStackTrace();
                if (getEnableLog()) {
                    Log.d("Current HEAP: ", getHEAP().toString());
                }
                __methodResult__.error(throwable.getMessage(), null, null);
                return;
            }
        
            __methodResult__.success(__result__);
        });
        // method
        put("com.tencent.rtmp.ui.TXCloudVideoView::removeVideoView", (__args__, __methodResult__) -> {
            // args
        
        
            // ref
            com.tencent.rtmp.ui.TXCloudVideoView __this__ = (com.tencent.rtmp.ui.TXCloudVideoView) ((Map<String, Object>) __args__).get("__this__");
        
            // print log
            if (getEnableLog()) {
                Log.d("fluttify-java", "fluttify-java: com.tencent.rtmp.ui.TXCloudVideoView@" + __this__ + "::removeVideoView(" + "" + ")");
            }
        
            // invoke native method
            Void __result__ = null;
            try {
                __this__.removeVideoView();
            } catch (Throwable throwable) {
                throwable.printStackTrace();
                if (getEnableLog()) {
                    Log.d("Current HEAP: ", getHEAP().toString());
                }
                __methodResult__.error(throwable.getMessage(), null, null);
                return;
            }
        
            __methodResult__.success(__result__);
        });
        // method
        put("com.tencent.rtmp.ui.TXCloudVideoView::removeFocusIndicatorView", (__args__, __methodResult__) -> {
            // args
        
        
            // ref
            com.tencent.rtmp.ui.TXCloudVideoView __this__ = (com.tencent.rtmp.ui.TXCloudVideoView) ((Map<String, Object>) __args__).get("__this__");
        
            // print log
            if (getEnableLog()) {
                Log.d("fluttify-java", "fluttify-java: com.tencent.rtmp.ui.TXCloudVideoView@" + __this__ + "::removeFocusIndicatorView(" + "" + ")");
            }
        
            // invoke native method
            Void __result__ = null;
            try {
                __this__.removeFocusIndicatorView();
            } catch (Throwable throwable) {
                throwable.printStackTrace();
                if (getEnableLog()) {
                    Log.d("Current HEAP: ", getHEAP().toString());
                }
                __methodResult__.error(throwable.getMessage(), null, null);
                return;
            }
        
            __methodResult__.success(__result__);
        });
        // method
        put("com.tencent.rtmp.ui.TXCloudVideoView::onDestroy", (__args__, __methodResult__) -> {
            // args
        
        
            // ref
            com.tencent.rtmp.ui.TXCloudVideoView __this__ = (com.tencent.rtmp.ui.TXCloudVideoView) ((Map<String, Object>) __args__).get("__this__");
        
            // print log
            if (getEnableLog()) {
                Log.d("fluttify-java", "fluttify-java: com.tencent.rtmp.ui.TXCloudVideoView@" + __this__ + "::onDestroy(" + "" + ")");
            }
        
            // invoke native method
            Void __result__ = null;
            try {
                __this__.onDestroy();
            } catch (Throwable throwable) {
                throwable.printStackTrace();
                if (getEnableLog()) {
                    Log.d("Current HEAP: ", getHEAP().toString());
                }
                __methodResult__.error(throwable.getMessage(), null, null);
                return;
            }
        
            __methodResult__.success(__result__);
        });
        // method
        put("com.tencent.rtmp.ui.TXCloudVideoView::getSurfaceView", (__args__, __methodResult__) -> {
            // args
        
        
            // ref
            com.tencent.rtmp.ui.TXCloudVideoView __this__ = (com.tencent.rtmp.ui.TXCloudVideoView) ((Map<String, Object>) __args__).get("__this__");
        
            // print log
            if (getEnableLog()) {
                Log.d("fluttify-java", "fluttify-java: com.tencent.rtmp.ui.TXCloudVideoView@" + __this__ + "::getSurfaceView(" + "" + ")");
            }
        
            // invoke native method
            android.view.SurfaceView __result__ = null;
            try {
                __result__ = __this__.getSurfaceView();
            } catch (Throwable throwable) {
                throwable.printStackTrace();
                if (getEnableLog()) {
                    Log.d("Current HEAP: ", getHEAP().toString());
                }
                __methodResult__.error(throwable.getMessage(), null, null);
                return;
            }
        
            __methodResult__.success(__result__);
        });
        // method
        put("com.tencent.rtmp.ui.TXCloudVideoView::setRenderMode", (__args__, __methodResult__) -> {
            // args
            // ref arg
            Number var1 = (Number) ((Map<String, Object>) __args__).get("var1");
        
            // ref
            com.tencent.rtmp.ui.TXCloudVideoView __this__ = (com.tencent.rtmp.ui.TXCloudVideoView) ((Map<String, Object>) __args__).get("__this__");
        
            // print log
            if (getEnableLog()) {
                Log.d("fluttify-java", "fluttify-java: com.tencent.rtmp.ui.TXCloudVideoView@" + __this__ + "::setRenderMode(" + var1 + ")");
            }
        
            // invoke native method
            Void __result__ = null;
            try {
                __this__.setRenderMode(var1.intValue());
            } catch (Throwable throwable) {
                throwable.printStackTrace();
                if (getEnableLog()) {
                    Log.d("Current HEAP: ", getHEAP().toString());
                }
                __methodResult__.error(throwable.getMessage(), null, null);
                return;
            }
        
            __methodResult__.success(__result__);
        });
        // method
        put("com.tencent.rtmp.ui.TXCloudVideoView::setRenderRotation", (__args__, __methodResult__) -> {
            // args
            // ref arg
            Number var1 = (Number) ((Map<String, Object>) __args__).get("var1");
        
            // ref
            com.tencent.rtmp.ui.TXCloudVideoView __this__ = (com.tencent.rtmp.ui.TXCloudVideoView) ((Map<String, Object>) __args__).get("__this__");
        
            // print log
            if (getEnableLog()) {
                Log.d("fluttify-java", "fluttify-java: com.tencent.rtmp.ui.TXCloudVideoView@" + __this__ + "::setRenderRotation(" + var1 + ")");
            }
        
            // invoke native method
            Void __result__ = null;
            try {
                __this__.setRenderRotation(var1.intValue());
            } catch (Throwable throwable) {
                throwable.printStackTrace();
                if (getEnableLog()) {
                    Log.d("Current HEAP: ", getHEAP().toString());
                }
                __methodResult__.error(throwable.getMessage(), null, null);
                return;
            }
        
            __methodResult__.success(__result__);
        });
        // method
        put("com.tencent.rtmp.ui.TXCloudVideoView::clearLastFrame", (__args__, __methodResult__) -> {
            // args
            // ref arg
            boolean var1 = (boolean) ((Map<String, Object>) __args__).get("var1");
        
            // ref
            com.tencent.rtmp.ui.TXCloudVideoView __this__ = (com.tencent.rtmp.ui.TXCloudVideoView) ((Map<String, Object>) __args__).get("__this__");
        
            // print log
            if (getEnableLog()) {
                Log.d("fluttify-java", "fluttify-java: com.tencent.rtmp.ui.TXCloudVideoView@" + __this__ + "::clearLastFrame(" + var1 + ")");
            }
        
            // invoke native method
            Void __result__ = null;
            try {
                __this__.clearLastFrame(var1);
            } catch (Throwable throwable) {
                throwable.printStackTrace();
                if (getEnableLog()) {
                    Log.d("Current HEAP: ", getHEAP().toString());
                }
                __methodResult__.error(throwable.getMessage(), null, null);
                return;
            }
        
            __methodResult__.success(__result__);
        });
        // method
        put("com.tencent.rtmp.ui.TXCloudVideoView::onTouchFocus", (__args__, __methodResult__) -> {
            // args
            // ref arg
            Number var1 = (Number) ((Map<String, Object>) __args__).get("var1");
            // ref arg
            Number var2 = (Number) ((Map<String, Object>) __args__).get("var2");
        
            // ref
            com.tencent.rtmp.ui.TXCloudVideoView __this__ = (com.tencent.rtmp.ui.TXCloudVideoView) ((Map<String, Object>) __args__).get("__this__");
        
            // print log
            if (getEnableLog()) {
                Log.d("fluttify-java", "fluttify-java: com.tencent.rtmp.ui.TXCloudVideoView@" + __this__ + "::onTouchFocus(" + var1 + var2 + ")");
            }
        
            // invoke native method
            Void __result__ = null;
            try {
                __this__.onTouchFocus(var1.intValue(), var2.intValue());
            } catch (Throwable throwable) {
                throwable.printStackTrace();
                if (getEnableLog()) {
                    Log.d("Current HEAP: ", getHEAP().toString());
                }
                __methodResult__.error(throwable.getMessage(), null, null);
                return;
            }
        
            __methodResult__.success(__result__);
        });
        // method
        put("com.tencent.rtmp.ui.TXCloudVideoView::setMirror", (__args__, __methodResult__) -> {
            // args
            // ref arg
            boolean var1 = (boolean) ((Map<String, Object>) __args__).get("var1");
        
            // ref
            com.tencent.rtmp.ui.TXCloudVideoView __this__ = (com.tencent.rtmp.ui.TXCloudVideoView) ((Map<String, Object>) __args__).get("__this__");
        
            // print log
            if (getEnableLog()) {
                Log.d("fluttify-java", "fluttify-java: com.tencent.rtmp.ui.TXCloudVideoView@" + __this__ + "::setMirror(" + var1 + ")");
            }
        
            // invoke native method
            Void __result__ = null;
            try {
                __this__.setMirror(var1);
            } catch (Throwable throwable) {
                throwable.printStackTrace();
                if (getEnableLog()) {
                    Log.d("Current HEAP: ", getHEAP().toString());
                }
                __methodResult__.error(throwable.getMessage(), null, null);
                return;
            }
        
            __methodResult__.success(__result__);
        });
        // method
        put("com.tencent.rtmp.ui.TXCloudVideoView::disableLog", (__args__, __methodResult__) -> {
            // args
            // ref arg
            boolean var1 = (boolean) ((Map<String, Object>) __args__).get("var1");
        
            // ref
            com.tencent.rtmp.ui.TXCloudVideoView __this__ = (com.tencent.rtmp.ui.TXCloudVideoView) ((Map<String, Object>) __args__).get("__this__");
        
            // print log
            if (getEnableLog()) {
                Log.d("fluttify-java", "fluttify-java: com.tencent.rtmp.ui.TXCloudVideoView@" + __this__ + "::disableLog(" + var1 + ")");
            }
        
            // invoke native method
            Void __result__ = null;
            try {
                __this__.disableLog(var1);
            } catch (Throwable throwable) {
                throwable.printStackTrace();
                if (getEnableLog()) {
                    Log.d("Current HEAP: ", getHEAP().toString());
                }
                __methodResult__.error(throwable.getMessage(), null, null);
                return;
            }
        
            __methodResult__.success(__result__);
        });
        // method
        put("com.tencent.rtmp.ui.TXCloudVideoView::showLog", (__args__, __methodResult__) -> {
            // args
            // ref arg
            boolean var1 = (boolean) ((Map<String, Object>) __args__).get("var1");
        
            // ref
            com.tencent.rtmp.ui.TXCloudVideoView __this__ = (com.tencent.rtmp.ui.TXCloudVideoView) ((Map<String, Object>) __args__).get("__this__");
        
            // print log
            if (getEnableLog()) {
                Log.d("fluttify-java", "fluttify-java: com.tencent.rtmp.ui.TXCloudVideoView@" + __this__ + "::showLog(" + var1 + ")");
            }
        
            // invoke native method
            Void __result__ = null;
            try {
                __this__.showLog(var1);
            } catch (Throwable throwable) {
                throwable.printStackTrace();
                if (getEnableLog()) {
                    Log.d("Current HEAP: ", getHEAP().toString());
                }
                __methodResult__.error(throwable.getMessage(), null, null);
                return;
            }
        
            __methodResult__.success(__result__);
        });
        // method
        put("com.tencent.rtmp.ui.TXCloudVideoView::clearLog", (__args__, __methodResult__) -> {
            // args
        
        
            // ref
            com.tencent.rtmp.ui.TXCloudVideoView __this__ = (com.tencent.rtmp.ui.TXCloudVideoView) ((Map<String, Object>) __args__).get("__this__");
        
            // print log
            if (getEnableLog()) {
                Log.d("fluttify-java", "fluttify-java: com.tencent.rtmp.ui.TXCloudVideoView@" + __this__ + "::clearLog(" + "" + ")");
            }
        
            // invoke native method
            Void __result__ = null;
            try {
                __this__.clearLog();
            } catch (Throwable throwable) {
                throwable.printStackTrace();
                if (getEnableLog()) {
                    Log.d("Current HEAP: ", getHEAP().toString());
                }
                __methodResult__.error(throwable.getMessage(), null, null);
                return;
            }
        
            __methodResult__.success(__result__);
        });
        // method
        put("com.tencent.rtmp.ui.TXCloudVideoView::setLogText", (__args__, __methodResult__) -> {
            // args
            // ref arg
            android.os.Bundle var1 = (android.os.Bundle) ((Map<String, Object>) __args__).get("var1");
            // ref arg
            android.os.Bundle var2 = (android.os.Bundle) ((Map<String, Object>) __args__).get("var2");
            // ref arg
            Number var3 = (Number) ((Map<String, Object>) __args__).get("var3");
        
            // ref
            com.tencent.rtmp.ui.TXCloudVideoView __this__ = (com.tencent.rtmp.ui.TXCloudVideoView) ((Map<String, Object>) __args__).get("__this__");
        
            // print log
            if (getEnableLog()) {
                Log.d("fluttify-java", "fluttify-java: com.tencent.rtmp.ui.TXCloudVideoView@" + __this__ + "::setLogText(" + var1 + var2 + var3 + ")");
            }
        
            // invoke native method
            Void __result__ = null;
            try {
                __this__.setLogText(var1, var2, var3.intValue());
            } catch (Throwable throwable) {
                throwable.printStackTrace();
                if (getEnableLog()) {
                    Log.d("Current HEAP: ", getHEAP().toString());
                }
                __methodResult__.error(throwable.getMessage(), null, null);
                return;
            }
        
            __methodResult__.success(__result__);
        });
        // method
        put("com.tencent.rtmp.ui.TXCloudVideoView::updateVideoViewSize", (__args__, __methodResult__) -> {
            // args
            // ref arg
            Number var1 = (Number) ((Map<String, Object>) __args__).get("var1");
            // ref arg
            Number var2 = (Number) ((Map<String, Object>) __args__).get("var2");
        
            // ref
            com.tencent.rtmp.ui.TXCloudVideoView __this__ = (com.tencent.rtmp.ui.TXCloudVideoView) ((Map<String, Object>) __args__).get("__this__");
        
            // print log
            if (getEnableLog()) {
                Log.d("fluttify-java", "fluttify-java: com.tencent.rtmp.ui.TXCloudVideoView@" + __this__ + "::updateVideoViewSize(" + var1 + var2 + ")");
            }
        
            // invoke native method
            Void __result__ = null;
            try {
                __this__.updateVideoViewSize(var1.intValue(), var2.intValue());
            } catch (Throwable throwable) {
                throwable.printStackTrace();
                if (getEnableLog()) {
                    Log.d("Current HEAP: ", getHEAP().toString());
                }
                __methodResult__.error(throwable.getMessage(), null, null);
                return;
            }
        
            __methodResult__.success(__result__);
        });
        // method
        put("com.tencent.rtmp.ui.TXCloudVideoView::appendEventInfo", (__args__, __methodResult__) -> {
            // args
            // ref arg
            String var1 = (String) ((Map<String, Object>) __args__).get("var1");
        
            // ref
            com.tencent.rtmp.ui.TXCloudVideoView __this__ = (com.tencent.rtmp.ui.TXCloudVideoView) ((Map<String, Object>) __args__).get("__this__");
        
            // print log
            if (getEnableLog()) {
                Log.d("fluttify-java", "fluttify-java: com.tencent.rtmp.ui.TXCloudVideoView@" + __this__ + "::appendEventInfo(" + var1 + ")");
            }
        
            // invoke native method
            Void __result__ = null;
            try {
                __this__.appendEventInfo(var1);
            } catch (Throwable throwable) {
                throwable.printStackTrace();
                if (getEnableLog()) {
                    Log.d("Current HEAP: ", getHEAP().toString());
                }
                __methodResult__.error(throwable.getMessage(), null, null);
                return;
            }
        
            __methodResult__.success(__result__);
        });
        // method
        put("com.tencent.rtmp.ui.TXCloudVideoView::showVideoDebugLog", (__args__, __methodResult__) -> {
            // args
            // ref arg
            Number var1 = (Number) ((Map<String, Object>) __args__).get("var1");
        
            // ref
            com.tencent.rtmp.ui.TXCloudVideoView __this__ = (com.tencent.rtmp.ui.TXCloudVideoView) ((Map<String, Object>) __args__).get("__this__");
        
            // print log
            if (getEnableLog()) {
                Log.d("fluttify-java", "fluttify-java: com.tencent.rtmp.ui.TXCloudVideoView@" + __this__ + "::showVideoDebugLog(" + var1 + ")");
            }
        
            // invoke native method
            Void __result__ = null;
            try {
                __this__.showVideoDebugLog(var1.intValue());
            } catch (Throwable throwable) {
                throwable.printStackTrace();
                if (getEnableLog()) {
                    Log.d("Current HEAP: ", getHEAP().toString());
                }
                __methodResult__.error(throwable.getMessage(), null, null);
                return;
            }
        
            __methodResult__.success(__result__);
        });
        // method
        put("com.tencent.rtmp.ui.TXCloudVideoView::setLogMargin", (__args__, __methodResult__) -> {
            // args
            // ref arg
            Number var1 = (Number) ((Map<String, Object>) __args__).get("var1");
            // ref arg
            Number var2 = (Number) ((Map<String, Object>) __args__).get("var2");
            // ref arg
            Number var3 = (Number) ((Map<String, Object>) __args__).get("var3");
            // ref arg
            Number var4 = (Number) ((Map<String, Object>) __args__).get("var4");
        
            // ref
            com.tencent.rtmp.ui.TXCloudVideoView __this__ = (com.tencent.rtmp.ui.TXCloudVideoView) ((Map<String, Object>) __args__).get("__this__");
        
            // print log
            if (getEnableLog()) {
                Log.d("fluttify-java", "fluttify-java: com.tencent.rtmp.ui.TXCloudVideoView@" + __this__ + "::setLogMargin(" + var1 + var2 + var3 + var4 + ")");
            }
        
            // invoke native method
            Void __result__ = null;
            try {
                __this__.setLogMargin(var1.floatValue(), var2.floatValue(), var3.floatValue(), var4.floatValue());
            } catch (Throwable throwable) {
                throwable.printStackTrace();
                if (getEnableLog()) {
                    Log.d("Current HEAP: ", getHEAP().toString());
                }
                __methodResult__.error(throwable.getMessage(), null, null);
                return;
            }
        
            __methodResult__.success(__result__);
        });
        // method
        put("com.tencent.rtmp.ui.TXCloudVideoView::setLogMarginRatio", (__args__, __methodResult__) -> {
            // args
            // ref arg
            Number var1 = (Number) ((Map<String, Object>) __args__).get("var1");
            // ref arg
            Number var2 = (Number) ((Map<String, Object>) __args__).get("var2");
            // ref arg
            Number var3 = (Number) ((Map<String, Object>) __args__).get("var3");
            // ref arg
            Number var4 = (Number) ((Map<String, Object>) __args__).get("var4");
        
            // ref
            com.tencent.rtmp.ui.TXCloudVideoView __this__ = (com.tencent.rtmp.ui.TXCloudVideoView) ((Map<String, Object>) __args__).get("__this__");
        
            // print log
            if (getEnableLog()) {
                Log.d("fluttify-java", "fluttify-java: com.tencent.rtmp.ui.TXCloudVideoView@" + __this__ + "::setLogMarginRatio(" + var1 + var2 + var3 + var4 + ")");
            }
        
            // invoke native method
            Void __result__ = null;
            try {
                __this__.setLogMarginRatio(var1.floatValue(), var2.floatValue(), var3.floatValue(), var4.floatValue());
            } catch (Throwable throwable) {
                throwable.printStackTrace();
                if (getEnableLog()) {
                    Log.d("Current HEAP: ", getHEAP().toString());
                }
                __methodResult__.error(throwable.getMessage(), null, null);
                return;
            }
        
            __methodResult__.success(__result__);
        });
        // method
        put("com.tencent.rtmp.ui.TXCloudVideoView::getUserId", (__args__, __methodResult__) -> {
            // args
        
        
            // ref
            com.tencent.rtmp.ui.TXCloudVideoView __this__ = (com.tencent.rtmp.ui.TXCloudVideoView) ((Map<String, Object>) __args__).get("__this__");
        
            // print log
            if (getEnableLog()) {
                Log.d("fluttify-java", "fluttify-java: com.tencent.rtmp.ui.TXCloudVideoView@" + __this__ + "::getUserId(" + "" + ")");
            }
        
            // invoke native method
            String __result__ = null;
            try {
                __result__ = __this__.getUserId();
            } catch (Throwable throwable) {
                throwable.printStackTrace();
                if (getEnableLog()) {
                    Log.d("Current HEAP: ", getHEAP().toString());
                }
                __methodResult__.error(throwable.getMessage(), null, null);
                return;
            }
        
            __methodResult__.success(__result__);
        });
        // method
        put("com.tencent.rtmp.ui.TXCloudVideoView::setUserId", (__args__, __methodResult__) -> {
            // args
            // ref arg
            String var1 = (String) ((Map<String, Object>) __args__).get("var1");
        
            // ref
            com.tencent.rtmp.ui.TXCloudVideoView __this__ = (com.tencent.rtmp.ui.TXCloudVideoView) ((Map<String, Object>) __args__).get("__this__");
        
            // print log
            if (getEnableLog()) {
                Log.d("fluttify-java", "fluttify-java: com.tencent.rtmp.ui.TXCloudVideoView@" + __this__ + "::setUserId(" + var1 + ")");
            }
        
            // invoke native method
            Void __result__ = null;
            try {
                __this__.setUserId(var1);
            } catch (Throwable throwable) {
                throwable.printStackTrace();
                if (getEnableLog()) {
                    Log.d("Current HEAP: ", getHEAP().toString());
                }
                __methodResult__.error(throwable.getMessage(), null, null);
                return;
            }
        
            __methodResult__.success(__result__);
        });
        // method
        put("com.tencent.rtmp.ui.TXCloudVideoView::px2dip", (__args__, __methodResult__) -> {
            // args
            // ref arg
            android.content.Context var0 = (android.content.Context) ((Map<String, Object>) __args__).get("var0");
            // ref arg
            Number var1 = (Number) ((Map<String, Object>) __args__).get("var1");
        
            // ref
        
        
            // print log
            if (getEnableLog()) {
                Log.d("fluttify-java", "fluttify-java: com.tencent.rtmp.ui.TXCloudVideoView::px2dip(" + var0 + var1 + ")");
            }
        
            // invoke native method
            Integer __result__ = null;
            try {
                __result__ = com.tencent.rtmp.ui.TXCloudVideoView.px2dip(var0, var1.floatValue());
            } catch (Throwable throwable) {
                throwable.printStackTrace();
                if (getEnableLog()) {
                    Log.d("Current HEAP: ", getHEAP().toString());
                }
                __methodResult__.error(throwable.getMessage(), null, null);
                return;
            }
        
            __methodResult__.success(__result__);
        });
        // method
        put("com.tencent.rtmp.ui.TXCloudVideoView::stop", (__args__, __methodResult__) -> {
            // args
            // ref arg
            boolean var1 = (boolean) ((Map<String, Object>) __args__).get("var1");
        
            // ref
            com.tencent.rtmp.ui.TXCloudVideoView __this__ = (com.tencent.rtmp.ui.TXCloudVideoView) ((Map<String, Object>) __args__).get("__this__");
        
            // print log
            if (getEnableLog()) {
                Log.d("fluttify-java", "fluttify-java: com.tencent.rtmp.ui.TXCloudVideoView@" + __this__ + "::stop(" + var1 + ")");
            }
        
            // invoke native method
            Void __result__ = null;
            try {
                __this__.stop(var1);
            } catch (Throwable throwable) {
                throwable.printStackTrace();
                if (getEnableLog()) {
                    Log.d("Current HEAP: ", getHEAP().toString());
                }
                __methodResult__.error(throwable.getMessage(), null, null);
                return;
            }
        
            __methodResult__.success(__result__);
        });
        // method
        put("com.tencent.rtmp.ui.TXCloudVideoView::onTouch", (__args__, __methodResult__) -> {
            // args
            // ref arg
            android.view.View var1 = (android.view.View) ((Map<String, Object>) __args__).get("var1");
            // ref arg
            android.view.MotionEvent var2 = (android.view.MotionEvent) ((Map<String, Object>) __args__).get("var2");
        
            // ref
            com.tencent.rtmp.ui.TXCloudVideoView __this__ = (com.tencent.rtmp.ui.TXCloudVideoView) ((Map<String, Object>) __args__).get("__this__");
        
            // print log
            if (getEnableLog()) {
                Log.d("fluttify-java", "fluttify-java: com.tencent.rtmp.ui.TXCloudVideoView@" + __this__ + "::onTouch(" + var1 + var2 + ")");
            }
        
            // invoke native method
            Boolean __result__ = null;
            try {
                __result__ = __this__.onTouch(var1, var2);
            } catch (Throwable throwable) {
                throwable.printStackTrace();
                if (getEnableLog()) {
                    Log.d("Current HEAP: ", getHEAP().toString());
                }
                __methodResult__.error(throwable.getMessage(), null, null);
                return;
            }
        
            __methodResult__.success(__result__);
        });
    }};

    @Override
    public PlatformView create(Context __, int id, Object params) {
        Map<String, Object> __args__ = (Map<String, Object>) params;

        ////////////////////////////////初始化AndroidView////////////////////////////////////////

        ////////////////////////////////初始化AndroidView////////////////////////////////////////

        com.tencent.rtmp.ui.TXCloudVideoView view = new com.tencent.rtmp.ui.TXCloudVideoView(activity);

        // 同时存放viewId和refId的对象, 供后续viewId转refId使用
        getHEAP().put(String.valueOf(Integer.MAX_VALUE - id), view);
        getHEAP().put(String.valueOf(System.identityHashCode(view)), view);
        return new PlatformView() {

            // add to HEAP
            @Override
            public View getView() {
                return view;
            }

            @Override
            public void dispose() {}
        };
    }
}
