v1.1.0
flutter_vap
알파 비디오 애니메이션을 재생하기 위한 네이티브 플러그인입니다
11좋아요 4330일 다운로드125Pub 점수
AndroidiOS
Vap을 기반으로 알파 비디오 애니메이션 재생
{"sdk":"flutter"}{"sdk":"flutter"}아래는 영문 원문 스냅샷입니다. 최신 내용은 GitHub에서 확인하세요.
Transparent video animation is currently one of the more popular implementations of animation. Major manufacturers have also open sourced their own frameworks. In the end, we chose Tencent vap, which supports Android, IOS, and Web, and provides natural convenience for us to encapsulate flutter_vap. Provides a tool to generate a video with an alpha channel from a frame picture, which is simply awesome.
VAP(Video Animation Player)is developed by Penguin E-sports and is used to play cool animations.
image
flutter_vap: ${last_version}
import 'package:flutter_vap/flutter_vap.dart';
IgnorePointer(
// VapView can set the width and height through the outer package Container() to limit the width and height of the pop-up video
child: VapView(),
),
import 'package:flutter_vap/flutter_vap.dart';
/// return: play error: {"status": "failure", "errorMsg": ""}
/// play complete: {"status": "complete"}
Future<Map<dynamic, dynamic>> _playFile(String path) async {
if (path == null) {
return null;
}
var res = await VapController.playPath(path);
if (res["status"] == "failure") {
showToast(res["errorMsg"]);
}
return res;
}
Future<Map<dynamic, dynamic>> _playAsset(String asset) async {
if (asset == null) {
return null;
}
var res = await VapController.playAsset(asset);
if (res["status"] == "failure") {
showToast(res["errorMsg"]);
}
return res;
}
VapController.stop()
_queuePlay() async {。
// Simultaneously call playback in multiple places, making the queue perform playback.
QueueUtil.get("vapQueue").addTask(() => VapController.playPath(downloadPathList[0]));
QueueUtil.get("vapQueue").addTask(() => VapController.playPath(downloadPathList[1]));
}
QueueUtil.get("vapQueue").cancelTask();
Example