mirror of
https://github.com/feeddeck/feeddeck.git
synced 2026-03-09 07:02:01 -05:00
[podcast] Fix Audio Playback on Windows and Linux (#182)
Fix the audio playback on Windows and Linux for the podcast player by adding the missing initialization for `JustAudioMediaKit`.
This commit is contained in:
@@ -7,6 +7,7 @@ import 'package:flutter/material.dart';
|
||||
import 'package:flutter_native_splash/flutter_native_splash.dart';
|
||||
import 'package:flutter_web_plugins/url_strategy.dart';
|
||||
import 'package:just_audio_background/just_audio_background.dart';
|
||||
import 'package:just_audio_media_kit/just_audio_media_kit.dart';
|
||||
import 'package:media_kit/media_kit.dart';
|
||||
import 'package:provider/provider.dart';
|
||||
import 'package:window_manager/window_manager.dart';
|
||||
@@ -50,6 +51,7 @@ void main() async {
|
||||
/// Initialize the [media_kit] packages, so that we can play audio and video
|
||||
/// files.
|
||||
MediaKit.ensureInitialized();
|
||||
JustAudioMediaKit.ensureInitialized();
|
||||
|
||||
/// Initialize the [just_audio_background] package, so that we can play audio
|
||||
/// files in the background.
|
||||
|
||||
@@ -90,6 +90,11 @@ set_target_properties(${BINARY_NAME}
|
||||
# them to the application.
|
||||
include(flutter/generated_plugins.cmake)
|
||||
|
||||
# Replace the default memory allocator with mimalloc to avoid memory leaks.
|
||||
# See:
|
||||
# - https://github.com/Pato05/just_audio_media_kit#use-mimalloc-from-media-kits-readme
|
||||
# - https://github.com/media-kit/media-kit#utilize-mimalloc
|
||||
target_link_libraries(${BINARY_NAME} PRIVATE ${MIMALLOC_LIB})
|
||||
|
||||
# === Installation ===
|
||||
# By default, "installing" just makes a relocatable bundle in the build
|
||||
|
||||
Reference in New Issue
Block a user