Skip to content

Audio playback not working on Linux #43

@xrexy

Description

@xrexy

Bug Description

Audio playback does not work on Linux(or at least CachyOS). Songs load and appear in the player UI, but no audio plays and the progress bar stays at 0.

The root cause might be that just_audio requires platform-specific implementations for Linux. The app includes just_audio_windows for Windows support, but the equivalent Linux dependencies (just_audio_media_kit and media_kit_libs_linux) are missing. Additionally, for them to properly work JustAudioMediaKit.ensureInitialized() must be called before any AudioPlayer is instantiated.

Steps to Reproduce

  1. Build Musly for Linux using flutter build linux --release
  2. Launch the app and connect to a Navidrome server
  3. Browse library and select a song to play
  4. Observe that the song appears in the player bar but no audio plays, also everything in the UI shows it's playing
  5. Progress stays at 0 with no playback

Expected Behavior

Audio should play when a song is selected.

App Version

v1.0.4 (built from source on Linux)

Subsonic Server

Navidrome (via HTTPS reverse proxy)

Relevant Logs

[ERROR:flutter/runtime/dart_vm_initializer.cc(40)] Unhandled Exception: MissingPluginException(No implementation found for method init on channel com.ryanheise.just_audio.methods)

#0      MethodChannel._invokeMethod (package:flutter/src/services/platform_channel.dart:365)

#1      MethodChannelJustAudio.init (package:just_audio_platform_interface/method_channel_just_audio.dart:13)

#2      AudioPlayer._setPlatformActive.setPlatform (package:just_audio/just_audio.dart:1425)

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions