• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

iampawan/Flute-Music-Player: Flute Music Player - First Open Source Flutter base ...

原作者: [db:作者] 来自: 网络 收藏 邀请

开源软件名称(OpenSource Name):

iampawan/Flute-Music-Player

开源软件地址(OpenSource Url):

https://github.com/iampawan/Flute-Music-Player

开源编程语言(OpenSource Language):

Java 56.3%

开源软件介绍(OpenSource Introduction):

Flute Music Player Plugin Only

Updated to androidx First Open Source Flutter based material design music player with audio plugin to play local music files.(Online Radio will be added soon.)

Features

  • Android (iOS Coming Soon)

    • Fetch local songs (Inbuilt Permission)
    • Beautiful UI with multiple themes(Coming Soon)
    • Animation
    • Full Fledged Example
    • play (local files)
    • stop
    • pause
    • seek
    • shuffle
    • Album Art
    • onComplete
    • onDuration / onCurrentPosition
  • Supported formats

Show some ❤️ and star the repo to support the project

  • Please note this is a plugin only. Actual project's link is below

Music Player Development Project

Flutter Beautiful Music Player

Screenshots

Usage

Example

To use this plugin :

  dependencies:
    flutter:
      sdk: flutter
    flute_music_player:
  • instantiate an Music Finder instance
//...
MusicFinder audioPlayer = new MusicFinder();
//...

Fetch Songs

//...
var songs = MusicFinder.allSongs();
//...

play, pause , stop, seek

play() async {
  final result = await audioPlayer.play(kUrl);
  if (result == 1) setState(() => playerState = PlayerState.playing);
}

// add a isLocal parameter to play a local file
playLocal() async {
  final result = await audioPlayer.play(kUrl);
  if (result == 1) setState(() => playerState = PlayerState.playing);
}


pause() async {
  final result = await audioPlayer.pause();
  if (result == 1) setState(() => playerState = PlayerState.paused);
}

stop() async {
  final result = await audioPlayer.stop();
  if (result == 1) setState(() => playerState = PlayerState.stopped);
}

// seek 5 seconds from the beginning
audioPlayer.seek(5.0);

duration, position, complete, error (temporary api)

The Dart part of the plugin listen for platform calls :

//...
audioPlayer.setDurationHandler((Duration d) => setState(() {
  duration = d;
}));

audioPlayer.setPositionHandler((Duration  p) => setState(() {
  position = p;
}));

audioPlayer.setCompletionHandler(() {
  onComplete();
  setState(() {
    position = duration;
  });
});

audioPlayer.setErrorHandler((msg) {
  print('audioPlayer error : $msg');
  setState(() {
    playerState = PlayerState.stopped;
    duration = new Duration(seconds: 0);
    position = new Duration(seconds: 0);
  });
});

##Credit for audioplayer plugin Erick Ghaumez Detailed Example for AudioPlayer

iOS

Alert: iOS implementation

This project is not implemented for ios yet.So wait for it or if you can contribute then please do help.

Pull Requests

I welcome and encourage all pull requests. It usually will take me within 24-48 hours to respond to any issue or request. Here are some basic rules to follow to ensure timely addition of your request:

  1. Match coding style (braces, spacing, etc.) This is best achieved using Reformat Code feature of Android Studio CMD+Option+L on Mac and CTRL + ALT + L on Linux + Windows .
  2. If its a feature, bugfix, or anything please only change code to what you specify.
  3. Please keep PR titles easy to read and descriptive of changes, this will make them easier to merge :)
  4. Pull requests must be made against develop branch. Any other branch (unless specified by the maintainers) will get rejected.
  5. Check for existing issues first, before filing an issue.
  6. Make sure you follow the set standard as all other projects in this repo do
  7. Have fun!

Created & Maintained By

Pawan Kumar (@imthepk) (Youtube) (Insta)

If you found this project helpful or you learned something from the source code and want to thank me, consider buying me a cup of

License

Copyright 2018 Pawan Kumar

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

For help getting started with Flutter, view our online documentation.

For help on editing plugin code, view the documentation.




鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap