just_audio_windows_plus 0.3.0
just_audio_windows_plus: ^0.3.0 copied to clipboard
High-performance, seamless audio player for Flutter on Windows. Effortlessly play audio files, live streams, and playlists powered by native C++20 WinRT MediaPlayer.
0.3.0 #
- 64-bit Timestamp Safety: Introduced
TryGetInt64across all seeking, duration, and playlist mutations. StandardMessageCodec encodes timestamps exceeding 35.7 minutes ($2^{31}-1$ microseconds) asint64_t, which previously failed silently under 32-bitstd::get_if<int>. - Exact Microsecond Precision: Replaced lossy truncated millisecond arithmetic with exact 64-bit microsecond conversions (
TimeSpanToMicroseconds), preserving sub-millisecond timeline accuracy. - Event Channel Teardown Hygiene: Explicitly unregistered binary message handlers in
JustAudioEventSinkdestructor to eliminate dangling callbacks and post-disposal access violations (0xC0000005). - Defensive Playlist Mutations & Bounds: Fully bounds-checked
concatenatingMove,concatenatingInsertAll, andconcatenatingRemoveRangeto eliminate native WinRTE_BOUNDSexceptions during rapid playlist modifications. - Accurate Looping & Shuffling: Ensured
LoopMode.allloops single tracks seamlessly and synchronized internalloopModeandshuffleModestate broadcasts back to Flutter. - Native MediaEnded Event: Subscribed to WinRT
MediaPlayer.MediaEndedfor instantaneouscompletedstate signaling upon track finish. - Clipping Audio Source Hardening: Enforced non-negative start offsets and validated duration boundaries for
ClippingAudioSource. - Clean Codebase Hygiene: Removed obsolete legacy files (
url_code.hpp) and unused methods (GetPlayerByPlayerId). - Pub.dev Package Showcase: Added official package screenshots metadata in
pubspec.yaml.
0.2.0 #
- Platform Thread Dispatcher: Marshals all WinRT event callbacks (
PlaybackStateChanged,MediaFailed,CurrentItemChanged,ItemFailed) onto Flutter's UI platform thread via a Win32 message-only window (HWND_MESSAGE). Completely eliminates engine warnings:channel sent a message from native to Flutter on a non-platform thread. - C++20 Toolchain Upgrade: Built with
CMAKE_CXX_STANDARD 20to fix compilation errorC2338 / STL1011under Visual Studio 2026 / MSVC 14.51 where experimental coroutines are deprecated. - Defensive Playlist Transitions: Eliminates crashes and buffering errors when skipping tracks rapidly in
ConcatenatingAudioSource. Removed prematurebroadcastState()inseekToItem()and defensively guardedNaturalDuration,Position, andBufferingProgressWinRT property queries. - Source Swap Interruption Fix: Fixes
PlayerInterruptedException('Loading interrupted')on source swaps by preventing gaps during playlist clearing from being falsely reported asidle. - Duration Gated Completion: Requires
NaturalDuration() > 0before emittingcompleted(state 4), preventing freshly loaded clips from prematurely reporting completed. - Robust Exception Handling: Catches
winrt::hresult_errorandstd::exceptioninloadand method calls, returning proper Dart errors instead of crashing the process viastd::terminate. - SMTC De-conflict: Disables
mediaPlayer.CommandManager().IsEnabled(false)to prevent blank OS media overlays and desynchronized hardware media keys. - Debug-Gated Tracing: Verbose method call logging is gated behind
JAW_TRACEunder#ifndef NDEBUG, preventing console flood in production. - Thread-Safe Mutex Hardening: Added
std::mutex players_mutex_for the global player registry andstd::mutex sink_mutex_for event sinks. Safely destroys players outside lock to eliminate0xC0000005Access Violations on player disposal, stop, and hot restart. - Full Drop-in Compatibility: Fully implements the
just_audioplatform interface for Windows.
0.1.0 #
- Initial release of
just_audio_windows_plus. - Thread-Safe EventSink: Synchronized Flutter
EventSinkcalls viastd::mutexto prevent concurrent writes from background WinRT threadpool worker threads. - Atomic Player Lifecycle: Introduced
std::atomic<bool> disposed_andstd::recursive_mutex player_mutex_to safely coordinate player destruction and prevent Use-After-Free Access Violations (0xC0000005). - Safe Plugin Registrar: Protected the global player registry (
players_vector) with a dedicated mutex during concurrent creations and disposals. - Defensive WinRT Property Probing: Wrapped
NaturalDuration,BufferingProgress, andPositionaccess in exception handlers to gracefully handle transient states during playlist transitions. - Full Drop-in Compatibility: Fully implements the
just_audioplatform interface for Windows.