FLUTTER ECOSYSTEM

iamSahdeep/FlutterVisualizers

一個用於在 Android 上可視化音訊的 Flutter 插件

FlutterVisualizers 專案封面
Stars
104
Forks
27
最近推送(UTC)
2021年11月17日
專案狀態
未封存
Sahdeep Singh GitHub avatar
GITHUB User

Sahdeep Singh ↗

New Delhi
語言DartJavaObjective-CRuby

技術主題

此儲存庫發佈的套件

使用的依賴

依賴清單 1 項
  • flutter{"sdk":"flutter"}

原始 README

以下為英文專案原文快照,最新內容請造訪 GitHub。

展開 / 收合專案 README

flutter_visualizers (Depreciated & Not maintaining)Pub

A Flutter plugin to Visualize the audio being played (only android).

Usage

  • Add this to your pubspec.yaml

    dependencies:
    flutter_visualizers: ^0.0.2
    
    
  • Get package from Pub:

    flutter packages get
    
  • Import it in your file

    import 'package:flutter_visualizers/flutter_visualizers.dart';
    

Example

  • Firstly, get a audioSessionID from your native android Mediaplayer.

    player.getAudioSessionId()
    
  • Simply Include this code in body

    new Visualizer(
            builder: (BuildContext context, List<int> wave) {
              return new CustomPaint(
                painter: new LineVisualizer(
                  waveData: wave,
                  height: MediaQuery.of(context).size.height,
                  width : MediaQuery.of(context).size.width,
                  color: Colors.blueAccent,
                ),
                child: new Container(),
              );
            },
            id: playerID,
          )
    

    Here playerId is the AudioSessionId which id needed to initialize the Visualizer. (Required Audio Recording Permission in Android)

    See the Complete Example

Sample

Video

Credits

License

Copyright [2019] [Sahdeep Singh]

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

   http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
Getting Started with Flutter

This project is a starting point for a Flutter plug-in package, a specialized package that includes platform-specific implementation code for Android and/or iOS.

For help getting started with Flutter, view our online documentation, which offers tutorials, samples, guidance on mobile development, and a full API reference.