Libwinmedia implementation of just_audio.

Overview

just_audio_libwinmedia

The libwinmedia implementation of [just_audio][https://github.com/ryanheise/just_audio].

Installation

Add the just_audio_libwinmedia dependency to your pubspec.yaml alongside with just_audio:

dependencies:
  just_audio: any # substitute version number
  just_audio_libwinmedia: any # substitute version number

Features

Feature Windows Linux
read from URL
read from file
read from asset
read from byte stream
request headers
DASH
HLS
ICY metadata
buffer status/position
play/pause/seek
set volume/speed
clip audio
playlists
looping/shuffling
compose audio
gapless playback
report player errors
handle phonecall interruptions
buffering/loading options
set pitch
skip silence
equalizer
volume boost
Comments
  • startLoop should be set to false on Linux

    startLoop should be set to false on Linux

    When calling constructor of Player: https://github.com/bdlukaa/just_audio_libwinmedia/blob/21b43158e68eaa47abc9d783cc33b47e98e477ce/lib/src/just_audio_libwinmedia_real.dart#L50

    startLoop: !Platform.isLinux must be add as the comment of libwinmedia suggests: https://github.com/harmonoid/libwinmedia/blob/71a7f157a0d3ed9a6394e73de7585a7c9a3525fa/flutter/lib/src/player.dart#L147

    opened by Yesterday17 2
  • Example Please

    Example Please

    Hey. @bdlukaa

    Thanks for your work! It's not an issue, but could you please provide an example project (counter with .wav sound on FAB tap, will be enough)? It may help all of us in future debugging and issue reporting. Also, it will probably add some pub points to your package. Thanks in advance!

    opened by tsinis 2
  • Player on Linux blocks when setAudioSource

    Player on Linux blocks when setAudioSource

    This method blocks on(callstack): https://github.com/ryanheise/just_audio/blob/1c6598c0f3589baac4194e71b4d2885205f58ef4/just_audio/lib/just_audio.dart#L683 https://github.com/ryanheise/just_audio/blob/1c6598c0f3589baac4194e71b4d2885205f58ef4/just_audio/lib/just_audio.dart#L708 https://github.com/ryanheise/just_audio/blob/1c6598c0f3589baac4194e71b4d2885205f58ef4/just_audio/lib/just_audio.dart#L772-L773

    That's because processingStateStream did not receive any state change. When player opens: https://github.com/bdlukaa/just_audio_libwinmedia/blob/21b43158e68eaa47abc9d783cc33b47e98e477ce/lib/src/just_audio_libwinmedia_real.dart#L164 It calls Player::Open internally, which sets video.src and does not fire any events: https://github.com/harmonoid/libwinmedia/blob/71a7f157a0d3ed9a6394e73de7585a7c9a3525fa/linux/player.hpp#L326-L329

    opened by Yesterday17 0
  • [linux] `ProcessingStream` never fires event/changes state to `ProcessingState.completed` when track has finished playing

    [linux] `ProcessingStream` never fires event/changes state to `ProcessingState.completed` when track has finished playing

    For the latest version of webkit2gtk (2.36.1) ProcessingStream.listener never gets called for ProcessingState.completed event when the audio file has finished playing Also the state never gets set to ProcessingState.completed when the track has finished playing The entire scenario works perfectly fine if using older versions of webkit2gtk/libwebkit2gtk (all versions before latest gnome-41 & after gnome-36)

    Error occurring piece of code: https://github.com/KRTirtho/spotube/blob/3b7f7785b66e63dfe56b07c49d009441ad56219b/lib/provider/Playback.dart#L113-L130

    Tested on Operating Systems/Platforms:

    • Fedora 35 (Gnome-42)
    • Endeavour OS (Gnome-42)
    • Flatpak-Flathub with org.gnome.SDK@41
    opened by KRTirtho 0
  • Playback breaking in filenames containing Unicode

    Playback breaking in filenames containing Unicode

    Minimal reproduction project example repository

    To Reproduce

    1. Navigate to just-audio/example
    2. Modify the directory variable with the absolute path of the example folder
    3. Run the application
    4. The "loading" ring should never stop spinning

    Expected behavior Playback should occur almost immediately as is with the commented code below.

    Desktop

    • Windows 10 Version 10.0.19044 Build 19044

    Flutter SDK version

    • channel stable
    • version 2.10.3
    opened by LQR471814 0
  • UnimplementedError: disposeAllPlayers() has not been implemented.

    UnimplementedError: disposeAllPlayers() has not been implemented.

    Thanks very much for providing this package for desktop platforms.

    I'm trying to use just audio on linux, but it does not work well.

    my pubspec.yaml

    flutter:
      just_audio: ^0.9.20
      just_audio_libwinmedia: ^0.0.4
    
    ...
    
    assets:
      - audios/passing.wav
    
    

    my versions

    $ flutter doctor
    Doctor summary (to see all details, run flutter doctor -v):
    [✓] Flutter (Channel stable, 2.8.1, on Ubuntu 16.04.7 LTS 4.15.0-142-generic, locale en_US.UTF-8)
    [✓] Android toolchain - develop for Android devices (Android SDK version 29.0.3)
    [✓] Chrome - develop for the web
    [✓] Linux toolchain - develop for Linux desktop
    [✓] Android Studio (version 4.0)
    [✓] IntelliJ IDEA Community Edition (version 2019.1)
    [✓] VS Code (version 1.64.2)
    [✓] Connected device (2 available)
    
    $ uname -a
    Linux me-MS-7B24 4.15.0-142-generic #146~16.04.1-Ubuntu SMP Tue Apr 13 09:27:15 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux
    

    And my test code

          onPressed: () async {
            ...
            else{
              final player = AudioPlayer();
              await player.setAsset('audios/passing.wav');
              await player.play();
              await player.stop();
              await player.dispose();
            }
          }
    

    And Result on Pressed

    flutter: UnimplementedError: disposeAllPlayers() has not been implemented.
    1   0x7ffab2534237 /usr/lib/x86_64-linux-gnu/libjavascriptcoregtk-4.0.so.18(WTFCrash+0x17) [0x7ffab2534237]
    2   0x7ffab319a06f /usr/lib/x86_64-linux-gnu/libwebkit2gtk-4.0.so.37(+0x6d606f) [0x7ffab319a06f]
    3   0x7ffab31899f0 /usr/lib/x86_64-linux-gnu/libwebkit2gtk-4.0.so.37(+0x6c59f0) [0x7ffab31899f0]
    4   0x7ffab34111da /usr/lib/x86_64-linux-gnu/libwebkit2gtk-4.0.so.37(webkit_web_view_run_javascript+0xfa) [0x7ffab34111da]
    5   0x7ffab53c8c8a /home/jaehyung/programming/flutter_projects/diener_application/build/linux/x64/debug/bundle/lib/libwinmedia.so(_ZN7webview17gtk_webkit_engine4evalENSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE+0x5a) [0x7ffab53c8c8a]
    6   0x7ffab53bf678 /home/jaehyung/programming/flutter_projects/diener_application/build/linux/x64/debug/bundle/lib/libwinmedia.so(_ZN6Player9SetVolumeEf+0x98) [0x7ffab53bf678]
    7   0x7ffab53c178d /home/jaehyung/programming/flutter_projects/diener_application/build/linux/x64/debug/bundle/lib/libwinmedia.so(PlayerSetVolume+0x3d) [0x7ffab53c178d]
    8   0x7ffad7b8597b [0x7ffad7b8597b]
    Lost connection to device.
    

    Thank you!

    opened by jaehyung-po 0
  • Windows HLS support is not actually present

    Windows HLS support is not actually present

    To which pages does your suggestion apply?

    Quote the sentences(s) from the documentation to be improved (if any)

    "Windows HLS supported"

    Describe your suggestion

    According to https://github.com/ryanheise/just_audio/issues/103#issuecomment-922405803 and my tests, HLS does not work on Windows, it just keeps buffering and will not play.

    Tested with https://devstreaming-cdn.apple.com/videos/streaming/examples/img_bipbop_adv_example_fmp4/master.m3u8, works with Android.

    audioPlayer?.setAudioSource(
          HlsAudioSource(
            Uri.parse(
                "https://devstreaming-cdn.apple.com/videos/streaming/examples/img_bipbop_adv_example_fmp4/master.m3u8"),
          ),
    
    opened by aguilaair 2
  • Return duration on load

    Return duration on load

    Currently just_audio_libwinmedia returns a duration of zero when loading any media. It seems libwinmedia has the ability to listen to duration changes, so maybe this could be used to listen for, and return, the duration in just_audio_libwinmedia (not sure if there might be a better way...)

    enhancement 
    opened by ryanheise 0
Owner
Bruno D'Luka
I make mobile apps. Flutter is in my 💙
Bruno D'Luka
a python-like bytes_io implementation for dart

bytes_io A python-like bytes_io implementation for dart A powerful helper for processing raw binary data Usage A simple usage example: import 'package

Kelly 5 Aug 31, 2022
Paper is a implementation of Flx Design System for Flutter

Paper is a implementation of Flx Design System for Flutter. Installing Add a lines like this to your pubspec.yaml. dependencies: paper: git:

Flx Team 3 Nov 21, 2021
A bugless implementation of BigDecimal in Dart based on Java's BigDecimal

big_decimal A bugless implementation of BigDecimal in Dart based on Java's BigDecimal Installation Add the following to your pubspec.yaml: dependencie

null 18 Jul 27, 2022
Flutter implementation of Figma's corner smoothing.

Figma Squircle Flutter implementation of Figma's corner smoothing. Usage Decoration The SmoothRectangleBorder can be provided to a regular ShapeDecora

Aloïs Deniel 88 Dec 14, 2022
Learn Flutter on Flutter! A widget directory with implementation samples!

Fludget Browse through a variety of widgets used in flutter This application is developed to learn Flutter using Flutter. Different widgets used in fl

ACM VIT 29 Nov 23, 2022
Implementation of FIrebase CRUD App.

firebase_crud_app_flutter A new Flutter application. Getting Started This project is a starting point for a Flutter application. A few resources to ge

Chinmay Munje 0 Nov 4, 2021
Music reader for online data (Google Drive implementation). Cross platform goal : iOS, Android, MacOS, Windows

omusic A new Flutter project. Getting Started This project is a starting point for a Flutter application. A few resources to get you started if this i

JeanNicolasdeLamballerie 0 Nov 30, 2021
Actor model implementation in Dart. This package makes it easier to work with isolates, create clusters of isolates.

Actor model implementation in Dart Languages: Introduction About Theater Installing What is Actor Notes about the actors Actor system Actor tree Using

Gleb Batykov 39 Nov 14, 2022
A Flutter package with custom implementation of Drawer

Flutter Zoom Drawer A Flutter package with custom implementation of the Side Menu (Drawer) Getting Started To start using this package, add flutter_zo

null 335 Dec 22, 2022
A basic implementation of the robot testing pattern for integration/e2e tests

robot A new Flutter project. Getting Started This project is a starting point for a Flutter application. A few resources to get you started if this is

Samuel Abada 3 Dec 13, 2021
This project is a implementation of a collection of terminal server samples in Dart

Terminal Server Samples ⭐ Star me on GitHub — it helps! This project is a implementation of a collection of terminal server samples in Dart licensed u

Javier Montenegro 0 Nov 26, 2021
Implementation and architecture for Firebase Authentication

fluttercompoundapp A new Flutter application. Getting Started This project is a starting point for a Flutter application. A few resources to get you s

Emmanuel Ahuno 0 Nov 27, 2021
Flutter implementation of Google Mobile Vision.

flutter_mobile_vision Flutter implementation for Google Mobile Vision. Based on Google Mobile Vision. Android Samples -=- iOS Samples Liked? ⭐ Star th

Eduardo Folly 450 Jan 6, 2023
Actively maintained, community-driven chat UI implementation with an optional Firebase BaaS.

Flutter Chat UI Actively maintained, community-driven chat UI implementation with an optional Firebase BaaS. Flyer Chat is a platform for creating in-

Flyer Chat 662 Jan 7, 2023
Backdrop implementation in flutter.

backdrop Backdrop implementation in flutter. This widget is in active development. Any contribution, idea, criticism or feedback is welcomed. Quick li

Harsh Bhikadia 6 Jan 6, 2022
Lightweight SMS Misr gateway implementation in dart (unofficial).

palestine_sms_misr (unofficial) Part of PalestineDevelopers Lightweight SMS Misr gateway implementation in dart (unofficial). Table Of Contents Featur

Palestine Developers 3 Mar 10, 2022
Dart grocery store / cashier line simulation implementation

Grocery Store Cashier Line Simulation Quick Read Dart implementation of a grocery store cashier line simulation. $ dart bin/grocerysimulator.dart inpu

Danilo 0 Jan 13, 2022
Collection of extension function of just_audio package for auto-handle caching

just_audio_cache Collection of extension function of just_audio package for auto-handle caching audio files How to use The premise is you already have

Yoda 10 Aug 24, 2022
Just_audio: a feature-rich audio player for Android, iOS, macOS and web

just_audio just_audio is a feature-rich audio player for Android, iOS, macOS and web. Mixing and matching audio plugins The flutter plugin ecosystem c

Ensar Yusuf Yılmaz 2 Jun 28, 2022
Get It - Simple direct Service Locator that allows to decouple the interface from a concrete implementation and to access the concrete implementation from everywhere in your App. Maintainer: @escamoteur

❤️ Sponsor get_it This is a simple Service Locator for Dart and Flutter projects with some additional goodies highly inspired by Splat. It can be used

Flutter Community 1k Jan 1, 2023