パッケージ、リポジトリ、アプリカテゴリを検索

パッケージ詳細v1.1.0

flutter_vap

アルファ動画アニメーションを再生するためのネイティブプラグインです

AndroidiOS
30日間ダウンロード
66
いいね数
11
Pub ポイント
125

パッケージをインストール

flutter pub add flutter_vap

パッケージ概要

公開情報に基づく選定ガイドです。参考としてご利用ください。

flutter_vap は、Flutter アプリケーションでアルファ動画アニメーションを再生できるネイティブプラグインです。開発者は、Android および iOS プラットフォームのアプリに、透過または半透過の動画コンテンツ(例:アルファチャンネル付きのアニメーションロゴやUI要素)をスムーズに統合できます。このプラグインは、効率的なレンダリングと滑らかなパフォーマンスを実現するためにネイティブ機能を利用しています。高品質なアニメーションビジュアルを備えた豊かでダイナミックなユーザーインターフェースを作成するのに特に役立ちます。

用途

  • アプリUIでアルファチャンネル動画を再生する
  • アニメーション付きのスプラッシュ画面を作成する
  • 透明なアニメーションによるゲームインターフェースの向上
  • ブランドアニメーションアセットの統合
  • 遷移に繊細なモーション効果を追加する

主な機能

  • アルファ動画再生をサポート
  • Android および iOS でのネイティブパフォーマンス
  • 透過性を伴うスムーズなレンダリング
  • Flutter pubを介した簡単な統合
  • 標準の動画フォーマットと互換性があります

適している対象

  • 視覚的に豊かなFlutterアプリを開発する開発者
  • アニメーションUIコンポーネントを実装するデザイナー
  • 透過性ビデオオーバーレイを必要とするアプリ
  • ゲームおよびエンターテイメントアプリケーション
  • ブランドデジタル体験

注意事項

  • 完全な機能を実現するには、ネイティブプラットフォームのセットアップが必要です
  • サポートされている動画コーデックに限定
  • ネイティブな依存関係により、アプリのサイズが増加する可能性があります
  • パフォーマンスはデバイスのハードウェアに依存します
  • Alpha動画ファイルは適切にエンコードされている必要があります

元の README

関連するソースリポジトリの README 原文のスナップショットです。最新の内容はリポジトリをご覧ください。

中文文档

Backdrop

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.

  • Compared with Webp and Apng animation solutions, it has the advantages of high compression rate (smaller material) and hardware decoding (faster decoding)
  • Compared with Lottie, it can achieve more complex animation effects (such as particle effects)
Preview

image

video for youtube

video for qiniu

apk download

Setup
flutter_vap: ${last_version}
How to use
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(),
),
  1. Play local video
  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;
  }
  1. Play asset video
  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;
  }
  1. Stop play
  VapController.stop()
  1. Queue play
  _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]));
  }
  1. Cancel queue playback
  QueueUtil.get("vapQueue").cancelTask();

Example

github

カテゴリー

ソースリポジトリ

このパッケージを使用しているプロジェクト

データはまだありません。