패키지, 저장소 및 앱 카테고리 검색

패키지 상세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

카테고리

소스 저장소

이 패키지를 사용하는 프로젝트

아직 데이터가 없습니다.