play 0.0.14 copy "play: ^0.0.14" to clipboard
play: ^0.0.14 copied to clipboard

discontinued

a library dart simple for play audio or video any format on cross platform.

Play library #

Fast, Enjoyable & Customizable Play library

Pub Version

Play Library untuk memutar video dan audio cross platform dengan mudah hanya menambah code pada dart, example sudah ada di

Features #

  • 🚀 Cross platform: mobile, desktop
  • ⚡ Great performance
  • ❤️ Simple, powerful, & intuitive API

Demo #

https://user-images.githubusercontent.com/82513502/204106088-90c8d756-fbee-4724-9087-46bc99e69a00.mp4

https://user-images.githubusercontent.com/82513502/204106197-4bc3d9ba-f374-40ff-9913-7f4ffd40b530.mp4

Install Library #

dart pub add play
flutter pub add play

To-Do #

  1. Cross platform support (Android,iOS,Linux, Windows)
  2. Easy Play Video and Audio
  3. Custom View Audio And Video
  4. Realtime Player Like (call, streaming)
  5. Custom Encoding & Decoding Audio & Video

Quickstart #

add this in main function


void main() async {
  ---
  await playInitialize();
  --- 
}

Audio Player


Scaffold(

  ---
  Audio(
    audioData: AudioData.file(
      file: File(path),
    ),
    isAutoStart: false,
    audioViewBuilder: (BuildContext context, Widget child, Audio audio, AudioState audioState) {
      return child;
    }
  );
  ---

)

Video Player

Scaffold(

  ---
  Video(
    videoData: VideoData.file(
      file: File(path),
    ),
    isAutoStart: false,
    videoViewBuilder: (BuildContext context, Widget child, Video video, VideoState videoState) {
      return child;
    }
  );
  ---

)

Docs #

I use 3 libraries so your document can be seen here

  1. audioplayers
  2. video_player
  3. dart_vlc

Audio #

Documentation audio

  1. AudioData
  • file
    AudioData.file(
      file: File("./path_to_audio.mp3"),
    )
    
  • asset
    AudioData.asset(
      asset: "assets/audio/audio.mp3",
    )
    
  • network
    AudioData.network(
      url: "https://example.com/example.mp3",
    )
    

Video #

Documentation video


Scaffold(
  child: Video(
    videoData: VideoData.file(
      file: File(path),
    ),
    isAutoStart: false,
    videoViewBuilder: (BuildContext context, Widget child, Video video, VideoState videoState) {
      /// custom view
      return child;
    }
  );
)
  1. videoData
  • file
    VideoData.file(
      file: File("./path_to_video.mp4"),
    )
    
  • asset
    VideoData.asset(
      asset: "assets/videos/video.mp4",
    )
    
  • network
    VideoData.network(
      url: "https://example.com/example.mp4",
    )
    
  1. isAutoStart

    • true if you want auto play set data to true
    • false if you don't want auto play set data to true
  2. videoViewBuilder

19
likes
0
pub points
67%
popularity

Publisher

unverified uploader

a library dart simple for play audio or video any format on cross platform.

Homepage
Repository (GitHub)
View/report issues

License

unknown (LICENSE)

Dependencies

audioplayers, dart_vlc, flutter, universal_io, video_player

More

Packages that depend on play