tancent_vap library
Tencent VAP Flutter Plugin
A Flutter plugin for playing VAP (Video Animation Player) animations from Tencent. VAP is a high-performance video animation format that supports transparent backgrounds and dynamic content injection.
This library provides:
- VapView widget for displaying VAP animations
- VapController for programmatic control of animations
- VAPContent classes for dynamic content injection
- VAPConfigs for animation configuration data
Example usage:
VapView(
scaleType: ScaleType.fitCenter,
repeat: -1,
onViewCreated: (controller) {
controller.playAsset('animations/sample.mp4');
},
)
Classes
- ImageAssetContent
- Content type for Flutter asset image injection into VAP animations.
- ImageBase64Content
- Content type for base64-encoded image injection into VAP animations.
- ImageFileContent
- Content type for local file image injection into VAP animations.
- ImageURLContent
- Content type for remote URL image injection into VAP animations.
- TextContent
- Content type for dynamic text injection into VAP animations.
- VAPConfigs
- Configuration data for VAP animations.
- VAPContent
- Abstract base class for dynamic content that can be injected into VAP animations.
- VapController
- Controller for programmatic management of VAP animations.
- VapView
- A widget that displays Tencent VAP (Video Animation Player) animations.
Enums
- ScaleType
- Defines how video content should be scaled within its container.
- VideoOrientation
- Defines the orientation of video content.
Typedefs
- OnFailed = void Function(int code, String type, String? message)
- Callback function for animation failure events.
- OnVideoComplete = void Function()
- Callback function for animation completion events.
- OnVideoConfigReady = void Function(VAPConfigs configs)
- Callback function for animation configuration ready events.
- OnVideoDestroy = void Function()
- Callback function for animation destruction events.
- OnVideoRender = void Function(int frameInfo, VAPConfigs? configs)
- Callback function for frame rendering events.
- OnVideoStart = void Function()
- Callback function for animation start events.