Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 19 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Gift AR Flutter

Gift AR Flutter plugin project.
English | [简体中文](./README_CN.md)

## OverView

Expand All @@ -13,9 +13,23 @@ Gift AR provides clients with efficient and smooth animation effects playback so
| High device compatibility | Deeply optimized playback performance, compatible with mid-to-low end devices, ensuring smooth user experience across various hardware configurations. |
| High security | Encrypt special effect resources to prevent piracy and tampering, ensuring customer content and asset security. |

## Directory Structure

This directory contains the demo source code of the Gift AR SDK for Android, which shows you how to call the APIs to implement basic features.

```
├── android // The android source code for plugin.
├── ios // The iOS source code for plugin.
├── lib // The dart source code for plugin.
└── example // The demo source code
├── android // The android demo source code
├── ios // The ios demo source code
└── lib // The dart demo source code
```

## Related Documents

- [Quick Run Demo](./doc/Quick%20Run%20Demo-EN.md)
- [Integration Guide](./doc/Integration%20Guide_EN.md)
- [User Documentation](./doc/User%20Documentation-EN.md)
- [API Documentation](./doc/API%20Documentation-EN.md)
- [Quick Run Demo](https://www.tencentcloud.com/document/product/1143/73974)
- [Integration Guide](https://www.tencentcloud.com/document/product/1143/73975)
- [User Documentation](https://www.tencentcloud.com/document/product/1143/73976)
- [API Documentation](https://www.tencentcloud.com/document/product/1143/73977)
36 changes: 36 additions & 0 deletions README_CN.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
# 腾讯礼物动画特效SDK Flutter插件

简体中文| [English](./README.md)

## 概述

腾讯礼物动画特效SDK致力于为客户提供高效、流畅的动画特效播放解决方案。针对动画播放卡顿、崩溃、高耗电、性能占用过高、低端机表现不佳等行业难题,我们通过技术优化和创新,打造了一款高性能、高兼容性、高安全性的动画特效播放工具。

| 特性 | 描述 |
|---------|----------------------------------------------------------------|
| 多格式特效支持 | 支持 MP4、VAP、SVGA、PAG、WebP、Lottie、PNG 序列图等多种格式的特效动画转换后播放,满足多样化需求 |
| 高性能播放 | 在播放复杂特效时,性能占用更低,确保多动画同时播放流畅,尤其在低端设备上表现优异。 |
| 设备兼容性强 | 深度优化播放性能,兼容中低端设备,确保用户在各种硬件配置下都能流畅体验。 |
| 高安全性 | 特效资源采用加密处理,防止盗版和篡改,保障客户内容资产安全。 |


## 工程目录结构说明

本目录包含腾讯礼物动画特效SDK Flutter 插件 和 Demo 源代码,主要演示接口如何调用以及最基本的功能。

```
├── android // 插件android源代码
├── ios // 插件iOS源代码
├── lib // 插件dart源代码
└── example // 相关demo代码
├── android // android的demo源代码
├── ios // iOS的demo源代码
└── lib // dart的demo源代码
```

## 相关文档

- [快速跑通Demo](https://cloud.tencent.com/document/product/616/123948)
- [集成文档](https://cloud.tencent.com/document/product/616/123945)
- [使用文档](https://cloud.tencent.com/document/product/616/123946)
- [API文档](https://cloud.tencent.com/document/product/616/123947)
Original file line number Diff line number Diff line change
Expand Up @@ -1051,6 +1051,9 @@ public interface FTCEffectAnimViewApi {
@NonNull
String getSdkVersion();

@NonNull
FTCEffectAnimInfoMsg preloadTCAnimInfo(@NonNull String playUrl, @NonNull FTCEffectConfigMsg config);

/** The codec used by FTCEffectAnimViewApi. */
static @NonNull MessageCodec<Object> getCodec() {
return PigeonCodec.INSTANCE;
Expand Down Expand Up @@ -1498,6 +1501,30 @@ static void setUp(@NonNull BinaryMessenger binaryMessenger, @NonNull String mess
String output = api.getSdkVersion();
wrapped.add(0, output);
}
catch (Throwable exception) {
wrapped = wrapError(exception);
}
reply.reply(wrapped);
});
} else {
channel.setMessageHandler(null);
}
}
{
BasicMessageChannel<Object> channel =
new BasicMessageChannel<>(
binaryMessenger, "dev.flutter.pigeon.flutter_effect_player.FTCEffectAnimViewApi.preloadTCAnimInfo" + messageChannelSuffix, getCodec());
if (api != null) {
channel.setMessageHandler(
(message, reply) -> {
ArrayList<Object> wrapped = new ArrayList<>();
ArrayList<Object> args = (ArrayList<Object>) message;
String playUrlArg = (String) args.get(0);
FTCEffectConfigMsg configArg = (FTCEffectConfigMsg) args.get(1);
try {
FTCEffectAnimInfoMsg output = api.preloadTCAnimInfo(playUrlArg, configArg);
wrapped.add(0, output);
}
catch (Throwable exception) {
wrapped = wrapError(exception);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -164,6 +164,13 @@ public void setRate(@NonNull Double rate) {
mEffectView.getTCEffectPlayer().setRate(rate.floatValue());
}

@NonNull
@Override
public TCEffectMessages.FTCEffectAnimInfoMsg preloadTCAnimInfo(@NonNull String playUrl, @NonNull TCEffectMessages.FTCEffectConfigMsg config) {
TCEffectConfig effectConfig = FEffectViewHelper.transConfigFromMsg(config);
return FEffectViewHelper.transAnimInfoToMsg(TCEffectAnimView.preloadTCAnimInfo(playUrl, effectConfig));
}

@NonNull
@Override
public String getSdkVersion() {
Expand Down
Loading