dependencies{implementation 'com.tencent.mediacloud:TencentEffect_S1-04:latest.release'}
../src/main/assetsディレクトリ下にコピーします。<uses-native-libraryandroid:name="libOpenCL.so"android:required="true" />//ここでtrueは、このライブラリがないとアプリが正常に動作しないことを意味します。システムは、このライブラリがないデバイスには、アプリケーションのインストールを許可しません。//falseは、アプリケーションがこのライブラリ (存在する場合)を使用できますが、特に(必要な場合)このライブラリなしで実行することを意味します。このライブラリが存在しなくても、システムはアプリケーションのインストールを許可します。「false」を使用する場合は、ライブラリが存在しない状況を適切に処理する必要があります。//Android公式サイトの説明:%!s(<nil>)

no xxx methodの異常が生じることがあります。-keep class com.tencent.xmagic.** { *;}-keep class org.light.** { *;}-keep class org.libpag.** { *;}-keep class org.extra.** { *;}-keep class com.gyailib.**{ *;}-keep class com.tencent.cloud.iai.lib.** { *;}-keep class com.tencent.beacon.** { *;}-keep class com.tencent.qimei.** { *;}

tencent_effect_flutter:git:url: https://github.com/TencentCloud/tencenteffect-sdk-flutter
tencent_effect_flutter:path: ../
TXLivePluginManager.register(new XmagicProcesserFactory());
XmagicProcesserFactory *instance = [[XmagicProcesserFactory alloc] init];[TXLivePluginManager registerWithCustomBeautyProcesserFactory:instance];

String dir = await BeautyDataManager.getInstance().getResDir();TXLog.printlog('ファイルパス:$dir');TencentEffectApi.getApi()?.initXmagic(dir,(reslut) {_isInitResource = reslut;callBack.call(reslut);if (!reslut) {Fluttertoast.showToast(msg: "リソースの初期化に失敗しました");}}); TencentEffectApi.getApi()?.initXmagic((reslut) {if (!reslut) {Fluttertoast.showToast(msg: "リソースの初期化に失敗しました");}});
TencentEffectApi.getApi()?.setLicense(licenseKey, licenseUrl,(errorCode, msg) {TXLog.printlog("認証結果を印刷します errorCode = $errorCode msg = $msg");if (errorCode == 0) {//認証に成功しました}});
///美顔操作を有効にしますvar enableCustomVideo = await _livePusher?.enableCustomVideoProcess(true);
TencentEffectApi.getApi()?.updateProperty(_xmagicProperty!);///_xmagicPropertyではBeautyDataManager.getInstance().getAllPannelData();によってすべての属性を取得できます。美顔属性を使用したい場合はupdatePropertyメソッドによって属性を設定できます。
TencentEffectApi.getApi()?.onPause();
TencentEffectApi.getApi()?.onResume();
TencentEffectApi.getApi()?.setOnCreateXmagicApiErrorListener((errorMsg, code) {TXLog.printlog("美顔オブジェクトの作成にエラーが発生しました errorMsg = $errorMsg , code = $code");}); ///美顔を作成する前に設定が必要です
TencentEffectApi.getApi()?.setAIDataListener(XmagicAIDataListenerImp());
TencentEffectApi.getApi()?.setTipsListener(XmagicTipsListenerImp());
TencentEffectApi.getApi()?.setYTDataListener((data) {TXLog.printlog("setYTDataListener $data");});
TencentEffectApi.getApi()?.setOnCreateXmagicApiErrorListener(null);TencentEffectApi.getApi()?.setAIDataListener(null);TencentEffectApi.getApi()?.setYTDataListener(null);TencentEffectApi.getApi()?.setTipsListener(null);
android/xmagic/src.mian/assets/MotionRes/2dMotionResディレクトリ下に置く必要があります。
ios/Runner/xmagic/2dMotionRes.bundleディレクトリ下に追加します。

フィードバック