├── .github ├── FUNDING.yml ├── ISSUE_TEMPLATE │ ├── config.yml │ ├── documentation-request.md │ ├── feature_request.md │ └── bug-report.md └── workflows │ ├── lock.yml │ └── auto-close.yml ├── just_audio ├── example │ ├── linux │ │ ├── .gitignore │ │ ├── main.cc │ │ ├── flutter │ │ │ ├── generated_plugin_registrant.h │ │ │ ├── generated_plugin_registrant.cc │ │ │ ├── generated_plugins.cmake │ │ │ └── CMakeLists.txt │ │ └── my_application.h │ ├── android │ │ ├── settings_aar.gradle │ │ ├── .gitignore │ │ ├── app │ │ │ ├── src │ │ │ │ ├── main │ │ │ │ │ ├── res │ │ │ │ │ │ ├── mipmap-hdpi │ │ │ │ │ │ │ └── ic_launcher.png │ │ │ │ │ │ ├── mipmap-mdpi │ │ │ │ │ │ │ └── ic_launcher.png │ │ │ │ │ │ ├── mipmap-xhdpi │ │ │ │ │ │ │ └── ic_launcher.png │ │ │ │ │ │ ├── mipmap-xxhdpi │ │ │ │ │ │ │ └── ic_launcher.png │ │ │ │ │ │ ├── mipmap-xxxhdpi │ │ │ │ │ │ │ └── ic_launcher.png │ │ │ │ │ │ ├── values │ │ │ │ │ │ │ └── styles.xml │ │ │ │ │ │ └── drawable │ │ │ │ │ │ │ └── launch_background.xml │ │ │ │ │ ├── java │ │ │ │ │ │ └── com │ │ │ │ │ │ │ └── ryanheise │ │ │ │ │ │ │ └── just_audio_example │ │ │ │ │ │ │ └── MainActivity.java │ │ │ │ │ └── AndroidManifest.xml │ │ │ │ ├── debug │ │ │ │ │ └── AndroidManifest.xml │ │ │ │ └── profile │ │ │ │ │ └── AndroidManifest.xml │ │ │ └── build.gradle │ │ ├── gradle.properties │ │ ├── gradle │ │ │ └── wrapper │ │ │ │ └── gradle-wrapper.properties │ │ ├── build.gradle │ │ └── settings.gradle │ ├── lib │ │ ├── media_kit_stub.dart │ │ └── media_kit_impl.dart │ ├── audio │ │ └── nature.mp3 │ ├── web │ │ ├── favicon.png │ │ ├── icons │ │ │ ├── Icon-192.png │ │ │ └── Icon-512.png │ │ ├── manifest.json │ │ └── index.html │ ├── macos │ │ ├── .gitignore │ │ ├── Runner │ │ │ ├── Configs │ │ │ │ ├── Debug.xcconfig │ │ │ │ ├── Release.xcconfig │ │ │ │ ├── Warnings.xcconfig │ │ │ │ └── AppInfo.xcconfig │ │ │ ├── Assets.xcassets │ │ │ │ └── AppIcon.appiconset │ │ │ │ │ ├── app_icon_128.png │ │ │ │ │ ├── app_icon_16.png │ │ │ │ │ ├── app_icon_256.png │ │ │ │ │ ├── app_icon_32.png │ │ │ │ │ ├── app_icon_512.png │ │ │ │ │ ├── app_icon_64.png │ │ │ │ │ ├── app_icon_1024.png │ │ │ │ │ └── Contents.json │ │ │ ├── Release.entitlements │ │ │ ├── AppDelegate.swift │ │ │ ├── MainFlutterWindow.swift │ │ │ ├── DebugProfile.entitlements │ │ │ └── Info.plist │ │ ├── Flutter │ │ │ ├── Flutter-Debug.xcconfig │ │ │ └── Flutter-Release.xcconfig │ │ ├── Runner.xcworkspace │ │ │ ├── contents.xcworkspacedata │ │ │ └── xcshareddata │ │ │ │ └── IDEWorkspaceChecks.plist │ │ ├── Runner.xcodeproj │ │ │ └── project.xcworkspace │ │ │ │ └── xcshareddata │ │ │ │ └── IDEWorkspaceChecks.plist │ │ └── Podfile │ ├── ios │ │ ├── Flutter │ │ │ ├── Debug.xcconfig │ │ │ ├── Release.xcconfig │ │ │ └── AppFrameworkInfo.plist │ │ ├── Runner │ │ │ ├── AppDelegate.h │ │ │ ├── Assets.xcassets │ │ │ │ ├── LaunchImage.imageset │ │ │ │ │ ├── LaunchImage.png │ │ │ │ │ ├── LaunchImage@2x.png │ │ │ │ │ ├── LaunchImage@3x.png │ │ │ │ │ ├── README.md │ │ │ │ │ └── Contents.json │ │ │ │ └── AppIcon.appiconset │ │ │ │ │ ├── Icon-App-20x20@1x.png │ │ │ │ │ ├── Icon-App-20x20@2x.png │ │ │ │ │ ├── Icon-App-20x20@3x.png │ │ │ │ │ ├── Icon-App-29x29@1x.png │ │ │ │ │ ├── Icon-App-29x29@2x.png │ │ │ │ │ ├── Icon-App-29x29@3x.png │ │ │ │ │ ├── Icon-App-40x40@1x.png │ │ │ │ │ ├── Icon-App-40x40@2x.png │ │ │ │ │ ├── Icon-App-40x40@3x.png │ │ │ │ │ ├── Icon-App-60x60@2x.png │ │ │ │ │ ├── Icon-App-60x60@3x.png │ │ │ │ │ ├── Icon-App-76x76@1x.png │ │ │ │ │ ├── Icon-App-76x76@2x.png │ │ │ │ │ ├── Icon-App-1024x1024@1x.png │ │ │ │ │ ├── Icon-App-83.5x83.5@2x.png │ │ │ │ │ └── Contents.json │ │ │ ├── main.m │ │ │ ├── AppDelegate.m │ │ │ ├── Base.lproj │ │ │ │ ├── Main.storyboard │ │ │ │ └── LaunchScreen.storyboard │ │ │ └── Info.plist │ │ ├── Runner.xcodeproj │ │ │ └── project.xcworkspace │ │ │ │ ├── contents.xcworkspacedata │ │ │ │ └── xcshareddata │ │ │ │ ├── WorkspaceSettings.xcsettings │ │ │ │ └── IDEWorkspaceChecks.plist │ │ ├── Runner.xcworkspace │ │ │ ├── contents.xcworkspacedata │ │ │ └── xcshareddata │ │ │ │ └── IDEWorkspaceChecks.plist │ │ ├── .gitignore │ │ └── Podfile │ ├── windows │ │ ├── runner │ │ │ ├── resources │ │ │ │ └── app_icon.ico │ │ │ ├── resource.h │ │ │ ├── CMakeLists.txt │ │ │ ├── utils.h │ │ │ ├── runner.exe.manifest │ │ │ ├── flutter_window.h │ │ │ ├── main.cpp │ │ │ ├── utils.cpp │ │ │ ├── flutter_window.cpp │ │ │ ├── Runner.rc │ │ │ └── win32_window.h │ │ ├── .gitignore │ │ ├── flutter │ │ │ ├── generated_plugin_registrant.h │ │ │ ├── generated_plugin_registrant.cc │ │ │ ├── generated_plugins.cmake │ │ │ └── CMakeLists.txt │ │ └── CMakeLists.txt │ ├── test_driver │ │ └── integration_test.dart │ ├── analysis_options.yaml │ ├── .metadata │ ├── README.md │ ├── test │ │ └── widget_test.dart │ ├── pubspec.yaml │ └── .gitignore ├── android │ ├── settings.gradle │ ├── src │ │ └── main │ │ │ ├── AndroidManifest.xml │ │ │ └── java │ │ │ └── com │ │ │ └── ryanheise │ │ │ └── just_audio │ │ │ ├── BetterEventChannel.java │ │ │ ├── JustAudioPlugin.java │ │ │ └── MainMethodCallHandler.java │ ├── .gitignore │ ├── gradle.properties │ └── build.gradle ├── darwin │ ├── just_audio │ │ ├── Sources │ │ │ └── just_audio │ │ │ │ ├── IndexedPlayerItem.m │ │ │ │ ├── LoadControl.m │ │ │ │ ├── include │ │ │ │ └── just_audio │ │ │ │ │ ├── IndexedPlayerItem.h │ │ │ │ │ ├── JustAudioPlugin.h │ │ │ │ │ ├── LoadControl.h │ │ │ │ │ ├── LoopingAudioSource.h │ │ │ │ │ ├── BetterEventChannel.h │ │ │ │ │ ├── ClippingAudioSource.h │ │ │ │ │ ├── UriAudioSource.h │ │ │ │ │ ├── AudioSource.h │ │ │ │ │ ├── ConcatenatingAudioSource.h │ │ │ │ │ ├── AudioPlayer.h │ │ │ │ │ └── IndexedAudioSource.h │ │ │ │ ├── AudioSource.m │ │ │ │ ├── BetterEventChannel.m │ │ │ │ ├── LoopingAudioSource.m │ │ │ │ ├── JustAudioPlugin.m │ │ │ │ └── IndexedAudioSource.m │ │ └── Package.swift │ └── just_audio.podspec ├── analysis_options.yaml ├── .metadata ├── pubspec.yaml ├── .gitignore └── .pubignore ├── just_audio_background ├── example │ ├── android │ │ ├── settings_aar.gradle │ │ ├── gradle.properties │ │ ├── .gitignore │ │ ├── app │ │ │ ├── src │ │ │ │ ├── main │ │ │ │ │ ├── res │ │ │ │ │ │ ├── mipmap-hdpi │ │ │ │ │ │ │ └── ic_launcher.png │ │ │ │ │ │ ├── mipmap-mdpi │ │ │ │ │ │ │ └── ic_launcher.png │ │ │ │ │ │ ├── mipmap-xhdpi │ │ │ │ │ │ │ └── ic_launcher.png │ │ │ │ │ │ ├── mipmap-xxhdpi │ │ │ │ │ │ │ └── ic_launcher.png │ │ │ │ │ │ ├── mipmap-xxxhdpi │ │ │ │ │ │ │ └── ic_launcher.png │ │ │ │ │ │ ├── values │ │ │ │ │ │ │ └── styles.xml │ │ │ │ │ │ └── drawable │ │ │ │ │ │ │ └── launch_background.xml │ │ │ │ │ ├── java │ │ │ │ │ │ └── com │ │ │ │ │ │ │ └── ryanheise │ │ │ │ │ │ │ └── just_audio_example │ │ │ │ │ │ │ └── MainActivity.java │ │ │ │ │ └── AndroidManifest.xml │ │ │ │ ├── debug │ │ │ │ │ └── AndroidManifest.xml │ │ │ │ └── profile │ │ │ │ │ └── AndroidManifest.xml │ │ │ └── build.gradle │ │ ├── gradle │ │ │ └── wrapper │ │ │ │ └── gradle-wrapper.properties │ │ ├── build.gradle │ │ └── settings.gradle │ ├── audio │ │ └── nature.mp3 │ ├── web │ │ ├── favicon.png │ │ ├── icons │ │ │ ├── Icon-192.png │ │ │ └── Icon-512.png │ │ ├── manifest.json │ │ └── index.html │ ├── macos │ │ ├── .gitignore │ │ ├── Runner │ │ │ ├── Configs │ │ │ │ ├── Debug.xcconfig │ │ │ │ ├── Release.xcconfig │ │ │ │ ├── Warnings.xcconfig │ │ │ │ └── AppInfo.xcconfig │ │ │ ├── Assets.xcassets │ │ │ │ └── AppIcon.appiconset │ │ │ │ │ ├── app_icon_16.png │ │ │ │ │ ├── app_icon_32.png │ │ │ │ │ ├── app_icon_64.png │ │ │ │ │ ├── app_icon_1024.png │ │ │ │ │ ├── app_icon_128.png │ │ │ │ │ ├── app_icon_256.png │ │ │ │ │ ├── app_icon_512.png │ │ │ │ │ └── Contents.json │ │ │ ├── AppDelegate.swift │ │ │ ├── Release.entitlements │ │ │ ├── MainFlutterWindow.swift │ │ │ ├── DebugProfile.entitlements │ │ │ └── Info.plist │ │ ├── Flutter │ │ │ ├── Flutter-Debug.xcconfig │ │ │ └── Flutter-Release.xcconfig │ │ ├── Runner.xcworkspace │ │ │ ├── contents.xcworkspacedata │ │ │ └── xcshareddata │ │ │ │ └── IDEWorkspaceChecks.plist │ │ ├── Runner.xcodeproj │ │ │ └── project.xcworkspace │ │ │ │ └── xcshareddata │ │ │ │ └── IDEWorkspaceChecks.plist │ │ └── Podfile │ ├── ios │ │ ├── Flutter │ │ │ ├── Debug.xcconfig │ │ │ ├── Release.xcconfig │ │ │ └── AppFrameworkInfo.plist │ │ ├── Runner │ │ │ ├── AppDelegate.h │ │ │ ├── Assets.xcassets │ │ │ │ ├── LaunchImage.imageset │ │ │ │ │ ├── LaunchImage.png │ │ │ │ │ ├── LaunchImage@2x.png │ │ │ │ │ ├── LaunchImage@3x.png │ │ │ │ │ ├── README.md │ │ │ │ │ └── Contents.json │ │ │ │ └── AppIcon.appiconset │ │ │ │ │ ├── Icon-App-20x20@1x.png │ │ │ │ │ ├── Icon-App-20x20@2x.png │ │ │ │ │ ├── Icon-App-20x20@3x.png │ │ │ │ │ ├── Icon-App-29x29@1x.png │ │ │ │ │ ├── Icon-App-29x29@2x.png │ │ │ │ │ ├── Icon-App-29x29@3x.png │ │ │ │ │ ├── Icon-App-40x40@1x.png │ │ │ │ │ ├── Icon-App-40x40@2x.png │ │ │ │ │ ├── Icon-App-40x40@3x.png │ │ │ │ │ ├── Icon-App-60x60@2x.png │ │ │ │ │ ├── Icon-App-60x60@3x.png │ │ │ │ │ ├── Icon-App-76x76@1x.png │ │ │ │ │ ├── Icon-App-76x76@2x.png │ │ │ │ │ ├── Icon-App-1024x1024@1x.png │ │ │ │ │ ├── Icon-App-83.5x83.5@2x.png │ │ │ │ │ └── Contents.json │ │ │ ├── main.m │ │ │ ├── AppDelegate.m │ │ │ ├── Base.lproj │ │ │ │ ├── Main.storyboard │ │ │ │ └── LaunchScreen.storyboard │ │ │ └── Info.plist │ │ ├── Runner.xcodeproj │ │ │ └── project.xcworkspace │ │ │ │ ├── contents.xcworkspacedata │ │ │ │ └── xcshareddata │ │ │ │ ├── WorkspaceSettings.xcsettings │ │ │ │ └── IDEWorkspaceChecks.plist │ │ ├── Runner.xcworkspace │ │ │ ├── contents.xcworkspacedata │ │ │ └── xcshareddata │ │ │ │ └── IDEWorkspaceChecks.plist │ │ ├── .gitignore │ │ └── Podfile │ ├── analysis_options.yaml │ ├── .metadata │ ├── README.md │ ├── test │ │ └── widget_test.dart │ ├── pubspec.yaml │ └── .gitignore ├── analysis_options.yaml ├── .metadata ├── pubspec.yaml ├── ios │ └── just_audio_web.podspec ├── .gitignore ├── LICENSE ├── .pubignore └── CHANGELOG.md ├── just_audio_web ├── README.md ├── analysis_options.yaml ├── .metadata ├── pubspec.yaml ├── ios │ └── just_audio_web.podspec ├── .gitignore ├── LICENSE └── CHANGELOG.md ├── just_audio_platform_interface ├── .gitignore ├── analysis_options.yaml ├── pubspec.yaml ├── README.md ├── LICENSE └── CHANGELOG.md └── .gitignore /.github/FUNDING.yml: -------------------------------------------------------------------------------- 1 | github: ryanheise 2 | -------------------------------------------------------------------------------- /just_audio/example/linux/.gitignore: -------------------------------------------------------------------------------- 1 | flutter/ephemeral 2 | -------------------------------------------------------------------------------- /just_audio/example/android/settings_aar.gradle: -------------------------------------------------------------------------------- 1 | include ':app' 2 | -------------------------------------------------------------------------------- /just_audio/android/settings.gradle: -------------------------------------------------------------------------------- 1 | rootProject.name = 'just_audio' 2 | -------------------------------------------------------------------------------- /just_audio/example/lib/media_kit_stub.dart: -------------------------------------------------------------------------------- 1 | void initMediaKit() {} 2 | -------------------------------------------------------------------------------- /just_audio_background/example/android/settings_aar.gradle: -------------------------------------------------------------------------------- 1 | include ':app' 2 | -------------------------------------------------------------------------------- /just_audio/example/audio/nature.mp3: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ryanheise/just_audio/HEAD/just_audio/example/audio/nature.mp3 -------------------------------------------------------------------------------- /just_audio/example/web/favicon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ryanheise/just_audio/HEAD/just_audio/example/web/favicon.png -------------------------------------------------------------------------------- /just_audio_web/README.md: -------------------------------------------------------------------------------- 1 | # just_audio_web 2 | 3 | The web implementation of [`just_audio`][1]. 4 | 5 | [1]: ../just_audio 6 | -------------------------------------------------------------------------------- /just_audio/android/src/main/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | -------------------------------------------------------------------------------- /just_audio/example/web/icons/Icon-192.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ryanheise/just_audio/HEAD/just_audio/example/web/icons/Icon-192.png -------------------------------------------------------------------------------- /just_audio/example/web/icons/Icon-512.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ryanheise/just_audio/HEAD/just_audio/example/web/icons/Icon-512.png -------------------------------------------------------------------------------- /just_audio/example/macos/.gitignore: -------------------------------------------------------------------------------- 1 | # Flutter-related 2 | **/Flutter/ephemeral/ 3 | **/Pods/ 4 | 5 | # Xcode-related 6 | **/xcuserdata/ 7 | -------------------------------------------------------------------------------- /just_audio/example/macos/Runner/Configs/Debug.xcconfig: -------------------------------------------------------------------------------- 1 | #include "../../Flutter/Flutter-Debug.xcconfig" 2 | #include "Warnings.xcconfig" 3 | -------------------------------------------------------------------------------- /just_audio/example/macos/Runner/Configs/Release.xcconfig: -------------------------------------------------------------------------------- 1 | #include "../../Flutter/Flutter-Release.xcconfig" 2 | #include "Warnings.xcconfig" 3 | -------------------------------------------------------------------------------- /just_audio_background/example/audio/nature.mp3: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ryanheise/just_audio/HEAD/just_audio_background/example/audio/nature.mp3 -------------------------------------------------------------------------------- /just_audio_background/example/web/favicon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ryanheise/just_audio/HEAD/just_audio_background/example/web/favicon.png -------------------------------------------------------------------------------- /just_audio_background/example/macos/.gitignore: -------------------------------------------------------------------------------- 1 | # Flutter-related 2 | **/Flutter/ephemeral/ 3 | **/Pods/ 4 | 5 | # Xcode-related 6 | **/xcuserdata/ 7 | -------------------------------------------------------------------------------- /just_audio_background/example/macos/Runner/Configs/Debug.xcconfig: -------------------------------------------------------------------------------- 1 | #include "../../Flutter/Flutter-Debug.xcconfig" 2 | #include "Warnings.xcconfig" 3 | -------------------------------------------------------------------------------- /just_audio/android/.gitignore: -------------------------------------------------------------------------------- 1 | *.iml 2 | .gradle 3 | /local.properties 4 | /.idea/workspace.xml 5 | /.idea/libraries 6 | .DS_Store 7 | /build 8 | /captures 9 | -------------------------------------------------------------------------------- /just_audio/android/gradle.properties: -------------------------------------------------------------------------------- 1 | org.gradle.jvmargs=-Xmx1536M 2 | android.enableR8=true 3 | android.useAndroidX=true 4 | android.enableJetifier=true 5 | -------------------------------------------------------------------------------- /just_audio_background/example/macos/Runner/Configs/Release.xcconfig: -------------------------------------------------------------------------------- 1 | #include "../../Flutter/Flutter-Release.xcconfig" 2 | #include "Warnings.xcconfig" 3 | -------------------------------------------------------------------------------- /just_audio/example/ios/Flutter/Debug.xcconfig: -------------------------------------------------------------------------------- 1 | #include "Pods/Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig" 2 | #include "Generated.xcconfig" 3 | -------------------------------------------------------------------------------- /just_audio/example/ios/Flutter/Release.xcconfig: -------------------------------------------------------------------------------- 1 | #include "Pods/Target Support Files/Pods-Runner/Pods-Runner.release.xcconfig" 2 | #include "Generated.xcconfig" 3 | -------------------------------------------------------------------------------- /just_audio_background/example/web/icons/Icon-192.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ryanheise/just_audio/HEAD/just_audio_background/example/web/icons/Icon-192.png -------------------------------------------------------------------------------- /just_audio_background/example/web/icons/Icon-512.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ryanheise/just_audio/HEAD/just_audio_background/example/web/icons/Icon-512.png -------------------------------------------------------------------------------- /just_audio/example/windows/runner/resources/app_icon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ryanheise/just_audio/HEAD/just_audio/example/windows/runner/resources/app_icon.ico -------------------------------------------------------------------------------- /just_audio/example/ios/Runner/AppDelegate.h: -------------------------------------------------------------------------------- 1 | #import 2 | #import 3 | 4 | @interface AppDelegate : FlutterAppDelegate 5 | 6 | @end 7 | -------------------------------------------------------------------------------- /just_audio_background/example/ios/Flutter/Debug.xcconfig: -------------------------------------------------------------------------------- 1 | #include "Pods/Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig" 2 | #include "Generated.xcconfig" 3 | -------------------------------------------------------------------------------- /just_audio/example/android/.gitignore: -------------------------------------------------------------------------------- 1 | gradle-wrapper.jar 2 | /.gradle 3 | /captures/ 4 | /gradlew 5 | /gradlew.bat 6 | /local.properties 7 | GeneratedPluginRegistrant.java 8 | -------------------------------------------------------------------------------- /just_audio_background/example/android/gradle.properties: -------------------------------------------------------------------------------- 1 | org.gradle.jvmargs=-Xmx1536M 2 | android.enableR8=true 3 | android.useAndroidX=true 4 | android.enableJetifier=true 5 | -------------------------------------------------------------------------------- /just_audio_background/example/ios/Flutter/Release.xcconfig: -------------------------------------------------------------------------------- 1 | #include "Pods/Target Support Files/Pods-Runner/Pods-Runner.release.xcconfig" 2 | #include "Generated.xcconfig" 3 | -------------------------------------------------------------------------------- /just_audio/example/test_driver/integration_test.dart: -------------------------------------------------------------------------------- 1 | //import 'package:integration_test/integration_test_driver.dart'; 2 | // 3 | //Future main() => integrationDriver(); 4 | -------------------------------------------------------------------------------- /just_audio_background/example/ios/Runner/AppDelegate.h: -------------------------------------------------------------------------------- 1 | #import 2 | #import 3 | 4 | @interface AppDelegate : FlutterAppDelegate 5 | 6 | @end 7 | -------------------------------------------------------------------------------- /just_audio/example/macos/Flutter/Flutter-Debug.xcconfig: -------------------------------------------------------------------------------- 1 | #include "Pods/Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig" 2 | #include "ephemeral/Flutter-Generated.xcconfig" 3 | -------------------------------------------------------------------------------- /just_audio_background/example/android/.gitignore: -------------------------------------------------------------------------------- 1 | gradle-wrapper.jar 2 | /.gradle 3 | /captures/ 4 | /gradlew 5 | /gradlew.bat 6 | /local.properties 7 | GeneratedPluginRegistrant.java 8 | -------------------------------------------------------------------------------- /just_audio/example/macos/Flutter/Flutter-Release.xcconfig: -------------------------------------------------------------------------------- 1 | #include "Pods/Target Support Files/Pods-Runner/Pods-Runner.release.xcconfig" 2 | #include "ephemeral/Flutter-Generated.xcconfig" 3 | -------------------------------------------------------------------------------- /just_audio/example/android/app/src/main/res/mipmap-hdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ryanheise/just_audio/HEAD/just_audio/example/android/app/src/main/res/mipmap-hdpi/ic_launcher.png -------------------------------------------------------------------------------- /just_audio/example/android/app/src/main/res/mipmap-mdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ryanheise/just_audio/HEAD/just_audio/example/android/app/src/main/res/mipmap-mdpi/ic_launcher.png -------------------------------------------------------------------------------- /just_audio_background/example/macos/Flutter/Flutter-Debug.xcconfig: -------------------------------------------------------------------------------- 1 | #include "Pods/Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig" 2 | #include "ephemeral/Flutter-Generated.xcconfig" 3 | -------------------------------------------------------------------------------- /just_audio/example/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ryanheise/just_audio/HEAD/just_audio/example/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png -------------------------------------------------------------------------------- /just_audio/example/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ryanheise/just_audio/HEAD/just_audio/example/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /just_audio_background/example/macos/Flutter/Flutter-Release.xcconfig: -------------------------------------------------------------------------------- 1 | #include "Pods/Target Support Files/Pods-Runner/Pods-Runner.release.xcconfig" 2 | #include "ephemeral/Flutter-Generated.xcconfig" 3 | -------------------------------------------------------------------------------- /just_audio/example/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ryanheise/just_audio/HEAD/just_audio/example/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /just_audio/example/analysis_options.yaml: -------------------------------------------------------------------------------- 1 | include: package:flutter_lints/flutter.yaml 2 | 3 | linter: 4 | rules: 5 | prefer_single_quotes: false 6 | unawaited_futures: false 7 | avoid_print: false 8 | -------------------------------------------------------------------------------- /just_audio/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ryanheise/just_audio/HEAD/just_audio/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png -------------------------------------------------------------------------------- /just_audio/example/lib/media_kit_impl.dart: -------------------------------------------------------------------------------- 1 | import 'package:just_audio_media_kit/just_audio_media_kit.dart'; 2 | 3 | void initMediaKit() { 4 | JustAudioMediaKit.ensureInitialized(linux: true, windows: true); 5 | } 6 | -------------------------------------------------------------------------------- /just_audio/example/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_128.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ryanheise/just_audio/HEAD/just_audio/example/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_128.png -------------------------------------------------------------------------------- /just_audio/example/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ryanheise/just_audio/HEAD/just_audio/example/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_16.png -------------------------------------------------------------------------------- /just_audio/example/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_256.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ryanheise/just_audio/HEAD/just_audio/example/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_256.png -------------------------------------------------------------------------------- /just_audio/example/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_32.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ryanheise/just_audio/HEAD/just_audio/example/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_32.png -------------------------------------------------------------------------------- /just_audio/example/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_512.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ryanheise/just_audio/HEAD/just_audio/example/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_512.png -------------------------------------------------------------------------------- /just_audio/example/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_64.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ryanheise/just_audio/HEAD/just_audio/example/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_64.png -------------------------------------------------------------------------------- /just_audio_background/example/android/app/src/main/res/mipmap-hdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ryanheise/just_audio/HEAD/just_audio_background/example/android/app/src/main/res/mipmap-hdpi/ic_launcher.png -------------------------------------------------------------------------------- /just_audio_background/example/android/app/src/main/res/mipmap-mdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ryanheise/just_audio/HEAD/just_audio_background/example/android/app/src/main/res/mipmap-mdpi/ic_launcher.png -------------------------------------------------------------------------------- /just_audio_background/example/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ryanheise/just_audio/HEAD/just_audio_background/example/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png -------------------------------------------------------------------------------- /just_audio/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ryanheise/just_audio/HEAD/just_audio/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png -------------------------------------------------------------------------------- /just_audio/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ryanheise/just_audio/HEAD/just_audio/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png -------------------------------------------------------------------------------- /just_audio/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ryanheise/just_audio/HEAD/just_audio/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png -------------------------------------------------------------------------------- /just_audio/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ryanheise/just_audio/HEAD/just_audio/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png -------------------------------------------------------------------------------- /just_audio/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ryanheise/just_audio/HEAD/just_audio/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png -------------------------------------------------------------------------------- /just_audio/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ryanheise/just_audio/HEAD/just_audio/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png -------------------------------------------------------------------------------- /just_audio/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ryanheise/just_audio/HEAD/just_audio/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png -------------------------------------------------------------------------------- /just_audio/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ryanheise/just_audio/HEAD/just_audio/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png -------------------------------------------------------------------------------- /just_audio/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ryanheise/just_audio/HEAD/just_audio/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png -------------------------------------------------------------------------------- /just_audio/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ryanheise/just_audio/HEAD/just_audio/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png -------------------------------------------------------------------------------- /just_audio/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ryanheise/just_audio/HEAD/just_audio/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png -------------------------------------------------------------------------------- /just_audio/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ryanheise/just_audio/HEAD/just_audio/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png -------------------------------------------------------------------------------- /just_audio/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ryanheise/just_audio/HEAD/just_audio/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png -------------------------------------------------------------------------------- /just_audio/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ryanheise/just_audio/HEAD/just_audio/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png -------------------------------------------------------------------------------- /just_audio/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ryanheise/just_audio/HEAD/just_audio/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png -------------------------------------------------------------------------------- /just_audio/example/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_1024.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ryanheise/just_audio/HEAD/just_audio/example/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_1024.png -------------------------------------------------------------------------------- /just_audio_background/example/analysis_options.yaml: -------------------------------------------------------------------------------- 1 | include: package:flutter_lints/flutter.yaml 2 | 3 | linter: 4 | rules: 5 | prefer_single_quotes: false 6 | unawaited_futures: false 7 | avoid_print: false 8 | -------------------------------------------------------------------------------- /just_audio_background/example/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ryanheise/just_audio/HEAD/just_audio_background/example/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /just_audio_background/example/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ryanheise/just_audio/HEAD/just_audio_background/example/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /just_audio/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ryanheise/just_audio/HEAD/just_audio/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png -------------------------------------------------------------------------------- /just_audio/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ryanheise/just_audio/HEAD/just_audio/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png -------------------------------------------------------------------------------- /just_audio/example/linux/main.cc: -------------------------------------------------------------------------------- 1 | #include "my_application.h" 2 | 3 | int main(int argc, char** argv) { 4 | g_autoptr(MyApplication) app = my_application_new(); 5 | return g_application_run(G_APPLICATION(app), argc, argv); 6 | } 7 | -------------------------------------------------------------------------------- /just_audio_background/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ryanheise/just_audio/HEAD/just_audio_background/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png -------------------------------------------------------------------------------- /just_audio_background/example/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ryanheise/just_audio/HEAD/just_audio_background/example/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_16.png -------------------------------------------------------------------------------- /just_audio_background/example/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_32.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ryanheise/just_audio/HEAD/just_audio_background/example/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_32.png -------------------------------------------------------------------------------- /just_audio_background/example/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_64.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ryanheise/just_audio/HEAD/just_audio_background/example/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_64.png -------------------------------------------------------------------------------- /just_audio_platform_interface/.gitignore: -------------------------------------------------------------------------------- 1 | # Files and directories created by pub 2 | .dart_tool/ 3 | .packages 4 | 5 | # Conventional directory for build outputs 6 | build/ 7 | 8 | # Directory created by dartdoc 9 | doc/api/ 10 | -------------------------------------------------------------------------------- /just_audio/example/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /just_audio_background/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ryanheise/just_audio/HEAD/just_audio_background/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png -------------------------------------------------------------------------------- /just_audio_background/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ryanheise/just_audio/HEAD/just_audio_background/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png -------------------------------------------------------------------------------- /just_audio_background/example/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_1024.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ryanheise/just_audio/HEAD/just_audio_background/example/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_1024.png -------------------------------------------------------------------------------- /just_audio_background/example/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_128.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ryanheise/just_audio/HEAD/just_audio_background/example/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_128.png -------------------------------------------------------------------------------- /just_audio_background/example/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_256.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ryanheise/just_audio/HEAD/just_audio_background/example/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_256.png -------------------------------------------------------------------------------- /just_audio_background/example/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_512.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ryanheise/just_audio/HEAD/just_audio_background/example/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_512.png -------------------------------------------------------------------------------- /just_audio_background/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ryanheise/just_audio/HEAD/just_audio_background/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png -------------------------------------------------------------------------------- /just_audio_background/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ryanheise/just_audio/HEAD/just_audio_background/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png -------------------------------------------------------------------------------- /just_audio_background/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ryanheise/just_audio/HEAD/just_audio_background/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png -------------------------------------------------------------------------------- /just_audio_background/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ryanheise/just_audio/HEAD/just_audio_background/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png -------------------------------------------------------------------------------- /just_audio_background/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ryanheise/just_audio/HEAD/just_audio_background/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png -------------------------------------------------------------------------------- /just_audio_background/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ryanheise/just_audio/HEAD/just_audio_background/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png -------------------------------------------------------------------------------- /just_audio_background/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ryanheise/just_audio/HEAD/just_audio_background/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png -------------------------------------------------------------------------------- /just_audio_background/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ryanheise/just_audio/HEAD/just_audio_background/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png -------------------------------------------------------------------------------- /just_audio_background/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ryanheise/just_audio/HEAD/just_audio_background/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png -------------------------------------------------------------------------------- /just_audio_background/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ryanheise/just_audio/HEAD/just_audio_background/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png -------------------------------------------------------------------------------- /just_audio_background/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ryanheise/just_audio/HEAD/just_audio_background/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png -------------------------------------------------------------------------------- /just_audio_background/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ryanheise/just_audio/HEAD/just_audio_background/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png -------------------------------------------------------------------------------- /just_audio_background/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ryanheise/just_audio/HEAD/just_audio_background/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/config.yml: -------------------------------------------------------------------------------- 1 | blank_issues_enabled: false 2 | contact_links: 3 | - name: Question 4 | url: https://stackoverflow.com/questions/tagged/just-audio 5 | about: Ask a question on Stack Overflow (please use the just-audio tag). 6 | -------------------------------------------------------------------------------- /just_audio_background/example/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /just_audio_background/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ryanheise/just_audio/HEAD/just_audio_background/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png -------------------------------------------------------------------------------- /just_audio_background/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ryanheise/just_audio/HEAD/just_audio_background/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png -------------------------------------------------------------------------------- /just_audio/darwin/just_audio/Sources/just_audio/IndexedPlayerItem.m: -------------------------------------------------------------------------------- 1 | #import "./include/just_audio/IndexedPlayerItem.h" 2 | #import "./include/just_audio/IndexedAudioSource.h" 3 | 4 | @implementation IndexedPlayerItem 5 | @synthesize audioSource; 6 | @end 7 | -------------------------------------------------------------------------------- /just_audio/example/android/app/src/main/java/com/ryanheise/just_audio_example/MainActivity.java: -------------------------------------------------------------------------------- 1 | package com.ryanheise.just_audio_example; 2 | 3 | import io.flutter.embedding.android.FlutterActivity; 4 | 5 | public class MainActivity extends FlutterActivity { 6 | } 7 | -------------------------------------------------------------------------------- /just_audio_background/example/android/app/src/main/java/com/ryanheise/just_audio_example/MainActivity.java: -------------------------------------------------------------------------------- 1 | package com.ryanheise.just_audio_example; 2 | 3 | import io.flutter.embedding.android.FlutterActivity; 4 | 5 | public class MainActivity extends FlutterActivity { 6 | } 7 | -------------------------------------------------------------------------------- /just_audio/example/android/gradle.properties: -------------------------------------------------------------------------------- 1 | org.gradle.jvmargs=-Xmx1536M 2 | android.enableR8=true 3 | android.useAndroidX=true 4 | android.enableJetifier=true 5 | android.defaults.buildfeatures.buildconfig=true 6 | android.nonTransitiveRClass=false 7 | android.nonFinalResIds=false 8 | -------------------------------------------------------------------------------- /just_audio/example/android/gradle/wrapper/gradle-wrapper.properties: -------------------------------------------------------------------------------- 1 | distributionBase=GRADLE_USER_HOME 2 | distributionPath=wrapper/dists 3 | zipStoreBase=GRADLE_USER_HOME 4 | zipStorePath=wrapper/dists 5 | distributionUrl=https\://services.gradle.org/distributions/gradle-8.7-all.zip 6 | -------------------------------------------------------------------------------- /just_audio/example/ios/Runner/main.m: -------------------------------------------------------------------------------- 1 | #import 2 | #import 3 | #import "AppDelegate.h" 4 | 5 | int main(int argc, char* argv[]) { 6 | @autoreleasepool { 7 | return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class])); 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /just_audio/darwin/just_audio/Sources/just_audio/LoadControl.m: -------------------------------------------------------------------------------- 1 | #import "./include/just_audio/LoadControl.h" 2 | 3 | @implementation LoadControl 4 | @synthesize preferredForwardBufferDuration; 5 | @synthesize canUseNetworkResourcesForLiveStreamingWhilePaused; 6 | @synthesize preferredPeakBitRate; 7 | @end 8 | -------------------------------------------------------------------------------- /just_audio/analysis_options.yaml: -------------------------------------------------------------------------------- 1 | include: package:flutter_lints/flutter.yaml 2 | 3 | analyzer: 4 | language: 5 | strict-casts: true 6 | strict-inference: true 7 | strict-raw-types: true 8 | 9 | linter: 10 | rules: 11 | prefer_single_quotes: false 12 | unawaited_futures: false 13 | -------------------------------------------------------------------------------- /just_audio/darwin/just_audio/Sources/just_audio/include/just_audio/IndexedPlayerItem.h: -------------------------------------------------------------------------------- 1 | #import 2 | 3 | @class IndexedAudioSource; 4 | 5 | @interface IndexedPlayerItem : AVPlayerItem 6 | 7 | @property (readwrite, nonatomic, weak) IndexedAudioSource *audioSource; 8 | 9 | @end 10 | -------------------------------------------------------------------------------- /just_audio_background/example/ios/Runner/main.m: -------------------------------------------------------------------------------- 1 | #import 2 | #import 3 | #import "AppDelegate.h" 4 | 5 | int main(int argc, char* argv[]) { 6 | @autoreleasepool { 7 | return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class])); 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /just_audio_background/example/macos/Runner/AppDelegate.swift: -------------------------------------------------------------------------------- 1 | import Cocoa 2 | import FlutterMacOS 3 | 4 | @NSApplicationMain 5 | class AppDelegate: FlutterAppDelegate { 6 | override func applicationShouldTerminateAfterLastWindowClosed(_ sender: NSApplication) -> Bool { 7 | return true 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /just_audio_web/analysis_options.yaml: -------------------------------------------------------------------------------- 1 | include: package:flutter_lints/flutter.yaml 2 | 3 | analyzer: 4 | language: 5 | strict-casts: true 6 | strict-inference: true 7 | strict-raw-types: true 8 | 9 | linter: 10 | rules: 11 | prefer_single_quotes: false 12 | unawaited_futures: false 13 | -------------------------------------------------------------------------------- /just_audio/darwin/just_audio/Sources/just_audio/include/just_audio/JustAudioPlugin.h: -------------------------------------------------------------------------------- 1 | #import 2 | #if TARGET_OS_OSX 3 | #import 4 | #else 5 | #import 6 | #endif 7 | 8 | @interface JustAudioPlugin : NSObject 9 | @end 10 | -------------------------------------------------------------------------------- /just_audio_background/analysis_options.yaml: -------------------------------------------------------------------------------- 1 | include: package:flutter_lints/flutter.yaml 2 | 3 | analyzer: 4 | language: 5 | strict-casts: true 6 | strict-inference: true 7 | strict-raw-types: true 8 | 9 | linter: 10 | rules: 11 | prefer_single_quotes: false 12 | unawaited_futures: false 13 | -------------------------------------------------------------------------------- /just_audio_background/example/android/gradle/wrapper/gradle-wrapper.properties: -------------------------------------------------------------------------------- 1 | #Thu Mar 27 14:19:19 AEDT 2025 2 | distributionBase=GRADLE_USER_HOME 3 | distributionPath=wrapper/dists 4 | distributionUrl=https\://services.gradle.org/distributions/gradle-8.7-bin.zip 5 | zipStoreBase=GRADLE_USER_HOME 6 | zipStorePath=wrapper/dists 7 | -------------------------------------------------------------------------------- /just_audio_platform_interface/analysis_options.yaml: -------------------------------------------------------------------------------- 1 | include: package:flutter_lints/flutter.yaml 2 | 3 | analyzer: 4 | language: 5 | strict-casts: true 6 | strict-inference: true 7 | strict-raw-types: true 8 | 9 | linter: 10 | rules: 11 | prefer_single_quotes: false 12 | unawaited_futures: false 13 | -------------------------------------------------------------------------------- /just_audio/example/ios/Runner.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /just_audio/example/macos/Runner.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /just_audio/example/ios/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /just_audio/example/macos/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /just_audio_background/example/ios/Runner.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /just_audio_background/example/macos/Runner.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /just_audio/example/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | PreviewsEnabled 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /just_audio_background/example/ios/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /just_audio_background/example/macos/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /just_audio/example/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /just_audio/example/macos/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /just_audio_background/example/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | PreviewsEnabled 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /just_audio/example/android/app/src/debug/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /just_audio_background/example/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /just_audio/.metadata: -------------------------------------------------------------------------------- 1 | # This file tracks properties of this Flutter project. 2 | # Used by Flutter tool to assess capabilities and perform upgrades etc. 3 | # 4 | # This file should be version controlled and should not be manually edited. 5 | 6 | version: 7 | revision: 68587a0916366e9512a78df22c44163d041dd5f3 8 | channel: stable 9 | 10 | project_type: plugin 11 | -------------------------------------------------------------------------------- /just_audio/example/android/app/src/profile/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /just_audio_background/example/macos/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /just_audio_web/.metadata: -------------------------------------------------------------------------------- 1 | # This file tracks properties of this Flutter project. 2 | # Used by Flutter tool to assess capabilities and perform upgrades etc. 3 | # 4 | # This file should be version controlled and should not be manually edited. 5 | 6 | version: 7 | revision: bbfbf1770cca2da7c82e887e4e4af910034800b6 8 | channel: stable 9 | 10 | project_type: app 11 | -------------------------------------------------------------------------------- /just_audio/example/.metadata: -------------------------------------------------------------------------------- 1 | # This file tracks properties of this Flutter project. 2 | # Used by Flutter tool to assess capabilities and perform upgrades etc. 3 | # 4 | # This file should be version controlled and should not be manually edited. 5 | 6 | version: 7 | revision: 68587a0916366e9512a78df22c44163d041dd5f3 8 | channel: stable 9 | 10 | project_type: app 11 | -------------------------------------------------------------------------------- /just_audio_background/.metadata: -------------------------------------------------------------------------------- 1 | # This file tracks properties of this Flutter project. 2 | # Used by Flutter tool to assess capabilities and perform upgrades etc. 3 | # 4 | # This file should be version controlled and should not be manually edited. 5 | 6 | version: 7 | revision: bbfbf1770cca2da7c82e887e4e4af910034800b6 8 | channel: stable 9 | 10 | project_type: app 11 | -------------------------------------------------------------------------------- /just_audio/example/macos/Runner/Release.entitlements: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | com.apple.security.app-sandbox 6 | 7 | com.apple.security.network.client 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /just_audio_background/example/.metadata: -------------------------------------------------------------------------------- 1 | # This file tracks properties of this Flutter project. 2 | # Used by Flutter tool to assess capabilities and perform upgrades etc. 3 | # 4 | # This file should be version controlled and should not be manually edited. 5 | 6 | version: 7 | revision: 68587a0916366e9512a78df22c44163d041dd5f3 8 | channel: stable 9 | 10 | project_type: app 11 | -------------------------------------------------------------------------------- /just_audio_background/example/macos/Runner/Release.entitlements: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | com.apple.security.app-sandbox 6 | 7 | com.apple.security.network.client 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /just_audio/example/windows/.gitignore: -------------------------------------------------------------------------------- 1 | flutter/ephemeral/ 2 | 3 | # Visual Studio user-specific files. 4 | *.suo 5 | *.user 6 | *.userosscache 7 | *.sln.docstates 8 | 9 | # Visual Studio build-related files. 10 | x64/ 11 | x86/ 12 | 13 | # Visual Studio cache files 14 | # files ending in .cache can be ignored 15 | *.[Cc]ache 16 | # but keep track of directories ending in .cache 17 | !*.[Cc]ache/ 18 | -------------------------------------------------------------------------------- /just_audio/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/README.md: -------------------------------------------------------------------------------- 1 | # Launch Screen Assets 2 | 3 | You can customize the launch screen with your own desired assets by replacing the image files in this directory. 4 | 5 | You can also do it by opening your Flutter project's Xcode project with `open ios/Runner.xcworkspace`, selecting `Runner/Assets.xcassets` in the Project Navigator and dropping in the desired images. -------------------------------------------------------------------------------- /just_audio/example/macos/Runner/AppDelegate.swift: -------------------------------------------------------------------------------- 1 | import Cocoa 2 | import FlutterMacOS 3 | 4 | @main 5 | class AppDelegate: FlutterAppDelegate { 6 | override func applicationShouldTerminateAfterLastWindowClosed(_ sender: NSApplication) -> Bool { 7 | return true 8 | } 9 | 10 | override func applicationSupportsSecureRestorableState(_ app: NSApplication) -> Bool { 11 | return true 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /just_audio/darwin/just_audio/Sources/just_audio/include/just_audio/LoadControl.h: -------------------------------------------------------------------------------- 1 | #import 2 | 3 | @interface LoadControl : NSObject 4 | 5 | @property (readwrite, nonatomic) NSNumber *preferredForwardBufferDuration; 6 | @property (readwrite, nonatomic) BOOL canUseNetworkResourcesForLiveStreamingWhilePaused; 7 | @property (readwrite, nonatomic) NSNumber *preferredPeakBitRate; 8 | 9 | @end 10 | -------------------------------------------------------------------------------- /just_audio/example/linux/flutter/generated_plugin_registrant.h: -------------------------------------------------------------------------------- 1 | // 2 | // Generated file. Do not edit. 3 | // 4 | 5 | // clang-format off 6 | 7 | #ifndef GENERATED_PLUGIN_REGISTRANT_ 8 | #define GENERATED_PLUGIN_REGISTRANT_ 9 | 10 | #include 11 | 12 | // Registers Flutter plugins. 13 | void fl_register_plugins(FlPluginRegistry* registry); 14 | 15 | #endif // GENERATED_PLUGIN_REGISTRANT_ 16 | -------------------------------------------------------------------------------- /just_audio/example/windows/flutter/generated_plugin_registrant.h: -------------------------------------------------------------------------------- 1 | // 2 | // Generated file. Do not edit. 3 | // 4 | 5 | // clang-format off 6 | 7 | #ifndef GENERATED_PLUGIN_REGISTRANT_ 8 | #define GENERATED_PLUGIN_REGISTRANT_ 9 | 10 | #include 11 | 12 | // Registers Flutter plugins. 13 | void RegisterPlugins(flutter::PluginRegistry* registry); 14 | 15 | #endif // GENERATED_PLUGIN_REGISTRANT_ 16 | -------------------------------------------------------------------------------- /just_audio_background/example/android/app/src/debug/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 3 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /just_audio_background/example/android/app/src/profile/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 3 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /just_audio_background/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/README.md: -------------------------------------------------------------------------------- 1 | # Launch Screen Assets 2 | 3 | You can customize the launch screen with your own desired assets by replacing the image files in this directory. 4 | 5 | You can also do it by opening your Flutter project's Xcode project with `open ios/Runner.xcworkspace`, selecting `Runner/Assets.xcassets` in the Project Navigator and dropping in the desired images. -------------------------------------------------------------------------------- /just_audio/example/android/app/src/main/res/values/styles.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 8 | 9 | -------------------------------------------------------------------------------- /just_audio/darwin/just_audio/Sources/just_audio/include/just_audio/LoopingAudioSource.h: -------------------------------------------------------------------------------- 1 | #import "AudioSource.h" 2 | #import 3 | #if TARGET_OS_OSX 4 | #import 5 | #else 6 | #import 7 | #endif 8 | 9 | @interface LoopingAudioSource : AudioSource 10 | 11 | - (instancetype)initWithId:(NSString *)sid audioSources:(NSArray *)audioSources; 12 | 13 | @end 14 | -------------------------------------------------------------------------------- /just_audio_background/example/android/build.gradle: -------------------------------------------------------------------------------- 1 | allprojects { 2 | repositories { 3 | google() 4 | mavenCentral() 5 | } 6 | } 7 | 8 | rootProject.buildDir = '../build' 9 | subprojects { 10 | project.buildDir = "${rootProject.buildDir}/${project.name}" 11 | } 12 | subprojects { 13 | project.evaluationDependsOn(':app') 14 | } 15 | 16 | tasks.register("clean", Delete) { 17 | delete rootProject.buildDir 18 | } 19 | -------------------------------------------------------------------------------- /just_audio_background/example/android/app/src/main/res/values/styles.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 8 | 9 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | flutter_export_environment.sh 2 | 3 | **/Flutter/App.framework/ 4 | **/Flutter/ephemeral/ 5 | **/Flutter/Flutter.framework/ 6 | **/Flutter/Generated.xcconfig 7 | **/Flutter/flutter_assets/ 8 | 9 | generated_plugin_registrant.dart 10 | GeneratedPluginRegistrant.h 11 | GeneratedPluginRegistrant.m 12 | GeneratedPluginRegistrant.java 13 | GeneratedPluginRegistrant.swift 14 | build/ 15 | .flutter-plugins 16 | coverage 17 | pubspec.lock 18 | Podfile.lock 19 | 20 | **/.cxx/ 21 | -------------------------------------------------------------------------------- /just_audio/darwin/just_audio/Sources/just_audio/include/just_audio/BetterEventChannel.h: -------------------------------------------------------------------------------- 1 | #import 2 | #if TARGET_OS_OSX 3 | #import 4 | #else 5 | #import 6 | #endif 7 | 8 | @interface BetterEventChannel : NSObject 9 | 10 | - (instancetype)initWithName:(NSString*)name messenger:(NSObject *)messenger; 11 | - (void)sendEvent:(id)event; 12 | - (void)dispose; 13 | 14 | @end 15 | -------------------------------------------------------------------------------- /just_audio/example/linux/my_application.h: -------------------------------------------------------------------------------- 1 | #ifndef FLUTTER_MY_APPLICATION_H_ 2 | #define FLUTTER_MY_APPLICATION_H_ 3 | 4 | #include 5 | 6 | G_DECLARE_FINAL_TYPE(MyApplication, my_application, MY, APPLICATION, 7 | GtkApplication) 8 | 9 | /** 10 | * my_application_new: 11 | * 12 | * Creates a new Flutter-based application. 13 | * 14 | * Returns: a new #MyApplication. 15 | */ 16 | MyApplication* my_application_new(); 17 | 18 | #endif // FLUTTER_MY_APPLICATION_H_ 19 | -------------------------------------------------------------------------------- /just_audio/example/windows/flutter/generated_plugin_registrant.cc: -------------------------------------------------------------------------------- 1 | // 2 | // Generated file. Do not edit. 3 | // 4 | 5 | // clang-format off 6 | 7 | #include "generated_plugin_registrant.h" 8 | 9 | #include 10 | 11 | void RegisterPlugins(flutter::PluginRegistry* registry) { 12 | MediaKitLibsWindowsAudioPluginCApiRegisterWithRegistrar( 13 | registry->GetRegistrarForPlugin("MediaKitLibsWindowsAudioPluginCApi")); 14 | } 15 | -------------------------------------------------------------------------------- /just_audio/example/macos/Runner/MainFlutterWindow.swift: -------------------------------------------------------------------------------- 1 | import Cocoa 2 | import FlutterMacOS 3 | 4 | class MainFlutterWindow: NSWindow { 5 | override func awakeFromNib() { 6 | let flutterViewController = FlutterViewController.init() 7 | let windowFrame = self.frame 8 | self.contentViewController = flutterViewController 9 | self.setFrame(windowFrame, display: true) 10 | 11 | RegisterGeneratedPlugins(registry: flutterViewController) 12 | 13 | super.awakeFromNib() 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /just_audio/example/ios/Runner/AppDelegate.m: -------------------------------------------------------------------------------- 1 | #include "AppDelegate.h" 2 | #include "GeneratedPluginRegistrant.h" 3 | 4 | @implementation AppDelegate 5 | 6 | - (BOOL)application:(UIApplication *)application 7 | didFinishLaunchingWithOptions:(NSDictionary *)launchOptions { 8 | [GeneratedPluginRegistrant registerWithRegistry:self]; 9 | // Override point for customization after application launch. 10 | return [super application:application didFinishLaunchingWithOptions:launchOptions]; 11 | } 12 | 13 | @end 14 | -------------------------------------------------------------------------------- /just_audio/example/macos/Runner/DebugProfile.entitlements: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | com.apple.security.app-sandbox 6 | 7 | com.apple.security.cs.allow-jit 8 | 9 | com.apple.security.network.server 10 | 11 | com.apple.security.network.client 12 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /just_audio_background/example/macos/Runner/MainFlutterWindow.swift: -------------------------------------------------------------------------------- 1 | import Cocoa 2 | import FlutterMacOS 3 | 4 | class MainFlutterWindow: NSWindow { 5 | override func awakeFromNib() { 6 | let flutterViewController = FlutterViewController.init() 7 | let windowFrame = self.frame 8 | self.contentViewController = flutterViewController 9 | self.setFrame(windowFrame, display: true) 10 | 11 | RegisterGeneratedPlugins(registry: flutterViewController) 12 | 13 | super.awakeFromNib() 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /just_audio_background/example/macos/Runner/DebugProfile.entitlements: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | com.apple.security.app-sandbox 6 | 7 | com.apple.security.cs.allow-jit 8 | 9 | com.apple.security.network.server 10 | 11 | com.apple.security.network.client 12 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /just_audio_background/example/ios/Runner/AppDelegate.m: -------------------------------------------------------------------------------- 1 | #include "AppDelegate.h" 2 | #include "GeneratedPluginRegistrant.h" 3 | 4 | @implementation AppDelegate 5 | 6 | - (BOOL)application:(UIApplication *)application 7 | didFinishLaunchingWithOptions:(NSDictionary *)launchOptions { 8 | [GeneratedPluginRegistrant registerWithRegistry:self]; 9 | // Override point for customization after application launch. 10 | return [super application:application didFinishLaunchingWithOptions:launchOptions]; 11 | } 12 | 13 | @end 14 | -------------------------------------------------------------------------------- /just_audio/example/windows/runner/resource.h: -------------------------------------------------------------------------------- 1 | //{{NO_DEPENDENCIES}} 2 | // Microsoft Visual C++ generated include file. 3 | // Used by Runner.rc 4 | // 5 | #define IDI_APP_ICON 101 6 | 7 | // Next default values for new objects 8 | // 9 | #ifdef APSTUDIO_INVOKED 10 | #ifndef APSTUDIO_READONLY_SYMBOLS 11 | #define _APS_NEXT_RESOURCE_VALUE 102 12 | #define _APS_NEXT_COMMAND_VALUE 40001 13 | #define _APS_NEXT_CONTROL_VALUE 1001 14 | #define _APS_NEXT_SYMED_VALUE 101 15 | #endif 16 | #endif 17 | -------------------------------------------------------------------------------- /just_audio/example/android/app/src/main/res/drawable/launch_background.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 12 | 13 | -------------------------------------------------------------------------------- /just_audio_background/example/android/app/src/main/res/drawable/launch_background.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 12 | 13 | -------------------------------------------------------------------------------- /just_audio/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "LaunchImage.png", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "filename" : "LaunchImage@2x.png", 11 | "scale" : "2x" 12 | }, 13 | { 14 | "idiom" : "universal", 15 | "filename" : "LaunchImage@3x.png", 16 | "scale" : "3x" 17 | } 18 | ], 19 | "info" : { 20 | "version" : 1, 21 | "author" : "xcode" 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /just_audio_background/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "LaunchImage.png", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "filename" : "LaunchImage@2x.png", 11 | "scale" : "2x" 12 | }, 13 | { 14 | "idiom" : "universal", 15 | "filename" : "LaunchImage@3x.png", 16 | "scale" : "3x" 17 | } 18 | ], 19 | "info" : { 20 | "version" : 1, 21 | "author" : "xcode" 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /just_audio/example/linux/flutter/generated_plugin_registrant.cc: -------------------------------------------------------------------------------- 1 | // 2 | // Generated file. Do not edit. 3 | // 4 | 5 | // clang-format off 6 | 7 | #include "generated_plugin_registrant.h" 8 | 9 | #include 10 | 11 | void fl_register_plugins(FlPluginRegistry* registry) { 12 | g_autoptr(FlPluginRegistrar) media_kit_libs_linux_registrar = 13 | fl_plugin_registry_get_registrar_for_plugin(registry, "MediaKitLibsLinuxPlugin"); 14 | media_kit_libs_linux_plugin_register_with_registrar(media_kit_libs_linux_registrar); 15 | } 16 | -------------------------------------------------------------------------------- /just_audio/darwin/just_audio/Sources/just_audio/include/just_audio/ClippingAudioSource.h: -------------------------------------------------------------------------------- 1 | #import "AudioSource.h" 2 | #import "UriAudioSource.h" 3 | #import 4 | #if TARGET_OS_OSX 5 | #import 6 | #else 7 | #import 8 | #endif 9 | 10 | @interface ClippingAudioSource : IndexedAudioSource 11 | 12 | @property (readonly, nonatomic) UriAudioSource* audioSource; 13 | 14 | - (instancetype)initWithId:(NSString *)sid audioSource:(UriAudioSource *)audioSource start:(NSNumber *)start end:(NSNumber *)end; 15 | 16 | @end 17 | -------------------------------------------------------------------------------- /just_audio/darwin/just_audio/Sources/just_audio/include/just_audio/UriAudioSource.h: -------------------------------------------------------------------------------- 1 | #import "IndexedAudioSource.h" 2 | #import "LoadControl.h" 3 | #import 4 | #if TARGET_OS_OSX 5 | #import 6 | #else 7 | #import 8 | #endif 9 | 10 | @interface UriAudioSource : IndexedAudioSource 11 | 12 | @property (readonly, nonatomic) NSString *uri; 13 | 14 | - (instancetype)initWithId:(NSString *)sid uri:(NSString *)uri loadControl:(LoadControl *)loadControl headers:(NSDictionary *)headers options:(NSDictionary *)options; 15 | 16 | @end 17 | -------------------------------------------------------------------------------- /just_audio/example/android/build.gradle: -------------------------------------------------------------------------------- 1 | allprojects { 2 | repositories { 3 | google() 4 | mavenCentral() 5 | } 6 | } 7 | 8 | rootProject.buildDir = "../build" 9 | subprojects { 10 | project.buildDir = "${rootProject.buildDir}/${project.name}" 11 | } 12 | subprojects { 13 | project.evaluationDependsOn(":app") 14 | } 15 | 16 | tasks.register("clean", Delete) { 17 | delete rootProject.buildDir 18 | } 19 | 20 | gradle.projectsEvaluated { 21 | project(":just_audio") { 22 | tasks.withType(JavaCompile) { 23 | options.compilerArgs << "-Werror" 24 | } 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /just_audio/example/README.md: -------------------------------------------------------------------------------- 1 | # just_audio_example 2 | 3 | Demonstrates how to use the just_audio plugin. 4 | 5 | ## Getting Started 6 | 7 | This project is a starting point for a Flutter application. 8 | 9 | A few resources to get you started if this is your first Flutter project: 10 | 11 | - [Lab: Write your first Flutter app](https://flutter.dev/docs/get-started/codelab) 12 | - [Cookbook: Useful Flutter samples](https://flutter.dev/docs/cookbook) 13 | 14 | For help getting started with Flutter, view our 15 | [online documentation](https://flutter.dev/docs), which offers tutorials, 16 | samples, guidance on mobile development, and a full API reference. 17 | -------------------------------------------------------------------------------- /just_audio_background/example/README.md: -------------------------------------------------------------------------------- 1 | # just_audio_example 2 | 3 | Demonstrates how to use the just_audio plugin. 4 | 5 | ## Getting Started 6 | 7 | This project is a starting point for a Flutter application. 8 | 9 | A few resources to get you started if this is your first Flutter project: 10 | 11 | - [Lab: Write your first Flutter app](https://flutter.dev/docs/get-started/codelab) 12 | - [Cookbook: Useful Flutter samples](https://flutter.dev/docs/cookbook) 13 | 14 | For help getting started with Flutter, view our 15 | [online documentation](https://flutter.dev/docs), which offers tutorials, 16 | samples, guidance on mobile development, and a full API reference. 17 | -------------------------------------------------------------------------------- /just_audio/example/macos/Runner/Configs/Warnings.xcconfig: -------------------------------------------------------------------------------- 1 | WARNING_CFLAGS = -Wall -Wconditional-uninitialized -Wnullable-to-nonnull-conversion -Wmissing-method-return-type -Woverlength-strings 2 | GCC_WARN_UNDECLARED_SELECTOR = YES 3 | CLANG_UNDEFINED_BEHAVIOR_SANITIZER_NULLABILITY = YES 4 | CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE 5 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES 6 | CLANG_WARN_PRAGMA_PACK = YES 7 | CLANG_WARN_STRICT_PROTOTYPES = YES 8 | CLANG_WARN_COMMA = YES 9 | GCC_WARN_STRICT_SELECTOR_MATCH = YES 10 | CLANG_WARN_OBJC_REPEATED_USE_OF_WEAK = YES 11 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES 12 | GCC_WARN_SHADOW = YES 13 | CLANG_WARN_UNREACHABLE_CODE = YES 14 | -------------------------------------------------------------------------------- /just_audio/example/windows/runner/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | cmake_minimum_required(VERSION 3.15) 2 | project(runner LANGUAGES CXX) 3 | 4 | add_executable(${BINARY_NAME} WIN32 5 | "flutter_window.cpp" 6 | "main.cpp" 7 | "utils.cpp" 8 | "win32_window.cpp" 9 | "${FLUTTER_MANAGED_DIR}/generated_plugin_registrant.cc" 10 | "Runner.rc" 11 | "runner.exe.manifest" 12 | ) 13 | apply_standard_settings(${BINARY_NAME}) 14 | target_compile_definitions(${BINARY_NAME} PRIVATE "NOMINMAX") 15 | target_link_libraries(${BINARY_NAME} PRIVATE flutter flutter_wrapper_app) 16 | target_include_directories(${BINARY_NAME} PRIVATE "${CMAKE_SOURCE_DIR}") 17 | add_dependencies(${BINARY_NAME} flutter_assemble) 18 | -------------------------------------------------------------------------------- /just_audio_background/example/macos/Runner/Configs/Warnings.xcconfig: -------------------------------------------------------------------------------- 1 | WARNING_CFLAGS = -Wall -Wconditional-uninitialized -Wnullable-to-nonnull-conversion -Wmissing-method-return-type -Woverlength-strings 2 | GCC_WARN_UNDECLARED_SELECTOR = YES 3 | CLANG_UNDEFINED_BEHAVIOR_SANITIZER_NULLABILITY = YES 4 | CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE 5 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES 6 | CLANG_WARN_PRAGMA_PACK = YES 7 | CLANG_WARN_STRICT_PROTOTYPES = YES 8 | CLANG_WARN_COMMA = YES 9 | GCC_WARN_STRICT_SELECTOR_MATCH = YES 10 | CLANG_WARN_OBJC_REPEATED_USE_OF_WEAK = YES 11 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES 12 | GCC_WARN_SHADOW = YES 13 | CLANG_WARN_UNREACHABLE_CODE = YES 14 | -------------------------------------------------------------------------------- /just_audio/example/web/manifest.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "example", 3 | "short_name": "example", 4 | "start_url": ".", 5 | "display": "standalone", 6 | "background_color": "#0175C2", 7 | "theme_color": "#0175C2", 8 | "description": "A new Flutter project.", 9 | "orientation": "portrait-primary", 10 | "prefer_related_applications": false, 11 | "icons": [ 12 | { 13 | "src": "icons/Icon-192.png", 14 | "sizes": "192x192", 15 | "type": "image/png" 16 | }, 17 | { 18 | "src": "icons/Icon-512.png", 19 | "sizes": "512x512", 20 | "type": "image/png" 21 | } 22 | ] 23 | } 24 | -------------------------------------------------------------------------------- /just_audio/example/macos/Runner/Configs/AppInfo.xcconfig: -------------------------------------------------------------------------------- 1 | // Application-level settings for the Runner target. 2 | // 3 | // This may be replaced with something auto-generated from metadata (e.g., pubspec.yaml) in the 4 | // future. If not, the values below would default to using the project name when this becomes a 5 | // 'flutter create' template. 6 | 7 | // The application's name. By default this is also the title of the Flutter window. 8 | PRODUCT_NAME = example 9 | 10 | // The application's bundle identifier 11 | PRODUCT_BUNDLE_IDENTIFIER = com.ryanheise.example 12 | 13 | // The copyright displayed in application information 14 | PRODUCT_COPYRIGHT = Copyright © 2020 com.ryanheise. All rights reserved. 15 | -------------------------------------------------------------------------------- /just_audio_background/example/web/manifest.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "example", 3 | "short_name": "example", 4 | "start_url": ".", 5 | "display": "standalone", 6 | "background_color": "#0175C2", 7 | "theme_color": "#0175C2", 8 | "description": "A new Flutter project.", 9 | "orientation": "portrait-primary", 10 | "prefer_related_applications": false, 11 | "icons": [ 12 | { 13 | "src": "icons/Icon-192.png", 14 | "sizes": "192x192", 15 | "type": "image/png" 16 | }, 17 | { 18 | "src": "icons/Icon-512.png", 19 | "sizes": "512x512", 20 | "type": "image/png" 21 | } 22 | ] 23 | } 24 | -------------------------------------------------------------------------------- /just_audio/example/ios/.gitignore: -------------------------------------------------------------------------------- 1 | *.mode1v3 2 | *.mode2v3 3 | *.moved-aside 4 | *.pbxuser 5 | *.perspectivev3 6 | **/*sync/ 7 | .sconsign.dblite 8 | .tags* 9 | **/.vagrant/ 10 | **/DerivedData/ 11 | Icon? 12 | **/Pods/ 13 | **/.symlinks/ 14 | profile 15 | xcuserdata 16 | **/.generated/ 17 | Flutter/App.framework 18 | Flutter/Flutter.framework 19 | Flutter/Flutter.podspec 20 | Flutter/Generated.xcconfig 21 | Flutter/app.flx 22 | Flutter/app.zip 23 | Flutter/flutter_assets/ 24 | Flutter/flutter_export_environment.sh 25 | ServiceDefinitions.json 26 | Runner/GeneratedPluginRegistrant.* 27 | 28 | # Exceptions to above rules. 29 | !default.mode1v3 30 | !default.mode2v3 31 | !default.pbxuser 32 | !default.perspectivev3 33 | -------------------------------------------------------------------------------- /just_audio_background/example/macos/Runner/Configs/AppInfo.xcconfig: -------------------------------------------------------------------------------- 1 | // Application-level settings for the Runner target. 2 | // 3 | // This may be replaced with something auto-generated from metadata (e.g., pubspec.yaml) in the 4 | // future. If not, the values below would default to using the project name when this becomes a 5 | // 'flutter create' template. 6 | 7 | // The application's name. By default this is also the title of the Flutter window. 8 | PRODUCT_NAME = example 9 | 10 | // The application's bundle identifier 11 | PRODUCT_BUNDLE_IDENTIFIER = com.ryanheise.example 12 | 13 | // The copyright displayed in application information 14 | PRODUCT_COPYRIGHT = Copyright © 2020 com.ryanheise. All rights reserved. 15 | -------------------------------------------------------------------------------- /just_audio_background/example/ios/.gitignore: -------------------------------------------------------------------------------- 1 | *.mode1v3 2 | *.mode2v3 3 | *.moved-aside 4 | *.pbxuser 5 | *.perspectivev3 6 | **/*sync/ 7 | .sconsign.dblite 8 | .tags* 9 | **/.vagrant/ 10 | **/DerivedData/ 11 | Icon? 12 | **/Pods/ 13 | **/.symlinks/ 14 | profile 15 | xcuserdata 16 | **/.generated/ 17 | Flutter/App.framework 18 | Flutter/Flutter.framework 19 | Flutter/Flutter.podspec 20 | Flutter/Generated.xcconfig 21 | Flutter/app.flx 22 | Flutter/app.zip 23 | Flutter/flutter_assets/ 24 | Flutter/flutter_export_environment.sh 25 | ServiceDefinitions.json 26 | Runner/GeneratedPluginRegistrant.* 27 | 28 | # Exceptions to above rules. 29 | !default.mode1v3 30 | !default.mode2v3 31 | !default.pbxuser 32 | !default.perspectivev3 33 | -------------------------------------------------------------------------------- /just_audio/darwin/just_audio/Package.swift: -------------------------------------------------------------------------------- 1 | // swift-tools-version: 5.9 2 | // The swift-tools-version declares the minimum version of Swift required to build this package. 3 | 4 | import PackageDescription 5 | 6 | let package = Package( 7 | name: "just_audio", 8 | platforms: [ 9 | .iOS("12.0"), 10 | .macOS("10.14") 11 | ], 12 | products: [ 13 | .library(name: "just-audio", targets: ["just_audio"]) 14 | ], 15 | dependencies: [], 16 | targets: [ 17 | .target( 18 | name: "just_audio", 19 | dependencies: [], 20 | cSettings: [ 21 | .headerSearchPath("include/just_audio") 22 | ] 23 | ) 24 | ] 25 | ) 26 | -------------------------------------------------------------------------------- /just_audio/darwin/just_audio/Sources/just_audio/include/just_audio/AudioSource.h: -------------------------------------------------------------------------------- 1 | #import 2 | #if TARGET_OS_OSX 3 | #import 4 | #else 5 | #import 6 | #endif 7 | 8 | @interface AudioSource : NSObject 9 | 10 | @property (readonly, nonatomic) NSString* sourceId; 11 | @property (readwrite, nonatomic) BOOL lazyLoading; 12 | 13 | - (instancetype)initWithId:(NSString *)sid; 14 | - (int)buildSequence:(NSMutableArray *)sequence treeIndex:(int)treeIndex; 15 | - (void)findById:(NSString *)sourceId matches:(NSMutableArray *)matches; 16 | - (NSArray *)getShuffleIndices; 17 | - (void)decodeShuffleOrder:(NSDictionary *)dict; 18 | 19 | @end 20 | -------------------------------------------------------------------------------- /.github/workflows/lock.yml: -------------------------------------------------------------------------------- 1 | name: 'Lock Threads' 2 | 3 | on: 4 | schedule: 5 | - cron: '0 0 * * *' 6 | workflow_dispatch: 7 | 8 | permissions: 9 | issues: write 10 | pull-requests: write 11 | 12 | concurrency: 13 | group: lock 14 | 15 | jobs: 16 | action: 17 | runs-on: ubuntu-latest 18 | steps: 19 | - uses: dessant/lock-threads@v2 20 | with: 21 | github-token: ${{ secrets.GITHUB_TOKEN }} 22 | issue-lock-inactive-days: '14' 23 | issue-lock-comment: > 24 | This issue has been automatically locked since there 25 | has not been any recent activity after it was closed. 26 | Please open a new issue for related bugs, or use 27 | StackOverflow if you need help with just_audio. 28 | -------------------------------------------------------------------------------- /just_audio/example/windows/runner/utils.h: -------------------------------------------------------------------------------- 1 | #ifndef RUNNER_UTILS_H_ 2 | #define RUNNER_UTILS_H_ 3 | 4 | #include 5 | #include 6 | 7 | // Creates a console for the process, and redirects stdout and stderr to 8 | // it for both the runner and the Flutter library. 9 | void CreateAndAttachConsole(); 10 | 11 | // Takes a null-terminated wchar_t* encoded in UTF-16 and returns a std::string 12 | // encoded in UTF-8. Returns an empty std::string on failure. 13 | std::string Utf8FromUtf16(const wchar_t* utf16_string); 14 | 15 | // Gets the command line arguments passed in as a std::vector, 16 | // encoded in UTF-8. Returns an empty std::vector on failure. 17 | std::vector GetCommandLineArguments(); 18 | 19 | #endif // RUNNER_UTILS_H_ 20 | -------------------------------------------------------------------------------- /just_audio_platform_interface/pubspec.yaml: -------------------------------------------------------------------------------- 1 | name: just_audio_platform_interface 2 | description: A common platform interface for the just_audio plugin. Different platform implementations of just_audio should implement this interface. 3 | homepage: https://github.com/ryanheise/just_audio/tree/master/just_audio_platform_interface 4 | # NOTE: We strongly prefer non-breaking changes, even at the expense of a 5 | # less-clean API. See https://flutter.dev/go/platform-interface-breaking-changes 6 | version: 4.6.0 7 | 8 | dependencies: 9 | flutter: 10 | sdk: flutter 11 | plugin_platform_interface: ^2.0.0 12 | 13 | dev_dependencies: 14 | flutter_lints: ^2.0.1 15 | flutter_test: 16 | sdk: flutter 17 | mockito: ^5.0.0 18 | 19 | environment: 20 | sdk: ">=2.17.0 <4.0.0" 21 | flutter: ">=3.0.0" 22 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/documentation-request.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: Documentation request 3 | about: Suggest an improvement to the documentation 4 | title: '' 5 | labels: 1 backlog, documentation 6 | assignees: ryanheise 7 | 8 | --- 9 | 10 | 26 | 27 | **To which pages does your suggestion apply?** 28 | 29 | - Direct URL 1 30 | - Direct URL 2 31 | - ... 32 | 33 | **Quote the sentences(s) from the documentation to be improved (if any)** 34 | 35 | > Insert here. (Skip if you are proposing an entirely new section.) 36 | 37 | **Describe your suggestion** 38 | 39 | ... 40 | -------------------------------------------------------------------------------- /just_audio_web/pubspec.yaml: -------------------------------------------------------------------------------- 1 | name: just_audio_web 2 | description: Web platform implementation of just_audio. This implementation is endorsed and therefore doesn't require a direct dependency. 3 | homepage: https://github.com/ryanheise/just_audio/tree/master/just_audio_web 4 | version: 0.4.16 5 | 6 | flutter: 7 | plugin: 8 | platforms: 9 | web: 10 | pluginClass: JustAudioPlugin 11 | fileName: just_audio_web.dart 12 | 13 | dependencies: 14 | just_audio_platform_interface: ^4.5.0 15 | # just_audio_platform_interface: 16 | # path: ../just_audio_platform_interface 17 | flutter: 18 | sdk: flutter 19 | flutter_web_plugins: 20 | sdk: flutter 21 | web: ^1.0.0 22 | synchronized: ^3.2.0 23 | 24 | dev_dependencies: 25 | flutter_lints: ^2.0.1 26 | 27 | environment: 28 | sdk: ^3.2.1 29 | flutter: '>=3.16.0' 30 | -------------------------------------------------------------------------------- /just_audio/darwin/just_audio/Sources/just_audio/include/just_audio/ConcatenatingAudioSource.h: -------------------------------------------------------------------------------- 1 | #import "AudioSource.h" 2 | #import 3 | #if TARGET_OS_OSX 4 | #import 5 | #else 6 | #import 7 | #endif 8 | 9 | @interface ConcatenatingAudioSource : AudioSource 10 | 11 | @property (readonly, nonatomic) int count; 12 | 13 | - (instancetype)initWithId:(NSString *)sid audioSources:(NSMutableArray *)audioSources shuffleOrder:(NSArray *)shuffleOrder lazyLoading:(NSNumber *)lazyLoading; 14 | - (void)insertSource:(AudioSource *)audioSource atIndex:(int)index; 15 | - (void)removeSourcesFromIndex:(int)start toIndex:(int)end; 16 | - (void)moveSourceFromIndex:(int)currentIndex toIndex:(int)newIndex; 17 | - (void)setShuffleOrder:(NSArray *)shuffleOrder; 18 | 19 | @end 20 | -------------------------------------------------------------------------------- /just_audio/example/android/settings.gradle: -------------------------------------------------------------------------------- 1 | pluginManagement { 2 | def flutterSdkPath = { 3 | def properties = new Properties() 4 | file("local.properties").withInputStream { properties.load(it) } 5 | def flutterSdkPath = properties.getProperty("flutter.sdk") 6 | assert flutterSdkPath != null, "flutter.sdk not set in local.properties" 7 | return flutterSdkPath 8 | }() 9 | 10 | includeBuild("$flutterSdkPath/packages/flutter_tools/gradle") 11 | 12 | repositories { 13 | google() 14 | mavenCentral() 15 | gradlePluginPortal() 16 | } 17 | } 18 | 19 | plugins { 20 | id "dev.flutter.flutter-plugin-loader" version "1.0.0" 21 | id "com.android.application" version "8.5.2" apply false 22 | id "org.jetbrains.kotlin.android" version "1.8.22" apply false 23 | } 24 | 25 | include ":app" 26 | -------------------------------------------------------------------------------- /just_audio_background/pubspec.yaml: -------------------------------------------------------------------------------- 1 | name: just_audio_background 2 | description: An add-on for just_audio that supports background playback and media notifications. 3 | homepage: https://github.com/ryanheise/just_audio/tree/master/just_audio_background 4 | version: 0.0.1-beta.17 5 | topics: 6 | - audio 7 | - sound 8 | - player 9 | - background 10 | 11 | dependencies: 12 | just_audio_platform_interface: ^4.5.0 13 | # just_audio_platform_interface: 14 | # path: ../just_audio_platform_interface 15 | audio_service: ^0.18.18 16 | audio_session: ">=0.1.24 <0.3.0" 17 | flutter: 18 | sdk: flutter 19 | flutter_web_plugins: 20 | sdk: flutter 21 | meta: ^1.3.0 22 | rxdart: '>=0.26.0 <0.29.0' 23 | synchronized: ^3.3.0+3 24 | 25 | dev_dependencies: 26 | flutter_lints: ^2.0.1 27 | 28 | environment: 29 | sdk: ^3.6.0 30 | flutter: ">=3.27.0" 31 | -------------------------------------------------------------------------------- /just_audio_background/example/android/settings.gradle: -------------------------------------------------------------------------------- 1 | pluginManagement { 2 | def flutterSdkPath = { 3 | def properties = new Properties() 4 | file("local.properties").withInputStream { properties.load(it) } 5 | def flutterSdkPath = properties.getProperty("flutter.sdk") 6 | assert flutterSdkPath != null, "flutter.sdk not set in local.properties" 7 | return flutterSdkPath 8 | }() 9 | 10 | includeBuild("$flutterSdkPath/packages/flutter_tools/gradle") 11 | 12 | repositories { 13 | google() 14 | mavenCentral() 15 | gradlePluginPortal() 16 | } 17 | } 18 | 19 | plugins { 20 | id "dev.flutter.flutter-plugin-loader" version "1.0.0" 21 | id "com.android.application" version "8.5.2" apply false 22 | id "org.jetbrains.kotlin.android" version "1.8.22" apply false 23 | } 24 | 25 | include ":app" 26 | -------------------------------------------------------------------------------- /just_audio_web/ios/just_audio_web.podspec: -------------------------------------------------------------------------------- 1 | # 2 | # To learn more about a Podspec see http://guides.cocoapods.org/syntax/podspec.html 3 | # 4 | Pod::Spec.new do |s| 5 | s.name = 'just_audio_web' 6 | s.version = '0.0.1' 7 | s.summary = 'No-op implementation of just_audio_web web plugin to avoid build issues on iOS' 8 | s.description = <<-DESC 9 | temp fake just_audio_web plugin 10 | DESC 11 | s.homepage = 'https://github.com/ryanheise/just_audio/tree/master/just_audio_web' 12 | s.license = { :file => '../LICENSE' } 13 | s.author = { 'Your Company' => 'email@example.com' } 14 | s.source = { :path => '.' } 15 | s.source_files = 'Classes/**/*' 16 | s.public_header_files = 'Classes/**/*.h' 17 | s.dependency 'Flutter' 18 | 19 | s.ios.deployment_target = '8.0' 20 | end 21 | -------------------------------------------------------------------------------- /just_audio_background/ios/just_audio_web.podspec: -------------------------------------------------------------------------------- 1 | # 2 | # To learn more about a Podspec see http://guides.cocoapods.org/syntax/podspec.html 3 | # 4 | Pod::Spec.new do |s| 5 | s.name = 'just_audio_web' 6 | s.version = '0.0.1' 7 | s.summary = 'No-op implementation of just_audio_web web plugin to avoid build issues on iOS' 8 | s.description = <<-DESC 9 | temp fake just_audio_web plugin 10 | DESC 11 | s.homepage = 'https://github.com/ryanheise/just_audio/tree/master/just_audio_web' 12 | s.license = { :file => '../LICENSE' } 13 | s.author = { 'Your Company' => 'email@example.com' } 14 | s.source = { :path => '.' } 15 | s.source_files = 'Classes/**/*' 16 | s.public_header_files = 'Classes/**/*.h' 17 | s.dependency 'Flutter' 18 | 19 | s.ios.deployment_target = '8.0' 20 | end 21 | -------------------------------------------------------------------------------- /just_audio/example/linux/flutter/generated_plugins.cmake: -------------------------------------------------------------------------------- 1 | # 2 | # Generated file, do not edit. 3 | # 4 | 5 | list(APPEND FLUTTER_PLUGIN_LIST 6 | media_kit_libs_linux 7 | ) 8 | 9 | list(APPEND FLUTTER_FFI_PLUGIN_LIST 10 | ) 11 | 12 | set(PLUGIN_BUNDLED_LIBRARIES) 13 | 14 | foreach(plugin ${FLUTTER_PLUGIN_LIST}) 15 | add_subdirectory(flutter/ephemeral/.plugin_symlinks/${plugin}/linux plugins/${plugin}) 16 | target_link_libraries(${BINARY_NAME} PRIVATE ${plugin}_plugin) 17 | list(APPEND PLUGIN_BUNDLED_LIBRARIES $) 18 | list(APPEND PLUGIN_BUNDLED_LIBRARIES ${${plugin}_bundled_libraries}) 19 | endforeach(plugin) 20 | 21 | foreach(ffi_plugin ${FLUTTER_FFI_PLUGIN_LIST}) 22 | add_subdirectory(flutter/ephemeral/.plugin_symlinks/${ffi_plugin}/linux plugins/${ffi_plugin}) 23 | list(APPEND PLUGIN_BUNDLED_LIBRARIES ${${ffi_plugin}_bundled_libraries}) 24 | endforeach(ffi_plugin) 25 | -------------------------------------------------------------------------------- /just_audio/example/windows/flutter/generated_plugins.cmake: -------------------------------------------------------------------------------- 1 | # 2 | # Generated file, do not edit. 3 | # 4 | 5 | list(APPEND FLUTTER_PLUGIN_LIST 6 | media_kit_libs_windows_audio 7 | ) 8 | 9 | list(APPEND FLUTTER_FFI_PLUGIN_LIST 10 | ) 11 | 12 | set(PLUGIN_BUNDLED_LIBRARIES) 13 | 14 | foreach(plugin ${FLUTTER_PLUGIN_LIST}) 15 | add_subdirectory(flutter/ephemeral/.plugin_symlinks/${plugin}/windows plugins/${plugin}) 16 | target_link_libraries(${BINARY_NAME} PRIVATE ${plugin}_plugin) 17 | list(APPEND PLUGIN_BUNDLED_LIBRARIES $) 18 | list(APPEND PLUGIN_BUNDLED_LIBRARIES ${${plugin}_bundled_libraries}) 19 | endforeach(plugin) 20 | 21 | foreach(ffi_plugin ${FLUTTER_FFI_PLUGIN_LIST}) 22 | add_subdirectory(flutter/ephemeral/.plugin_symlinks/${ffi_plugin}/windows plugins/${ffi_plugin}) 23 | list(APPEND PLUGIN_BUNDLED_LIBRARIES ${${ffi_plugin}_bundled_libraries}) 24 | endforeach(ffi_plugin) 25 | -------------------------------------------------------------------------------- /just_audio/darwin/just_audio/Sources/just_audio/include/just_audio/AudioPlayer.h: -------------------------------------------------------------------------------- 1 | #import 2 | #if TARGET_OS_OSX 3 | #import 4 | #else 5 | #import 6 | #endif 7 | 8 | @interface AudioPlayer : NSObject 9 | 10 | @property (readonly, nonatomic) AVQueuePlayer *player; 11 | @property (readonly, nonatomic) float speed; 12 | 13 | - (instancetype)initWithRegistrar:(NSObject *)registrar playerId:(NSString*)idParam loadConfiguration:(NSDictionary *)loadConfiguration useLazyPreparation:(BOOL)useLazyPreparation; 14 | - (void)dispose:(BOOL)calledFromDealloc; 15 | 16 | @end 17 | 18 | enum ProcessingState { 19 | psIdle, 20 | psLoading, 21 | psBuffering, 22 | psReady, 23 | psCompleted 24 | }; 25 | 26 | enum LoopMode { 27 | lmLoopOff, 28 | lmLoopOne, 29 | lmLoopAll 30 | }; 31 | -------------------------------------------------------------------------------- /just_audio_web/.gitignore: -------------------------------------------------------------------------------- 1 | # Miscellaneous 2 | *.class 3 | *.log 4 | *.pyc 5 | *.swp 6 | .DS_Store 7 | .atom/ 8 | .buildlog/ 9 | .history 10 | .svn/ 11 | 12 | # IntelliJ related 13 | *.iml 14 | *.ipr 15 | *.iws 16 | .idea/ 17 | 18 | # The .vscode folder contains launch configuration and tasks you configure in 19 | # VS Code which you may wish to be included in version control, so this line 20 | # is commented out by default. 21 | #.vscode/ 22 | 23 | # Flutter/Dart/Pub related 24 | **/doc/api/ 25 | **/ios/Flutter/.last_build_id 26 | .dart_tool/ 27 | .flutter-plugins 28 | .flutter-plugins-dependencies 29 | .packages 30 | .pub-cache/ 31 | .pub/ 32 | /build/ 33 | 34 | # Web related 35 | lib/generated_plugin_registrant.dart 36 | 37 | # Symbolication related 38 | app.*.symbols 39 | 40 | # Obfuscation related 41 | app.*.map.json 42 | 43 | # Exceptions to above rules. 44 | !/packages/flutter_tools/test/data/dart_dependencies_test/**/.packages 45 | -------------------------------------------------------------------------------- /just_audio_background/.gitignore: -------------------------------------------------------------------------------- 1 | # Miscellaneous 2 | *.class 3 | *.log 4 | *.pyc 5 | *.swp 6 | .DS_Store 7 | .atom/ 8 | .buildlog/ 9 | .history 10 | .svn/ 11 | 12 | # IntelliJ related 13 | *.iml 14 | *.ipr 15 | *.iws 16 | .idea/ 17 | 18 | # The .vscode folder contains launch configuration and tasks you configure in 19 | # VS Code which you may wish to be included in version control, so this line 20 | # is commented out by default. 21 | #.vscode/ 22 | 23 | # Flutter/Dart/Pub related 24 | **/doc/api/ 25 | **/ios/Flutter/.last_build_id 26 | .dart_tool/ 27 | .flutter-plugins 28 | .flutter-plugins-dependencies 29 | .packages 30 | .pub-cache/ 31 | .pub/ 32 | /build/ 33 | 34 | # Web related 35 | lib/generated_plugin_registrant.dart 36 | 37 | # Symbolication related 38 | app.*.symbols 39 | 40 | # Obfuscation related 41 | app.*.map.json 42 | 43 | # Exceptions to above rules. 44 | !/packages/flutter_tools/test/data/dart_dependencies_test/**/.packages 45 | -------------------------------------------------------------------------------- /just_audio/example/ios/Flutter/AppFrameworkInfo.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | $(DEVELOPMENT_LANGUAGE) 7 | CFBundleExecutable 8 | App 9 | CFBundleIdentifier 10 | io.flutter.flutter.app 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | App 15 | CFBundlePackageType 16 | FMWK 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | 1.0 23 | MinimumOSVersion 24 | 12.0 25 | 26 | 27 | -------------------------------------------------------------------------------- /just_audio_background/example/ios/Flutter/AppFrameworkInfo.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | $(DEVELOPMENT_LANGUAGE) 7 | CFBundleExecutable 8 | App 9 | CFBundleIdentifier 10 | io.flutter.flutter.app 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | App 15 | CFBundlePackageType 16 | FMWK 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | 1.0 23 | MinimumOSVersion 24 | 12.0 25 | 26 | 27 | -------------------------------------------------------------------------------- /just_audio/darwin/just_audio.podspec: -------------------------------------------------------------------------------- 1 | # 2 | # To learn more about a Podspec see http://guides.cocoapods.org/syntax/podspec.html 3 | # 4 | Pod::Spec.new do |s| 5 | s.name = 'just_audio' 6 | s.version = '0.0.1' 7 | s.summary = 'Flutter audio player' 8 | s.description = <<-DESC 9 | A flutter plugin for playing audio. 10 | DESC 11 | s.homepage = 'https://github.com/ryanheise/just_audio' 12 | s.license = { :file => '../LICENSE' } 13 | s.author = { 'Your Company' => 'email@example.com' } 14 | s.source = { :path => '.' } 15 | s.source_files = 'just_audio/Sources/just_audio/**/*.{h,m}' 16 | s.public_header_files = 'just_audio/Sources/just_audio/include/**/*.h' 17 | s.ios.dependency 'Flutter' 18 | s.osx.dependency 'FlutterMacOS' 19 | s.ios.deployment_target = '12.0' 20 | s.osx.deployment_target = '10.14' 21 | s.pod_target_xcconfig = { 'DEFINES_MODULE' => 'YES' } 22 | end 23 | -------------------------------------------------------------------------------- /just_audio/example/windows/runner/runner.exe.manifest: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | PerMonitorV2 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | -------------------------------------------------------------------------------- /just_audio_background/example/test/widget_test.dart: -------------------------------------------------------------------------------- 1 | // This is a basic Flutter widget test. 2 | // 3 | // To perform an interaction with a widget in your test, use the WidgetTester 4 | // utility that Flutter provides. For example, you can send tap and scroll 5 | // gestures. You can also use WidgetTester to find child widgets in the widget 6 | // tree, read text, and verify that the values of widget properties are correct. 7 | 8 | import 'package:flutter/material.dart'; 9 | import 'package:flutter_test/flutter_test.dart'; 10 | 11 | import 'package:just_audio_example/main.dart'; 12 | 13 | void main() { 14 | testWidgets('Verify Playlist', (WidgetTester tester) async { 15 | // Build our app and trigger a frame. 16 | await tester.pumpWidget(const MyApp()); 17 | 18 | expect( 19 | find.byWidgetPredicate( 20 | (Widget widget) => 21 | widget is Text && widget.data!.startsWith('Playlist'), 22 | ), 23 | findsOneWidget, 24 | ); 25 | }); 26 | } 27 | -------------------------------------------------------------------------------- /just_audio/example/test/widget_test.dart: -------------------------------------------------------------------------------- 1 | // This is a basic Flutter widget test. 2 | // 3 | // To perform an interaction with a widget in your test, use the WidgetTester 4 | // utility that Flutter provides. For example, you can send tap and scroll 5 | // gestures. You can also use WidgetTester to find child widgets in the widget 6 | // tree, read text, and verify that the values of widget properties are correct. 7 | 8 | import 'package:flutter/material.dart'; 9 | import 'package:flutter_test/flutter_test.dart'; 10 | 11 | import 'package:just_audio_example/example_playlist.dart'; 12 | 13 | void main() { 14 | testWidgets('Verify Playlist', (WidgetTester tester) async { 15 | // Build our app and trigger a frame. 16 | await tester.pumpWidget(const MyApp()); 17 | 18 | expect( 19 | find.byWidgetPredicate( 20 | (Widget widget) => 21 | widget is Text && widget.data!.startsWith('Playlist'), 22 | ), 23 | findsOneWidget, 24 | ); 25 | }); 26 | } 27 | -------------------------------------------------------------------------------- /just_audio_platform_interface/README.md: -------------------------------------------------------------------------------- 1 | # just_audio_platform_interface 2 | 3 | A common platform interface for the [`just_audio`](../just_audio) plugin. 4 | 5 | This interface allows platform-specific implementations of the `just_audio` plugin, as well as the plugin itself, to ensure they are supporting the same interface. 6 | 7 | # Usage 8 | 9 | To implement a new platform-specific implementation of `just_audio`, extend [`JustAudioPlatform`](lib/just_audio_platform_interface.dart) with an implementation that performs the platform-specific behavior, and when you register your plugin, set the default `JustAudioPlatform` by calling `JustAudioPlatform.instance = MyPlatformJustAudio()`. 10 | 11 | # Note on breaking changes 12 | 13 | Strongly prefer non-breaking changes (such as adding a method to the interface) over breaking changes for this package. 14 | 15 | See https://flutter.dev/go/platform-interface-breaking-changes for a discussion on why a less-clean interface is preferable to a breaking change. 16 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/feature_request.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: Feature request 3 | about: Suggest an idea for this project 4 | title: '' 5 | labels: 1 backlog, enhancement 6 | assignees: ryanheise 7 | 8 | --- 9 | 10 | 26 | 27 | **Is your feature request related to a problem? Please describe.** 28 | A clear and concise description of what the problem is. Ex. I'm always frustrated when [...] 29 | 30 | **Describe the solution you'd like** 31 | A clear and concise description of what you want to happen. 32 | 33 | **Describe alternatives you've considered** 34 | A clear and concise description of any alternative solutions or features you've considered. 35 | 36 | **Additional context** 37 | Add any other context or screenshots about the feature request here. 38 | -------------------------------------------------------------------------------- /just_audio_background/example/pubspec.yaml: -------------------------------------------------------------------------------- 1 | name: just_audio_example 2 | description: Demonstrates how to use the just_audio plugin. 3 | publish_to: 'none' 4 | 5 | environment: 6 | sdk: ">=3.0.0 <4.0.0" 7 | 8 | dependencies: 9 | flutter: 10 | sdk: flutter 11 | audio_session: ^0.2.0 12 | rxdart: ^0.27.2 13 | just_audio: 14 | path: ../../just_audio 15 | just_audio_background: 16 | path: .. 17 | 18 | # Uncomment when testing platform interface changes. 19 | # dependency_overrides: 20 | # just_audio_platform_interface: 21 | # path: ../../just_audio_platform_interface 22 | # just_audio_web: 23 | # path: ../../just_audio_web 24 | 25 | dev_dependencies: 26 | # TODO: uncomment these dependencies when they have nullsafe versions. 27 | # flutter_driver: 28 | # sdk: flutter 29 | flutter_lints: ^2.0.1 30 | flutter_test: 31 | sdk: flutter 32 | # integration_test: ^1.0.1 33 | test: ^1.16.5 34 | 35 | flutter: 36 | uses-material-design: true 37 | 38 | assets: 39 | - audio/ 40 | -------------------------------------------------------------------------------- /just_audio/darwin/just_audio/Sources/just_audio/AudioSource.m: -------------------------------------------------------------------------------- 1 | #import "./include/just_audio/AudioSource.h" 2 | #import 3 | 4 | @implementation AudioSource { 5 | NSString *_sourceId; 6 | } 7 | 8 | - (instancetype)initWithId:(NSString *)sid { 9 | self = [super init]; 10 | NSAssert(self, @"super init cannot be nil"); 11 | _sourceId = sid; 12 | return self; 13 | } 14 | 15 | - (NSString *)sourceId { 16 | return _sourceId; 17 | } 18 | 19 | - (BOOL)lazyLoading { 20 | return NO; 21 | } 22 | 23 | - (void)setLazyLoading:(BOOL)lazyLoading { 24 | } 25 | 26 | - (int)buildSequence:(NSMutableArray *)sequence treeIndex:(int)treeIndex { 27 | return 0; 28 | } 29 | 30 | - (void)findById:(NSString *)sourceId matches:(NSMutableArray *)matches { 31 | if ([_sourceId isEqualToString:sourceId]) { 32 | [matches addObject:self]; 33 | } 34 | } 35 | 36 | - (NSArray *)getShuffleIndices { 37 | return @[]; 38 | } 39 | 40 | - (void)decodeShuffleOrder:(NSDictionary *)dict { 41 | } 42 | 43 | @end 44 | -------------------------------------------------------------------------------- /just_audio/example/windows/runner/flutter_window.h: -------------------------------------------------------------------------------- 1 | #ifndef RUNNER_FLUTTER_WINDOW_H_ 2 | #define RUNNER_FLUTTER_WINDOW_H_ 3 | 4 | #include 5 | #include 6 | 7 | #include 8 | 9 | #include "win32_window.h" 10 | 11 | // A window that does nothing but host a Flutter view. 12 | class FlutterWindow : public Win32Window { 13 | public: 14 | // Creates a new FlutterWindow hosting a Flutter view running |project|. 15 | explicit FlutterWindow(const flutter::DartProject& project); 16 | virtual ~FlutterWindow(); 17 | 18 | protected: 19 | // Win32Window: 20 | bool OnCreate() override; 21 | void OnDestroy() override; 22 | LRESULT MessageHandler(HWND window, UINT const message, WPARAM const wparam, 23 | LPARAM const lparam) noexcept override; 24 | 25 | private: 26 | // The project to run. 27 | flutter::DartProject project_; 28 | 29 | // The Flutter instance hosted by this window. 30 | std::unique_ptr flutter_controller_; 31 | }; 32 | 33 | #endif // RUNNER_FLUTTER_WINDOW_H_ 34 | -------------------------------------------------------------------------------- /just_audio_web/LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2020 Ryan Heise and the project contributors. 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /just_audio_background/LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2021 Ryan Heise and the project contributors. 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /just_audio_platform_interface/LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2020 Ryan Heise and the project contributors. 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /just_audio/example/macos/Runner/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | $(DEVELOPMENT_LANGUAGE) 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIconFile 10 | 11 | CFBundleIdentifier 12 | $(PRODUCT_BUNDLE_IDENTIFIER) 13 | CFBundleInfoDictionaryVersion 14 | 6.0 15 | CFBundleName 16 | $(PRODUCT_NAME) 17 | CFBundlePackageType 18 | APPL 19 | CFBundleShortVersionString 20 | $(FLUTTER_BUILD_NAME) 21 | CFBundleVersion 22 | $(FLUTTER_BUILD_NUMBER) 23 | LSMinimumSystemVersion 24 | $(MACOSX_DEPLOYMENT_TARGET) 25 | NSHumanReadableCopyright 26 | $(PRODUCT_COPYRIGHT) 27 | NSMainNibFile 28 | MainMenu 29 | NSPrincipalClass 30 | NSApplication 31 | 32 | 33 | -------------------------------------------------------------------------------- /just_audio/example/pubspec.yaml: -------------------------------------------------------------------------------- 1 | name: just_audio_example 2 | description: Demonstrates how to use the just_audio plugin. 3 | publish_to: 'none' 4 | 5 | environment: 6 | sdk: ">=3.0.0 <4.0.0" 7 | 8 | dependencies: 9 | flutter: 10 | sdk: flutter 11 | audio_session: ^0.2.0 12 | rxdart: ^0.28.0 13 | just_audio_media_kit: ^2.1.0 14 | media_kit_libs_linux: any 15 | media_kit_libs_windows_audio: any 16 | # Other platform implementations below: 17 | # just_audio_windows: ^0.2.0 18 | # just_audio_libwinmedia: ^0.0.4 19 | just_audio: 20 | path: ../ 21 | 22 | # Uncomment when testing platform interface changes. 23 | # dependency_overrides: 24 | # just_audio_platform_interface: 25 | # path: ../../just_audio_platform_interface 26 | # just_audio_web: 27 | # path: ../../just_audio_web 28 | 29 | dev_dependencies: 30 | # TODO: uncomment these dependencies when they have nullsafe versions. 31 | # flutter_driver: 32 | # sdk: flutter 33 | flutter_test: 34 | sdk: flutter 35 | # integration_test: ^1.0.1 36 | test: ^1.16.4 37 | flutter_lints: ^2.0.1 38 | 39 | flutter: 40 | # disable-swift-package-manager: true 41 | uses-material-design: true 42 | 43 | assets: 44 | - audio/ 45 | -------------------------------------------------------------------------------- /just_audio_background/example/macos/Runner/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | $(DEVELOPMENT_LANGUAGE) 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIconFile 10 | 11 | CFBundleIdentifier 12 | $(PRODUCT_BUNDLE_IDENTIFIER) 13 | CFBundleInfoDictionaryVersion 14 | 6.0 15 | CFBundleName 16 | $(PRODUCT_NAME) 17 | CFBundlePackageType 18 | APPL 19 | CFBundleShortVersionString 20 | $(FLUTTER_BUILD_NAME) 21 | CFBundleVersion 22 | $(FLUTTER_BUILD_NUMBER) 23 | LSMinimumSystemVersion 24 | $(MACOSX_DEPLOYMENT_TARGET) 25 | NSHumanReadableCopyright 26 | $(PRODUCT_COPYRIGHT) 27 | NSMainNibFile 28 | MainMenu 29 | NSPrincipalClass 30 | NSApplication 31 | 32 | 33 | -------------------------------------------------------------------------------- /just_audio/example/web/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | example 18 | 19 | 20 | 21 | 24 | 31 | 32 | 33 | 34 | -------------------------------------------------------------------------------- /just_audio_background/example/web/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | example 18 | 19 | 20 | 21 | 24 | 31 | 32 | 33 | 34 | -------------------------------------------------------------------------------- /just_audio/darwin/just_audio/Sources/just_audio/include/just_audio/IndexedAudioSource.h: -------------------------------------------------------------------------------- 1 | #import "AudioSource.h" 2 | #import "IndexedPlayerItem.h" 3 | #import 4 | #if TARGET_OS_OSX 5 | #import 6 | #else 7 | #import 8 | #endif 9 | 10 | @interface IndexedAudioSource : AudioSource 11 | 12 | @property (readonly, nonatomic) IndexedPlayerItem *playerItem; 13 | @property (readonly, nonatomic) IndexedPlayerItem *playerItem2; 14 | @property (readwrite, nonatomic) CMTime duration; 15 | @property (readonly, nonatomic) CMTime position; 16 | @property (readonly, nonatomic) CMTime bufferedPosition; 17 | @property (readonly, nonatomic) BOOL isAttached; 18 | 19 | - (void)onStatusChanged:(AVPlayerItemStatus)status; 20 | - (void)attach:(AVQueuePlayer *)player initialPos:(CMTime)initialPos; 21 | - (void)play:(AVQueuePlayer *)player; 22 | - (void)pause:(AVQueuePlayer *)player; 23 | - (void)stop:(AVQueuePlayer *)player; 24 | - (void)seek:(CMTime)position; 25 | - (void)seek:(CMTime)position completionHandler:(void (^)(BOOL))completionHandler; 26 | - (void)preparePlayerItem2; 27 | - (void)flip; 28 | - (void)applyPreferredForwardBufferDuration; 29 | - (void)applyCanUseNetworkResourcesForLiveStreamingWhilePaused; 30 | - (void)applyPreferredPeakBitRate; 31 | 32 | @end 33 | -------------------------------------------------------------------------------- /just_audio/darwin/just_audio/Sources/just_audio/BetterEventChannel.m: -------------------------------------------------------------------------------- 1 | #import "./include/just_audio/BetterEventChannel.h" 2 | 3 | @implementation BetterEventChannel { 4 | FlutterEventChannel *_eventChannel; 5 | FlutterEventSink _eventSink; 6 | } 7 | 8 | - (instancetype)initWithName:(NSString*)name messenger:(NSObject *)messenger { 9 | self = [super init]; 10 | NSAssert(self, @"super init cannot be nil"); 11 | _eventChannel = 12 | [FlutterEventChannel eventChannelWithName:name binaryMessenger:messenger]; 13 | [_eventChannel setStreamHandler:self]; 14 | _eventSink = nil; 15 | return self; 16 | } 17 | 18 | - (FlutterError*)onListenWithArguments:(id)arguments eventSink:(FlutterEventSink)eventSink { 19 | _eventSink = eventSink; 20 | return nil; 21 | } 22 | 23 | - (FlutterError*)onCancelWithArguments:(id)arguments { 24 | _eventSink = nil; 25 | return nil; 26 | } 27 | 28 | - (void)sendEvent:(id)event { 29 | if (!_eventSink) return; 30 | _eventSink(event); 31 | } 32 | 33 | - (void)dispose { 34 | if (_eventSink) { 35 | @try { 36 | _eventSink(FlutterEndOfEventStream); 37 | } @catch (NSException *exception) { 38 | NSLog(@"Exception while ending event stream: %@", exception.reason); 39 | } 40 | } 41 | [_eventChannel setStreamHandler:nil]; 42 | } 43 | 44 | @end 45 | -------------------------------------------------------------------------------- /just_audio/android/src/main/java/com/ryanheise/just_audio/BetterEventChannel.java: -------------------------------------------------------------------------------- 1 | package com.ryanheise.just_audio; 2 | 3 | import io.flutter.plugin.common.BinaryMessenger; 4 | import io.flutter.plugin.common.EventChannel; 5 | import io.flutter.plugin.common.EventChannel.EventSink; 6 | 7 | public class BetterEventChannel implements EventSink { 8 | private EventSink eventSink; 9 | 10 | public BetterEventChannel(final BinaryMessenger messenger, final String id) { 11 | EventChannel eventChannel = new EventChannel(messenger, id); 12 | eventChannel.setStreamHandler(new EventChannel.StreamHandler() { 13 | @Override 14 | public void onListen(final Object arguments, final EventSink eventSink) { 15 | BetterEventChannel.this.eventSink = eventSink; 16 | } 17 | 18 | @Override 19 | public void onCancel(final Object arguments) { 20 | eventSink = null; 21 | } 22 | }); 23 | } 24 | 25 | @Override 26 | public void success(Object event) { 27 | if (eventSink != null) eventSink.success(event); 28 | } 29 | 30 | @Override 31 | public void error(String errorCode, String errorMessage, Object errorDetails) { 32 | if (eventSink != null) eventSink.error(errorCode, errorMessage, errorDetails); 33 | } 34 | 35 | @Override 36 | public void endOfStream() { 37 | if (eventSink != null) eventSink.endOfStream(); 38 | } 39 | } 40 | -------------------------------------------------------------------------------- /just_audio/example/windows/runner/main.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #include 4 | 5 | #include "flutter_window.h" 6 | #include "utils.h" 7 | 8 | int APIENTRY wWinMain(_In_ HINSTANCE instance, _In_opt_ HINSTANCE prev, 9 | _In_ wchar_t *command_line, _In_ int show_command) { 10 | // Attach to console when present (e.g., 'flutter run') or create a 11 | // new console when running with a debugger. 12 | if (!::AttachConsole(ATTACH_PARENT_PROCESS) && ::IsDebuggerPresent()) { 13 | CreateAndAttachConsole(); 14 | } 15 | 16 | // Initialize COM, so that it is available for use in the library and/or 17 | // plugins. 18 | ::CoInitializeEx(nullptr, COINIT_APARTMENTTHREADED); 19 | 20 | flutter::DartProject project(L"data"); 21 | 22 | std::vector command_line_arguments = 23 | GetCommandLineArguments(); 24 | 25 | project.set_dart_entrypoint_arguments(std::move(command_line_arguments)); 26 | 27 | FlutterWindow window(project); 28 | Win32Window::Point origin(10, 10); 29 | Win32Window::Size size(1280, 720); 30 | if (!window.CreateAndShow(L"just_audio_example", origin, size)) { 31 | return EXIT_FAILURE; 32 | } 33 | window.SetQuitOnClose(true); 34 | 35 | ::MSG msg; 36 | while (::GetMessage(&msg, nullptr, 0, 0)) { 37 | ::TranslateMessage(&msg); 38 | ::DispatchMessage(&msg); 39 | } 40 | 41 | ::CoUninitialize(); 42 | return EXIT_SUCCESS; 43 | } 44 | -------------------------------------------------------------------------------- /just_audio_background/.pubignore: -------------------------------------------------------------------------------- 1 | # 2 | # Copied from ../.gitignore 3 | # 4 | 5 | flutter_export_environment.sh 6 | 7 | **/Flutter/App.framework/ 8 | **/Flutter/ephemeral/ 9 | **/Flutter/Flutter.framework/ 10 | **/Flutter/Generated.xcconfig 11 | **/Flutter/flutter_assets/ 12 | 13 | generated_plugin_registrant.dart 14 | GeneratedPluginRegistrant.h 15 | GeneratedPluginRegistrant.m 16 | GeneratedPluginRegistrant.java 17 | GeneratedPluginRegistrant.swift 18 | build/ 19 | .flutter-plugins 20 | coverage 21 | pubspec.lock 22 | 23 | # 24 | # Copied from .gitignore 25 | # 26 | 27 | # Miscellaneous 28 | *.class 29 | *.log 30 | *.pyc 31 | *.swp 32 | .DS_Store 33 | .atom/ 34 | .buildlog/ 35 | .history 36 | .svn/ 37 | 38 | # IntelliJ related 39 | *.iml 40 | *.ipr 41 | *.iws 42 | .idea/ 43 | 44 | # The .vscode folder contains launch configuration and tasks you configure in 45 | # VS Code which you may wish to be included in version control, so this line 46 | # is commented out by default. 47 | #.vscode/ 48 | 49 | # Flutter/Dart/Pub related 50 | **/doc/api/ 51 | **/ios/Flutter/.last_build_id 52 | .dart_tool/ 53 | .flutter-plugins 54 | .flutter-plugins-dependencies 55 | .packages 56 | .pub-cache/ 57 | .pub/ 58 | /build/ 59 | 60 | # Web related 61 | lib/generated_plugin_registrant.dart 62 | 63 | # Symbolication related 64 | app.*.symbols 65 | 66 | # Obfuscation related 67 | app.*.map.json 68 | 69 | # Exceptions to above rules. 70 | !/packages/flutter_tools/test/data/dart_dependencies_test/**/.packages 71 | -------------------------------------------------------------------------------- /just_audio_background/example/android/app/build.gradle: -------------------------------------------------------------------------------- 1 | plugins { 2 | id "com.android.application" 3 | id "kotlin-android" 4 | id "dev.flutter.flutter-gradle-plugin" 5 | } 6 | 7 | android { 8 | namespace 'com.ryanheise.just_audio_example' 9 | compileSdk flutter.compileSdkVersion 10 | 11 | compileOptions { 12 | sourceCompatibility = JavaVersion.VERSION_11 13 | targetCompatibility = JavaVersion.VERSION_11 14 | } 15 | 16 | defaultConfig { 17 | // TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html). 18 | applicationId "com.ryanheise.just_audio_example" 19 | minSdk flutter.minSdkVersion 20 | targetSdk flutter.targetSdkVersion 21 | versionCode flutter.versionCode 22 | versionName flutter.versionName 23 | } 24 | 25 | buildTypes { 26 | release { 27 | // TODO: Add your own signing config for the release build. 28 | // Signing with the debug keys for now, so `flutter run --release` works. 29 | signingConfig signingConfigs.debug 30 | } 31 | } 32 | 33 | lint { 34 | disable 'InvalidPackage' 35 | } 36 | } 37 | 38 | flutter { 39 | source '../..' 40 | } 41 | 42 | dependencies { 43 | testImplementation 'junit:junit:4.12' 44 | androidTestImplementation 'androidx.test:runner:1.1.1' 45 | androidTestImplementation 'androidx.test.espresso:espresso-core:3.1.1' 46 | } 47 | -------------------------------------------------------------------------------- /just_audio/example/macos/Podfile: -------------------------------------------------------------------------------- 1 | platform :osx, '10.15' 2 | 3 | # CocoaPods analytics sends network stats synchronously affecting flutter build latency. 4 | ENV['COCOAPODS_DISABLE_STATS'] = 'true' 5 | 6 | project 'Runner', { 7 | 'Debug' => :debug, 8 | 'Profile' => :release, 9 | 'Release' => :release, 10 | } 11 | 12 | def flutter_root 13 | generated_xcode_build_settings_path = File.expand_path(File.join('..', 'Flutter', 'ephemeral', 'Flutter-Generated.xcconfig'), __FILE__) 14 | unless File.exist?(generated_xcode_build_settings_path) 15 | raise "#{generated_xcode_build_settings_path} must exist. If you're running pod install manually, make sure \"flutter pub get\" is executed first" 16 | end 17 | 18 | File.foreach(generated_xcode_build_settings_path) do |line| 19 | matches = line.match(/FLUTTER_ROOT\=(.*)/) 20 | return matches[1].strip if matches 21 | end 22 | raise "FLUTTER_ROOT not found in #{generated_xcode_build_settings_path}. Try deleting Flutter-Generated.xcconfig, then run \"flutter pub get\"" 23 | end 24 | 25 | require File.expand_path(File.join('packages', 'flutter_tools', 'bin', 'podhelper'), flutter_root) 26 | 27 | flutter_macos_podfile_setup 28 | 29 | target 'Runner' do 30 | use_frameworks! 31 | use_modular_headers! 32 | 33 | flutter_install_all_macos_pods File.dirname(File.realpath(__FILE__)) 34 | end 35 | 36 | post_install do |installer| 37 | installer.pods_project.targets.each do |target| 38 | flutter_additional_macos_build_settings(target) 39 | end 40 | end 41 | -------------------------------------------------------------------------------- /just_audio_background/example/macos/Podfile: -------------------------------------------------------------------------------- 1 | platform :osx, '10.15' 2 | 3 | # CocoaPods analytics sends network stats synchronously affecting flutter build latency. 4 | ENV['COCOAPODS_DISABLE_STATS'] = 'true' 5 | 6 | project 'Runner', { 7 | 'Debug' => :debug, 8 | 'Profile' => :release, 9 | 'Release' => :release, 10 | } 11 | 12 | def flutter_root 13 | generated_xcode_build_settings_path = File.expand_path(File.join('..', 'Flutter', 'ephemeral', 'Flutter-Generated.xcconfig'), __FILE__) 14 | unless File.exist?(generated_xcode_build_settings_path) 15 | raise "#{generated_xcode_build_settings_path} must exist. If you're running pod install manually, make sure \"flutter pub get\" is executed first" 16 | end 17 | 18 | File.foreach(generated_xcode_build_settings_path) do |line| 19 | matches = line.match(/FLUTTER_ROOT\=(.*)/) 20 | return matches[1].strip if matches 21 | end 22 | raise "FLUTTER_ROOT not found in #{generated_xcode_build_settings_path}. Try deleting Flutter-Generated.xcconfig, then run \"flutter pub get\"" 23 | end 24 | 25 | require File.expand_path(File.join('packages', 'flutter_tools', 'bin', 'podhelper'), flutter_root) 26 | 27 | flutter_macos_podfile_setup 28 | 29 | target 'Runner' do 30 | use_frameworks! 31 | use_modular_headers! 32 | 33 | flutter_install_all_macos_pods File.dirname(File.realpath(__FILE__)) 34 | end 35 | 36 | post_install do |installer| 37 | installer.pods_project.targets.each do |target| 38 | flutter_additional_macos_build_settings(target) 39 | end 40 | end 41 | -------------------------------------------------------------------------------- /just_audio_background/example/ios/Podfile: -------------------------------------------------------------------------------- 1 | # Uncomment this line to define a global platform for your project 2 | # platform :ios, '12.0' 3 | 4 | # CocoaPods analytics sends network stats synchronously affecting flutter build latency. 5 | ENV['COCOAPODS_DISABLE_STATS'] = 'true' 6 | 7 | project 'Runner', { 8 | 'Debug' => :debug, 9 | 'Profile' => :release, 10 | 'Release' => :release, 11 | } 12 | 13 | def flutter_root 14 | generated_xcode_build_settings_path = File.expand_path(File.join('..', 'Flutter', 'Generated.xcconfig'), __FILE__) 15 | unless File.exist?(generated_xcode_build_settings_path) 16 | raise "#{generated_xcode_build_settings_path} must exist. If you're running pod install manually, make sure flutter pub get is executed first" 17 | end 18 | 19 | File.foreach(generated_xcode_build_settings_path) do |line| 20 | matches = line.match(/FLUTTER_ROOT\=(.*)/) 21 | return matches[1].strip if matches 22 | end 23 | raise "FLUTTER_ROOT not found in #{generated_xcode_build_settings_path}. Try deleting Generated.xcconfig, then run flutter pub get" 24 | end 25 | 26 | require File.expand_path(File.join('packages', 'flutter_tools', 'bin', 'podhelper'), flutter_root) 27 | 28 | flutter_ios_podfile_setup 29 | 30 | target 'Runner' do 31 | use_frameworks! 32 | use_modular_headers! 33 | 34 | flutter_install_all_ios_pods File.dirname(File.realpath(__FILE__)) 35 | end 36 | 37 | post_install do |installer| 38 | installer.pods_project.targets.each do |target| 39 | flutter_additional_ios_build_settings(target) 40 | end 41 | end 42 | -------------------------------------------------------------------------------- /just_audio/android/build.gradle: -------------------------------------------------------------------------------- 1 | group "com.ryanheise.just_audio" 2 | version "1.0" 3 | def args = ["-Xlint:deprecation","-Xlint:unchecked"] 4 | 5 | buildscript { 6 | ext { 7 | agp_version = '8.5.2' 8 | } 9 | repositories { 10 | google() 11 | mavenCentral() 12 | } 13 | 14 | dependencies { 15 | classpath "com.android.tools.build:gradle:$agp_version" 16 | } 17 | } 18 | 19 | rootProject.allprojects { 20 | repositories { 21 | google() 22 | mavenCentral() 23 | } 24 | } 25 | 26 | project.getTasks().withType(JavaCompile) { 27 | options.compilerArgs.addAll(args) 28 | } 29 | 30 | apply plugin: "com.android.library" 31 | 32 | android { 33 | namespace "com.ryanheise.just_audio" 34 | 35 | compileSdk = 35 36 | 37 | compileOptions { 38 | sourceCompatibility = JavaVersion.VERSION_11 39 | targetCompatibility = JavaVersion.VERSION_11 40 | } 41 | 42 | defaultConfig { 43 | minSdk = 16 44 | } 45 | 46 | lintOptions { 47 | disable 'AndroidGradlePluginVersion', 'InvalidPackage', 'GradleDependency', 'NewerVersionAvailable' 48 | } 49 | } 50 | dependencies { 51 | def exoplayer_version = "1.4.1" 52 | implementation "androidx.media3:media3-exoplayer:$exoplayer_version" 53 | implementation "androidx.media3:media3-exoplayer-dash:$exoplayer_version" 54 | implementation "androidx.media3:media3-exoplayer-hls:$exoplayer_version" 55 | implementation "androidx.media3:media3-exoplayer-smoothstreaming:$exoplayer_version" 56 | } 57 | -------------------------------------------------------------------------------- /just_audio/example/android/app/build.gradle: -------------------------------------------------------------------------------- 1 | plugins { 2 | id "com.android.application" 3 | id "kotlin-android" 4 | // The Flutter Gradle Plugin must be applied after the Android and Kotlin Gradle plugins. 5 | id "dev.flutter.flutter-gradle-plugin" 6 | } 7 | 8 | android { 9 | namespace 'com.ryanheise.just_audio_example' 10 | compileSdk flutter.compileSdkVersion 11 | 12 | compileOptions { 13 | sourceCompatibility = JavaVersion.VERSION_11 14 | targetCompatibility = JavaVersion.VERSION_11 15 | } 16 | 17 | defaultConfig { 18 | // TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html). 19 | applicationId "com.ryanheise.just_audio_example" 20 | minSdk flutter.minSdkVersion 21 | targetSdk flutter.targetSdkVersion 22 | versionCode flutter.versionCode 23 | versionName flutter.versionName 24 | } 25 | 26 | buildTypes { 27 | release { 28 | // TODO: Add your own signing config for the release build. 29 | // Signing with the debug keys for now, so `flutter run --release` works. 30 | signingConfig signingConfigs.debug 31 | } 32 | } 33 | 34 | lint { 35 | disable 'InvalidPackage' 36 | } 37 | } 38 | 39 | flutter { 40 | source '../..' 41 | } 42 | 43 | dependencies { 44 | testImplementation 'junit:junit:4.12' 45 | androidTestImplementation 'androidx.test:runner:1.1.1' 46 | androidTestImplementation 'androidx.test.espresso:espresso-core:3.1.1' 47 | } 48 | -------------------------------------------------------------------------------- /just_audio/pubspec.yaml: -------------------------------------------------------------------------------- 1 | name: just_audio 2 | description: A feature-rich audio player for Flutter. Loop, clip and sequence any sound from any source (asset/file/URL/stream) in gapless playlists. 3 | version: 0.10.5 4 | repository: https://github.com/ryanheise/just_audio/tree/minor/just_audio 5 | issue_tracker: https://github.com/ryanheise/just_audio/issues 6 | topics: 7 | - audio 8 | - sound 9 | - player 10 | - background 11 | 12 | environment: 13 | sdk: ^3.6.0 14 | flutter: ">=3.27.0" 15 | 16 | dependencies: 17 | just_audio_platform_interface: ^4.6.0 18 | # just_audio_platform_interface: 19 | # path: ../just_audio_platform_interface 20 | just_audio_web: ^0.4.15 21 | # just_audio_web: 22 | # path: ../just_audio_web 23 | audio_session: ">=0.1.24 <0.3.0" 24 | rxdart: '>=0.26.0 <0.29.0' 25 | path: ^1.8.0 26 | path_provider: ^2.0.0 27 | async: ^2.5.0 28 | uuid: '>=3.0.1 <5.0.0' 29 | crypto: ^3.0.0 30 | meta: ^1.3.0 31 | flutter: 32 | sdk: flutter 33 | synchronized: ^3.2.0 34 | 35 | dev_dependencies: 36 | flutter_test: 37 | sdk: flutter 38 | mockito: ^5.0.0 39 | plugin_platform_interface: ^2.0.0 40 | flutter_lints: ^2.0.1 41 | 42 | flutter: 43 | plugin: 44 | platforms: 45 | android: 46 | package: com.ryanheise.just_audio 47 | pluginClass: JustAudioPlugin 48 | ios: 49 | pluginClass: JustAudioPlugin 50 | sharedDarwinSource: true 51 | macos: 52 | pluginClass: JustAudioPlugin 53 | sharedDarwinSource: true 54 | web: 55 | default_package: just_audio_web 56 | -------------------------------------------------------------------------------- /.github/workflows/auto-close.yml: -------------------------------------------------------------------------------- 1 | name: Autocloser 2 | on: [issues] 3 | jobs: 4 | autoclose: 5 | runs-on: ubuntu-latest 6 | steps: 7 | - name: Autoclose issues that did not follow issue template 8 | uses: roots/issue-closer-action@v1.1 9 | with: 10 | repo-token: ${{ secrets.GITHUB_TOKEN }} 11 | issue-close-message: "Oops, it appears that your issue did not follow the template and is missing one or more required sections. Please open a new issue, and provide all required sections and information.\n\nFAQ:\n\n1. Do I really need to submit a minimal reproduction project for a bug? A: Yes. I prioritise bugs _secondarily_ on how many people are affected, and _primarily_ on whether the bug report is complete, in the sense that it enables me to immediately reproduce it and start working on a fix. If a bug is important to you, the best thing you can do is to provide all requested information ASAP so that I can start looking into it ASAP.\n\n2. I think I supplied all required information, so did the bot make a mistake? A: The bot only checks the section headings, so when you post a new issue, make sure you leave the section headings intact. (Note that because of this, it is even possible to trick the bot by including only the section headings, and then not providing the requested information under each heading. This is frowned upon, and the issue will be closed manually.)" 12 | issue-pattern: "Which API(.|[\\r\\n])*Minimal reproduction project(.|[\\r\\n])*To Reproduce|To which pages(.|[\\r\\n])*Describe your suggestion|Is your feature request(.|[\\r\\n])*Describe the solution you'd like" 13 | -------------------------------------------------------------------------------- /just_audio/.gitignore: -------------------------------------------------------------------------------- 1 | # Miscellaneous 2 | *.class 3 | *.log 4 | *.pyc 5 | *.swp 6 | .DS_Store 7 | .atom/ 8 | .buildlog/ 9 | .history 10 | .svn/ 11 | 12 | # IntelliJ related 13 | *.iml 14 | *.ipr 15 | *.iws 16 | .idea/ 17 | 18 | # Visual Studio Code related 19 | .vscode/ 20 | 21 | # Flutter/Dart/Pub related 22 | **/doc/api/ 23 | .dart_tool/ 24 | .flutter-plugins 25 | .packages 26 | .pub-cache/ 27 | .pub/ 28 | /build/ 29 | 30 | # Android related 31 | **/android/**/gradle-wrapper.jar 32 | **/android/.gradle 33 | **/android/captures/ 34 | **/android/gradlew 35 | **/android/gradlew.bat 36 | **/android/local.properties 37 | **/android/**/GeneratedPluginRegistrant.java 38 | 39 | # iOS/XCode related 40 | **/ios/**/*.mode1v3 41 | **/ios/**/*.mode2v3 42 | **/ios/**/*.moved-aside 43 | **/ios/**/*.pbxuser 44 | **/ios/**/*.perspectivev3 45 | **/ios/**/*sync/ 46 | **/ios/**/.sconsign.dblite 47 | **/ios/**/.tags* 48 | **/ios/**/.vagrant/ 49 | **/ios/**/DerivedData/ 50 | **/ios/**/Icon? 51 | **/ios/**/Pods/ 52 | **/ios/**/.symlinks/ 53 | **/ios/**/profile 54 | **/ios/**/xcuserdata 55 | **/ios/.generated/ 56 | **/ios/Flutter/App.framework 57 | **/ios/Flutter/Flutter.framework 58 | **/ios/Flutter/Generated.xcconfig 59 | **/ios/Flutter/app.flx 60 | **/ios/Flutter/app.zip 61 | **/ios/Flutter/flutter_assets/ 62 | **/ios/ServiceDefinitions.json 63 | **/ios/Runner/GeneratedPluginRegistrant.* 64 | .build/ 65 | .swiftpm/ 66 | 67 | # Exceptions to above rules. 68 | !**/ios/**/default.mode1v3 69 | !**/ios/**/default.mode2v3 70 | !**/ios/**/default.pbxuser 71 | !**/ios/**/default.perspectivev3 72 | !/packages/flutter_tools/test/data/dart_dependencies_test/**/.packages 73 | -------------------------------------------------------------------------------- /just_audio/example/android/app/src/main/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 10 | 15 | 16 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 33 | 34 | 35 | -------------------------------------------------------------------------------- /just_audio/example/macos/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "size" : "16x16", 5 | "idiom" : "mac", 6 | "filename" : "app_icon_16.png", 7 | "scale" : "1x" 8 | }, 9 | { 10 | "size" : "16x16", 11 | "idiom" : "mac", 12 | "filename" : "app_icon_32.png", 13 | "scale" : "2x" 14 | }, 15 | { 16 | "size" : "32x32", 17 | "idiom" : "mac", 18 | "filename" : "app_icon_32.png", 19 | "scale" : "1x" 20 | }, 21 | { 22 | "size" : "32x32", 23 | "idiom" : "mac", 24 | "filename" : "app_icon_64.png", 25 | "scale" : "2x" 26 | }, 27 | { 28 | "size" : "128x128", 29 | "idiom" : "mac", 30 | "filename" : "app_icon_128.png", 31 | "scale" : "1x" 32 | }, 33 | { 34 | "size" : "128x128", 35 | "idiom" : "mac", 36 | "filename" : "app_icon_256.png", 37 | "scale" : "2x" 38 | }, 39 | { 40 | "size" : "256x256", 41 | "idiom" : "mac", 42 | "filename" : "app_icon_256.png", 43 | "scale" : "1x" 44 | }, 45 | { 46 | "size" : "256x256", 47 | "idiom" : "mac", 48 | "filename" : "app_icon_512.png", 49 | "scale" : "2x" 50 | }, 51 | { 52 | "size" : "512x512", 53 | "idiom" : "mac", 54 | "filename" : "app_icon_512.png", 55 | "scale" : "1x" 56 | }, 57 | { 58 | "size" : "512x512", 59 | "idiom" : "mac", 60 | "filename" : "app_icon_1024.png", 61 | "scale" : "2x" 62 | } 63 | ], 64 | "info" : { 65 | "version" : 1, 66 | "author" : "xcode" 67 | } 68 | } 69 | -------------------------------------------------------------------------------- /just_audio_background/example/macos/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "size" : "16x16", 5 | "idiom" : "mac", 6 | "filename" : "app_icon_16.png", 7 | "scale" : "1x" 8 | }, 9 | { 10 | "size" : "16x16", 11 | "idiom" : "mac", 12 | "filename" : "app_icon_32.png", 13 | "scale" : "2x" 14 | }, 15 | { 16 | "size" : "32x32", 17 | "idiom" : "mac", 18 | "filename" : "app_icon_32.png", 19 | "scale" : "1x" 20 | }, 21 | { 22 | "size" : "32x32", 23 | "idiom" : "mac", 24 | "filename" : "app_icon_64.png", 25 | "scale" : "2x" 26 | }, 27 | { 28 | "size" : "128x128", 29 | "idiom" : "mac", 30 | "filename" : "app_icon_128.png", 31 | "scale" : "1x" 32 | }, 33 | { 34 | "size" : "128x128", 35 | "idiom" : "mac", 36 | "filename" : "app_icon_256.png", 37 | "scale" : "2x" 38 | }, 39 | { 40 | "size" : "256x256", 41 | "idiom" : "mac", 42 | "filename" : "app_icon_256.png", 43 | "scale" : "1x" 44 | }, 45 | { 46 | "size" : "256x256", 47 | "idiom" : "mac", 48 | "filename" : "app_icon_512.png", 49 | "scale" : "2x" 50 | }, 51 | { 52 | "size" : "512x512", 53 | "idiom" : "mac", 54 | "filename" : "app_icon_512.png", 55 | "scale" : "1x" 56 | }, 57 | { 58 | "size" : "512x512", 59 | "idiom" : "mac", 60 | "filename" : "app_icon_1024.png", 61 | "scale" : "2x" 62 | } 63 | ], 64 | "info" : { 65 | "version" : 1, 66 | "author" : "xcode" 67 | } 68 | } 69 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/bug-report.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: Bug report 3 | about: Create a report to help us improve 4 | title: '' 5 | labels: 1 backlog, bug 6 | assignees: ryanheise 7 | 8 | --- 9 | 10 | 11 | **Which API doesn't behave as documented, and how does it misbehave?** 12 | Name here the specific methods or fields that are not behaving as documented, and explain clearly what is happening. 13 | 14 | **Minimal reproduction project** 15 | Provide a link here using one of two options: 16 | 1. Fork this repository and modify the example to reproduce the bug, then provide a link here. 17 | 2. If the unmodified official example already reproduces the bug, just write "The example". 18 | 19 | **To Reproduce (i.e. user steps, not code)** 20 | Steps to reproduce the behavior: 21 | 1. Go to '...' 22 | 2. Click on '....' 23 | 3. Scroll down to '....' 24 | 4. See error 25 | 26 | **Error messages** 27 | 28 | ``` 29 | If applicable, copy & paste error message here, within the triple quotes to preserve formatting. 30 | ``` 31 | 32 | **Expected behavior** 33 | A clear and concise description of what you expected to happen. 34 | 35 | 36 | **Screenshots** 37 | If applicable, add screenshots to help explain your problem. 38 | 39 | **Desktop (please complete the following information):** 40 | - OS: [e.g. MacOS + version] 41 | - Browser [e.g. chrome, safari + version] 42 | 43 | **Smartphone (please complete the following information):** 44 | - Device: [e.g. iPhone6] 45 | - OS: [e.g. iOS8.1] 46 | 47 | **Flutter SDK version** 48 | ``` 49 | insert output of "flutter doctor" here 50 | ``` 51 | 52 | **Additional context** 53 | Add any other context about the problem here. 54 | -------------------------------------------------------------------------------- /just_audio/example/ios/Runner/Base.lproj/Main.storyboard: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | -------------------------------------------------------------------------------- /just_audio_background/example/ios/Runner/Base.lproj/Main.storyboard: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | -------------------------------------------------------------------------------- /just_audio/example/ios/Podfile: -------------------------------------------------------------------------------- 1 | # Uncomment this line to define a global platform for your project 2 | # platform :ios, '12.0' 3 | 4 | # CocoaPods analytics sends network stats synchronously affecting flutter build latency. 5 | ENV['COCOAPODS_DISABLE_STATS'] = 'true' 6 | 7 | project 'Runner', { 8 | 'Debug' => :debug, 9 | 'Profile' => :release, 10 | 'Release' => :release, 11 | } 12 | 13 | def flutter_root 14 | generated_xcode_build_settings_path = File.expand_path(File.join('..', 'Flutter', 'Generated.xcconfig'), __FILE__) 15 | unless File.exist?(generated_xcode_build_settings_path) 16 | raise "#{generated_xcode_build_settings_path} must exist. If you're running pod install manually, make sure flutter pub get is executed first" 17 | end 18 | 19 | File.foreach(generated_xcode_build_settings_path) do |line| 20 | matches = line.match(/FLUTTER_ROOT\=(.*)/) 21 | return matches[1].strip if matches 22 | end 23 | raise "FLUTTER_ROOT not found in #{generated_xcode_build_settings_path}. Try deleting Generated.xcconfig, then run flutter pub get" 24 | end 25 | 26 | require File.expand_path(File.join('packages', 'flutter_tools', 'bin', 'podhelper'), flutter_root) 27 | 28 | flutter_ios_podfile_setup 29 | 30 | target 'Runner' do 31 | use_frameworks! 32 | use_modular_headers! 33 | flutter_install_all_ios_pods File.dirname(File.realpath(__FILE__)) 34 | end 35 | 36 | post_install do |installer| 37 | installer.pods_project.targets.each do |target| 38 | flutter_additional_ios_build_settings(target) 39 | target.build_configurations.each do |config| 40 | config.build_settings['GCC_PREPROCESSOR_DEFINITIONS'] ||= [ 41 | '$(inherited)', 42 | 'AUDIO_SESSION_MICROPHONE=0' 43 | ] 44 | end 45 | end 46 | end 47 | -------------------------------------------------------------------------------- /just_audio_background/CHANGELOG.md: -------------------------------------------------------------------------------- 1 | ## 0.0.1-beta.17 2 | 3 | * Fix notification dismissal on player.stop (@rserro). 4 | 5 | ## 0.0.1-beta.16 6 | 7 | * Support errorCode, errorMessage. 8 | * Bump min flutter version to 3.27.0, AGP to 8.5.2. 9 | 10 | ## 0.0.1-beta.15 11 | 12 | * Add setWebSinkId for web. 13 | 14 | ## 0.0.1-beta.14 15 | 16 | * Fix shuffleOrder when mutating ConcatenatingAudioSource (@jonmarkhall). 17 | 18 | ## 0.0.1-beta.13 19 | 20 | * Support rxdart 0.28.x. 21 | 22 | ## 0.0.1-beta.12 23 | 24 | * Support setWebCrossOrigin. 25 | 26 | ## 0.0.1-beta.11 27 | 28 | * Pass through missing API methods. 29 | 30 | ## 0.0.1-beta.10 31 | 32 | * Fix bug where AudioPlayer constructor parameters were ignored. 33 | * Update minimum flutter version to 3.0. 34 | 35 | ## 0.0.1-beta.9 36 | 37 | * Fix currentIndex stutter. 38 | * Performance and lint fixes (@Zekfad). 39 | 40 | ## 0.0.1-beta.8 41 | 42 | * Fix performance issues when shuffleMode is enabled (@agersant) 43 | 44 | ## 0.0.1-beta.7 45 | 46 | * Fix build when targeting Android 13. 47 | * Add MediaItem.artHeaders. 48 | 49 | ## 0.0.1-beta.6 50 | 51 | * Update documentation/example for Android 12. 52 | * Migrate from pedantic to flutter_lints. 53 | * Support content:// art URIs on Android (@nt4f04uNd). 54 | 55 | ## 0.0.1-beta.5 56 | 57 | * Fix bug in stop. 58 | 59 | ## 0.0.1-beta.4 60 | 61 | * Implement disposeAllPlayers. 62 | 63 | ## 0.0.1-beta.3 64 | 65 | * Fix build when targeting Android 12. 66 | 67 | ## 0.0.1-beta.2 68 | 69 | * Remove Android notification on stop. 70 | 71 | ## 0.0.1-beta.1 72 | 73 | * Disable next/prev buttons when boundary reached. 74 | 75 | ## 0.0.1-beta.0+1 76 | 77 | * Fix README typo. 78 | 79 | ## 0.0.1-beta.0 80 | 81 | * Prerelease of initial version. 82 | -------------------------------------------------------------------------------- /just_audio_platform_interface/CHANGELOG.md: -------------------------------------------------------------------------------- 1 | ## 4.6.0 2 | 3 | * Add androidAudioOffloadPreferences. 4 | 5 | ## 4.5.0 6 | 7 | * Add errorCode/errorMessage to PlaybackEventMessage. 8 | * Add useLazyPreparation to InitRequest for top-level playlist. 9 | 10 | ## 4.4.0 11 | 12 | * Add setWebSinkId for web (@dganzella). 13 | 14 | ## 4.3.0 15 | 16 | * Add setWebCrossOrigin for CORS on web (@danielwinkler). 17 | 18 | ## 4.2.2 19 | 20 | * Add setAllowsExternalPlayback on iOS/macOS. 21 | * Support index-based seeking on Android/iOS/macOS. 22 | 23 | ## 4.2.1 24 | 25 | * Update minimum flutter version to 3.0. 26 | 27 | ## 4.2.0 28 | 29 | - Add InitRequest.androidOffloadSchedulingEnabled. 30 | 31 | ## 4.1.0 32 | 33 | - Add disposeAllPlayers method. 34 | 35 | ## 4.0.0 36 | 37 | - Add playerDataMessageStream. 38 | - Add tag to IndexedAudioSourceMessage. 39 | 40 | ## 3.1.0 41 | 42 | - Add setPitch. 43 | - Add setSkipSilence. 44 | - Add setCanUseNetworkResourcesForLiveStreamingWhilePaused. 45 | - Add setPreferredPeakBitRate. 46 | - Add audioEffectSetEnabled. 47 | - Add androidLoudnessEnhancerSetTargetGain. 48 | - Add androidEqualizerGetParameters. 49 | - Add androidEqualizerBandSetGain. 50 | 51 | ## 3.0.0 52 | 53 | - Null safety. 54 | 55 | ## 2.0.1 56 | 57 | - Fix bug where negative duration is returned instead of null. 58 | 59 | ## 2.0.0 60 | 61 | - Breaking change: Implementations must not set the shuffle order except as 62 | instructed by setShuffleOrder. 63 | - Breaking change: Implementations must be able to recreate a player instance 64 | with the same ID as a disposed instance. 65 | - Breaking change: none state renamed to idle. 66 | 67 | ## 1.1.1 68 | 69 | - Add initialPosition and initialIndex to LoadRequest. 70 | 71 | ## 1.1.0 72 | 73 | - Player is now disposed via JustAudioPlatform.disposePlayer(). 74 | - AudioPlayerPlatform constructor takes id parameter. 75 | 76 | ## 1.0.0 77 | 78 | - Initial version. 79 | -------------------------------------------------------------------------------- /just_audio/example/windows/runner/utils.cpp: -------------------------------------------------------------------------------- 1 | #include "utils.h" 2 | 3 | #include 4 | #include 5 | #include 6 | #include 7 | 8 | #include 9 | 10 | void CreateAndAttachConsole() { 11 | if (::AllocConsole()) { 12 | FILE *unused; 13 | if (freopen_s(&unused, "CONOUT$", "w", stdout)) { 14 | _dup2(_fileno(stdout), 1); 15 | } 16 | if (freopen_s(&unused, "CONOUT$", "w", stderr)) { 17 | _dup2(_fileno(stdout), 2); 18 | } 19 | std::ios::sync_with_stdio(); 20 | FlutterDesktopResyncOutputStreams(); 21 | } 22 | } 23 | 24 | std::vector GetCommandLineArguments() { 25 | // Convert the UTF-16 command line arguments to UTF-8 for the Engine to use. 26 | int argc; 27 | wchar_t** argv = ::CommandLineToArgvW(::GetCommandLineW(), &argc); 28 | if (argv == nullptr) { 29 | return std::vector(); 30 | } 31 | 32 | std::vector command_line_arguments; 33 | 34 | // Skip the first argument as it's the binary name. 35 | for (int i = 1; i < argc; i++) { 36 | command_line_arguments.push_back(Utf8FromUtf16(argv[i])); 37 | } 38 | 39 | ::LocalFree(argv); 40 | 41 | return command_line_arguments; 42 | } 43 | 44 | std::string Utf8FromUtf16(const wchar_t* utf16_string) { 45 | if (utf16_string == nullptr) { 46 | return std::string(); 47 | } 48 | int target_length = ::WideCharToMultiByte( 49 | CP_UTF8, WC_ERR_INVALID_CHARS, utf16_string, 50 | -1, nullptr, 0, nullptr, nullptr); 51 | if (target_length == 0) { 52 | return std::string(); 53 | } 54 | std::string utf8_string; 55 | utf8_string.resize(target_length); 56 | int converted_length = ::WideCharToMultiByte( 57 | CP_UTF8, WC_ERR_INVALID_CHARS, utf16_string, 58 | -1, utf8_string.data(), 59 | target_length, nullptr, nullptr); 60 | if (converted_length == 0) { 61 | return std::string(); 62 | } 63 | return utf8_string; 64 | } 65 | -------------------------------------------------------------------------------- /just_audio/example/ios/Runner/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | NSAppTransportSecurity 6 | 7 | NSAllowsArbitraryLoads 8 | 9 | 10 | CFBundleDevelopmentRegion 11 | $(DEVELOPMENT_LANGUAGE) 12 | CFBundleExecutable 13 | $(EXECUTABLE_NAME) 14 | CFBundleIdentifier 15 | $(PRODUCT_BUNDLE_IDENTIFIER) 16 | CFBundleInfoDictionaryVersion 17 | 6.0 18 | CFBundleName 19 | just_audio_example 20 | CFBundlePackageType 21 | APPL 22 | CFBundleShortVersionString 23 | $(FLUTTER_BUILD_NAME) 24 | CFBundleSignature 25 | ???? 26 | CFBundleVersion 27 | $(FLUTTER_BUILD_NUMBER) 28 | LSRequiresIPhoneOS 29 | 30 | UILaunchStoryboardName 31 | LaunchScreen 32 | UIMainStoryboardFile 33 | Main 34 | UISupportedInterfaceOrientations 35 | 36 | UIInterfaceOrientationPortrait 37 | UIInterfaceOrientationLandscapeLeft 38 | UIInterfaceOrientationLandscapeRight 39 | 40 | UISupportedInterfaceOrientations~ipad 41 | 42 | UIInterfaceOrientationPortrait 43 | UIInterfaceOrientationPortraitUpsideDown 44 | UIInterfaceOrientationLandscapeLeft 45 | UIInterfaceOrientationLandscapeRight 46 | 47 | UIViewControllerBasedStatusBarAppearance 48 | 49 | CADisableMinimumFrameDurationOnPhone 50 | 51 | UIApplicationSupportsIndirectInputEvents 52 | 53 | 54 | 55 | -------------------------------------------------------------------------------- /just_audio/android/src/main/java/com/ryanheise/just_audio/JustAudioPlugin.java: -------------------------------------------------------------------------------- 1 | package com.ryanheise.just_audio; 2 | 3 | import android.content.Context; 4 | import androidx.annotation.NonNull; 5 | import io.flutter.embedding.engine.FlutterEngine; 6 | import io.flutter.embedding.engine.FlutterEngine.EngineLifecycleListener; 7 | import io.flutter.embedding.engine.plugins.FlutterPlugin; 8 | import io.flutter.plugin.common.BinaryMessenger; 9 | import io.flutter.plugin.common.MethodCall; 10 | import io.flutter.plugin.common.MethodChannel; 11 | import io.flutter.plugin.common.MethodChannel.MethodCallHandler; 12 | import io.flutter.plugin.common.MethodChannel.Result; 13 | 14 | /** 15 | * JustAudioPlugin 16 | */ 17 | public class JustAudioPlugin implements FlutterPlugin { 18 | private MethodChannel channel; 19 | private MainMethodCallHandler methodCallHandler; 20 | 21 | @Override 22 | public void onAttachedToEngine(@NonNull FlutterPluginBinding binding) { 23 | Context applicationContext = binding.getApplicationContext(); 24 | BinaryMessenger messenger = binding.getBinaryMessenger(); 25 | methodCallHandler = new MainMethodCallHandler(applicationContext, messenger); 26 | 27 | channel = new MethodChannel(messenger, "com.ryanheise.just_audio.methods"); 28 | channel.setMethodCallHandler(methodCallHandler); 29 | @SuppressWarnings("deprecation") 30 | FlutterEngine engine = binding.getFlutterEngine(); 31 | engine.addEngineLifecycleListener(new EngineLifecycleListener() { 32 | @Override 33 | public void onPreEngineRestart() { 34 | methodCallHandler.dispose(); 35 | } 36 | 37 | @Override 38 | public void onEngineWillDestroy() { 39 | } 40 | }); 41 | } 42 | 43 | @Override 44 | public void onDetachedFromEngine(@NonNull FlutterPluginBinding binding) { 45 | methodCallHandler.dispose(); 46 | methodCallHandler = null; 47 | 48 | channel.setMethodCallHandler(null); 49 | } 50 | } 51 | -------------------------------------------------------------------------------- /just_audio/example/windows/runner/flutter_window.cpp: -------------------------------------------------------------------------------- 1 | #include "flutter_window.h" 2 | 3 | #include 4 | 5 | #include "flutter/generated_plugin_registrant.h" 6 | 7 | FlutterWindow::FlutterWindow(const flutter::DartProject& project) 8 | : project_(project) {} 9 | 10 | FlutterWindow::~FlutterWindow() {} 11 | 12 | bool FlutterWindow::OnCreate() { 13 | if (!Win32Window::OnCreate()) { 14 | return false; 15 | } 16 | 17 | RECT frame = GetClientArea(); 18 | 19 | // The size here must match the window dimensions to avoid unnecessary surface 20 | // creation / destruction in the startup path. 21 | flutter_controller_ = std::make_unique( 22 | frame.right - frame.left, frame.bottom - frame.top, project_); 23 | // Ensure that basic setup of the controller was successful. 24 | if (!flutter_controller_->engine() || !flutter_controller_->view()) { 25 | return false; 26 | } 27 | RegisterPlugins(flutter_controller_->engine()); 28 | SetChildContent(flutter_controller_->view()->GetNativeWindow()); 29 | return true; 30 | } 31 | 32 | void FlutterWindow::OnDestroy() { 33 | if (flutter_controller_) { 34 | flutter_controller_ = nullptr; 35 | } 36 | 37 | Win32Window::OnDestroy(); 38 | } 39 | 40 | LRESULT 41 | FlutterWindow::MessageHandler(HWND hwnd, UINT const message, 42 | WPARAM const wparam, 43 | LPARAM const lparam) noexcept { 44 | // Give Flutter, including plugins, an opportunity to handle window messages. 45 | if (flutter_controller_) { 46 | std::optional result = 47 | flutter_controller_->HandleTopLevelWindowProc(hwnd, message, wparam, 48 | lparam); 49 | if (result) { 50 | return *result; 51 | } 52 | } 53 | 54 | switch (message) { 55 | case WM_FONTCHANGE: 56 | flutter_controller_->engine()->ReloadSystemFonts(); 57 | break; 58 | } 59 | 60 | return Win32Window::MessageHandler(hwnd, message, wparam, lparam); 61 | } 62 | -------------------------------------------------------------------------------- /just_audio/example/.gitignore: -------------------------------------------------------------------------------- 1 | # Miscellaneous 2 | *.class 3 | *.log 4 | *.pyc 5 | *.swp 6 | .DS_Store 7 | .atom/ 8 | .buildlog/ 9 | .history 10 | .svn/ 11 | 12 | # IntelliJ related 13 | *.iml 14 | *.ipr 15 | *.iws 16 | .idea/ 17 | 18 | # The .vscode folder contains launch configuration and tasks you configure in 19 | # VS Code which you may wish to be included in version control, so this line 20 | # is commented out by default. 21 | #.vscode/ 22 | 23 | # Flutter/Dart/Pub related 24 | **/doc/api/ 25 | **/ios/Flutter/.last_build_id 26 | .dart_tool/ 27 | .flutter-plugins 28 | .flutter-plugins-dependencies 29 | .packages 30 | .pub-cache/ 31 | .pub/ 32 | /build/ 33 | 34 | # Web related 35 | 36 | # Symbolication related 37 | app.*.symbols 38 | 39 | # Obfuscation related 40 | app.*.map.json 41 | 42 | # Android related 43 | **/android/**/gradle-wrapper.jar 44 | **/android/.gradle 45 | **/android/captures/ 46 | **/android/gradlew 47 | **/android/gradlew.bat 48 | **/android/local.properties 49 | **/android/**/GeneratedPluginRegistrant.java 50 | 51 | # iOS/XCode related 52 | **/ios/**/*.mode1v3 53 | **/ios/**/*.mode2v3 54 | **/ios/**/*.moved-aside 55 | **/ios/**/*.pbxuser 56 | **/ios/**/*.perspectivev3 57 | **/ios/**/*sync/ 58 | **/ios/**/.sconsign.dblite 59 | **/ios/**/.tags* 60 | **/ios/**/.vagrant/ 61 | **/ios/**/DerivedData/ 62 | **/ios/**/Icon? 63 | **/ios/**/Pods/ 64 | **/ios/**/.symlinks/ 65 | **/ios/**/profile 66 | **/ios/**/xcuserdata 67 | **/ios/.generated/ 68 | **/ios/Flutter/App.framework 69 | **/ios/Flutter/Flutter.framework 70 | **/ios/Flutter/Generated.xcconfig 71 | **/ios/Flutter/app.flx 72 | **/ios/Flutter/app.zip 73 | **/ios/Flutter/flutter_assets/ 74 | **/ios/Flutter/flutter_export_environment.sh 75 | **/ios/ServiceDefinitions.json 76 | **/ios/Runner/GeneratedPluginRegistrant.* 77 | **/ios/Flutter/Flutter.podspec 78 | 79 | # Exceptions to above rules. 80 | !**/ios/**/default.mode1v3 81 | !**/ios/**/default.mode2v3 82 | !**/ios/**/default.pbxuser 83 | !**/ios/**/default.perspectivev3 84 | !/packages/flutter_tools/test/data/dart_dependencies_test/**/.packages 85 | -------------------------------------------------------------------------------- /just_audio_background/example/.gitignore: -------------------------------------------------------------------------------- 1 | # Miscellaneous 2 | *.class 3 | *.log 4 | *.pyc 5 | *.swp 6 | .DS_Store 7 | .atom/ 8 | .buildlog/ 9 | .history 10 | .svn/ 11 | 12 | # IntelliJ related 13 | *.iml 14 | *.ipr 15 | *.iws 16 | .idea/ 17 | 18 | # The .vscode folder contains launch configuration and tasks you configure in 19 | # VS Code which you may wish to be included in version control, so this line 20 | # is commented out by default. 21 | #.vscode/ 22 | 23 | # Flutter/Dart/Pub related 24 | **/doc/api/ 25 | **/ios/Flutter/.last_build_id 26 | .dart_tool/ 27 | .flutter-plugins 28 | .flutter-plugins-dependencies 29 | .packages 30 | .pub-cache/ 31 | .pub/ 32 | /build/ 33 | 34 | # Web related 35 | lib/generated_plugin_registrant.dart 36 | 37 | # Symbolication related 38 | app.*.symbols 39 | 40 | # Obfuscation related 41 | app.*.map.json 42 | 43 | # Android related 44 | **/android/**/gradle-wrapper.jar 45 | **/android/.gradle 46 | **/android/captures/ 47 | **/android/gradlew 48 | **/android/gradlew.bat 49 | **/android/local.properties 50 | **/android/**/GeneratedPluginRegistrant.java 51 | 52 | # iOS/XCode related 53 | **/ios/**/*.mode1v3 54 | **/ios/**/*.mode2v3 55 | **/ios/**/*.moved-aside 56 | **/ios/**/*.pbxuser 57 | **/ios/**/*.perspectivev3 58 | **/ios/**/*sync/ 59 | **/ios/**/.sconsign.dblite 60 | **/ios/**/.tags* 61 | **/ios/**/.vagrant/ 62 | **/ios/**/DerivedData/ 63 | **/ios/**/Icon? 64 | **/ios/**/Pods/ 65 | **/ios/**/.symlinks/ 66 | **/ios/**/profile 67 | **/ios/**/xcuserdata 68 | **/ios/.generated/ 69 | **/ios/Flutter/App.framework 70 | **/ios/Flutter/Flutter.framework 71 | **/ios/Flutter/Generated.xcconfig 72 | **/ios/Flutter/app.flx 73 | **/ios/Flutter/app.zip 74 | **/ios/Flutter/flutter_assets/ 75 | **/ios/Flutter/flutter_export_environment.sh 76 | **/ios/ServiceDefinitions.json 77 | **/ios/Runner/GeneratedPluginRegistrant.* 78 | **/ios/Flutter/Flutter.podspec 79 | 80 | # Exceptions to above rules. 81 | !**/ios/**/default.mode1v3 82 | !**/ios/**/default.mode2v3 83 | !**/ios/**/default.pbxuser 84 | !**/ios/**/default.perspectivev3 85 | !/packages/flutter_tools/test/data/dart_dependencies_test/**/.packages 86 | -------------------------------------------------------------------------------- /just_audio/.pubignore: -------------------------------------------------------------------------------- 1 | # 2 | # Copied from ../.gitignore 3 | # 4 | 5 | flutter_export_environment.sh 6 | 7 | **/Flutter/App.framework/ 8 | **/Flutter/ephemeral/ 9 | **/Flutter/Flutter.framework/ 10 | **/Flutter/Generated.xcconfig 11 | **/Flutter/flutter_assets/ 12 | 13 | generated_plugin_registrant.dart 14 | GeneratedPluginRegistrant.h 15 | GeneratedPluginRegistrant.m 16 | GeneratedPluginRegistrant.java 17 | GeneratedPluginRegistrant.swift 18 | build/ 19 | .flutter-plugins 20 | coverage 21 | pubspec.lock 22 | 23 | # 24 | # Copied from .gitignore 25 | # 26 | 27 | # Miscellaneous 28 | *.class 29 | *.log 30 | *.pyc 31 | *.swp 32 | .DS_Store 33 | .atom/ 34 | .buildlog/ 35 | .history 36 | .svn/ 37 | 38 | # IntelliJ related 39 | *.iml 40 | *.ipr 41 | *.iws 42 | .idea/ 43 | 44 | # Visual Studio Code related 45 | .vscode/ 46 | 47 | # Flutter/Dart/Pub related 48 | **/doc/api/ 49 | .dart_tool/ 50 | .flutter-plugins 51 | .packages 52 | .pub-cache/ 53 | .pub/ 54 | /build/ 55 | 56 | # Android related 57 | **/android/**/gradle-wrapper.jar 58 | **/android/.gradle 59 | **/android/captures/ 60 | **/android/gradlew 61 | **/android/gradlew.bat 62 | **/android/local.properties 63 | **/android/**/GeneratedPluginRegistrant.java 64 | 65 | # iOS/XCode related 66 | **/ios/**/*.mode1v3 67 | **/ios/**/*.mode2v3 68 | **/ios/**/*.moved-aside 69 | **/ios/**/*.pbxuser 70 | **/ios/**/*.perspectivev3 71 | **/ios/**/*sync/ 72 | **/ios/**/.sconsign.dblite 73 | **/ios/**/.tags* 74 | **/ios/**/.vagrant/ 75 | **/ios/**/DerivedData/ 76 | **/ios/**/Icon? 77 | **/ios/**/Pods/ 78 | **/ios/**/.symlinks/ 79 | **/ios/**/profile 80 | **/ios/**/xcuserdata 81 | **/ios/.generated/ 82 | **/ios/Flutter/App.framework 83 | **/ios/Flutter/Flutter.framework 84 | **/ios/Flutter/Generated.xcconfig 85 | **/ios/Flutter/app.flx 86 | **/ios/Flutter/app.zip 87 | **/ios/Flutter/flutter_assets/ 88 | **/ios/ServiceDefinitions.json 89 | **/ios/Runner/GeneratedPluginRegistrant.* 90 | 91 | # Exceptions to above rules. 92 | !**/ios/**/default.mode1v3 93 | !**/ios/**/default.mode2v3 94 | !**/ios/**/default.pbxuser 95 | !**/ios/**/default.perspectivev3 96 | !/packages/flutter_tools/test/data/dart_dependencies_test/**/.packages 97 | -------------------------------------------------------------------------------- /just_audio_background/example/ios/Runner/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | NSAppTransportSecurity 6 | 7 | NSAllowsArbitraryLoads 8 | 9 | NSAllowsArbitraryLoadsForMedia 10 | 11 | 12 | CFBundleDevelopmentRegion 13 | $(DEVELOPMENT_LANGUAGE) 14 | CFBundleExecutable 15 | $(EXECUTABLE_NAME) 16 | CFBundleIdentifier 17 | $(PRODUCT_BUNDLE_IDENTIFIER) 18 | CFBundleInfoDictionaryVersion 19 | 6.0 20 | CFBundleName 21 | just_audio_example 22 | CFBundlePackageType 23 | APPL 24 | CFBundleShortVersionString 25 | $(FLUTTER_BUILD_NAME) 26 | CFBundleSignature 27 | ???? 28 | CFBundleVersion 29 | $(FLUTTER_BUILD_NUMBER) 30 | LSRequiresIPhoneOS 31 | 32 | UIBackgroundModes 33 | 34 | audio 35 | 36 | UILaunchStoryboardName 37 | LaunchScreen 38 | UIMainStoryboardFile 39 | Main 40 | UISupportedInterfaceOrientations 41 | 42 | UIInterfaceOrientationPortrait 43 | UIInterfaceOrientationLandscapeLeft 44 | UIInterfaceOrientationLandscapeRight 45 | 46 | UISupportedInterfaceOrientations~ipad 47 | 48 | UIInterfaceOrientationPortrait 49 | UIInterfaceOrientationPortraitUpsideDown 50 | UIInterfaceOrientationLandscapeLeft 51 | UIInterfaceOrientationLandscapeRight 52 | 53 | UIViewControllerBasedStatusBarAppearance 54 | 55 | CADisableMinimumFrameDurationOnPhone 56 | 57 | UIApplicationSupportsIndirectInputEvents 58 | 59 | 60 | 61 | -------------------------------------------------------------------------------- /just_audio_web/CHANGELOG.md: -------------------------------------------------------------------------------- 1 | ## 0.4.16 2 | 3 | * Fix play interrupted by load. 4 | 5 | ## 0.4.15 6 | 7 | * Support errorCode, errorMessage. 8 | 9 | ## 0.4.14 10 | 11 | * Add setWebSinkId (@dganzella). 12 | 13 | ## 0.4.13 14 | 15 | * Fix `dart2js`/`dart2wasm` compile error with Flutter 3.26.0 (@SleepySquash). 16 | 17 | ## 0.4.12 18 | 19 | * Bump package:web version to `>=0.5.1 <2.0.0` (@ali2236) 20 | 21 | ## 0.4.11 22 | 23 | * Bump package:web upper bound to <0.6.0 24 | * Add AudioPlayer.setWebCrossOrigin for CORS on web (@danielwinkler). 25 | 26 | ## 0.4.10 27 | 28 | * Migrate to package:web. 29 | 30 | ## 0.4.9 31 | 32 | * Fix bug to ensure play exceptions pass through (@idy). 33 | 34 | ## 0.4.8 35 | 36 | * Update minimum flutter version to 3.0. 37 | 38 | ## 0.4.7 39 | 40 | * Fix bug handling simultaneous play requests. 41 | 42 | ## 0.4.6 43 | 44 | * Fix bug playing quickly after load. 45 | 46 | ## 0.4.5 47 | 48 | * Fix interrupted play request bug. 49 | 50 | ## 0.4.4 51 | 52 | * Implement disposeAllPlayers. 53 | 54 | ## 0.4.3 55 | 56 | * Fix bug where setSpeed is forgotten after load(). 57 | 58 | ## 0.4.2 59 | 60 | * Fix bug loading audio after concat delete/insert. 61 | 62 | ## 0.4.1 63 | 64 | * Remember position after stopping. 65 | 66 | ## 0.4.0 67 | 68 | * Upgrade to platform interface 4.0.0 69 | 70 | ## 0.3.2 71 | 72 | * Upgrade to platform interface 3.1.0 73 | 74 | ## 0.3.1 75 | 76 | * Propagate play() exceptions (@twogood). 77 | 78 | ## 0.3.0 79 | 80 | * Null safety. 81 | 82 | ## 0.2.3 83 | 84 | * Fix bug when modifying playlists (insert/move). 85 | 86 | ## 0.2.2 87 | 88 | * Fix bug with empty playlist. 89 | * Fix bug when modifying playlists. 90 | 91 | ## 0.2.1 92 | 93 | * Fix bug with play before load. 94 | 95 | ## 0.2.0 96 | 97 | * Support setShuffleOrder. 98 | 99 | ## 0.1.1 100 | 101 | * Support initialPosition/initialIndex parameters to load. 102 | * Remove `print` statements (@creativecreatorormaybenot). 103 | 104 | ## 0.1.0 105 | 106 | * Update to use platform interface 1.1.0. 107 | 108 | ## 0.0.1 109 | 110 | * Migrated to the federated plugin model. 111 | -------------------------------------------------------------------------------- /just_audio/darwin/just_audio/Sources/just_audio/LoopingAudioSource.m: -------------------------------------------------------------------------------- 1 | #import "./include/just_audio/AudioSource.h" 2 | #import "./include/just_audio/LoopingAudioSource.h" 3 | #import 4 | 5 | @implementation LoopingAudioSource { 6 | // An array of duplicates 7 | NSArray *_audioSources; // 8 | } 9 | 10 | - (instancetype)initWithId:(NSString *)sid audioSources:(NSArray *)audioSources { 11 | self = [super initWithId:sid]; 12 | NSAssert(self, @"super init cannot be nil"); 13 | _audioSources = audioSources; 14 | return self; 15 | } 16 | 17 | - (BOOL)lazyLoading { 18 | return [_audioSources count] > 0 ? _audioSources[0].lazyLoading : NO; 19 | } 20 | 21 | - (void)setLazyLoading:(BOOL)lazyLoading { 22 | for (int i = 0; i < [_audioSources count]; i++) { 23 | _audioSources[i].lazyLoading = lazyLoading; 24 | } 25 | } 26 | 27 | - (int)buildSequence:(NSMutableArray *)sequence treeIndex:(int)treeIndex { 28 | for (int i = 0; i < [_audioSources count]; i++) { 29 | treeIndex = [_audioSources[i] buildSequence:sequence treeIndex:treeIndex]; 30 | } 31 | return treeIndex; 32 | } 33 | 34 | - (void)findById:(NSString *)sourceId matches:(NSMutableArray *)matches { 35 | [super findById:sourceId matches:matches]; 36 | for (int i = 0; i < [_audioSources count]; i++) { 37 | [_audioSources[i] findById:sourceId matches:matches]; 38 | } 39 | } 40 | 41 | - (NSArray *)getShuffleIndices { 42 | NSMutableArray *order = [NSMutableArray new]; 43 | int offset = (int)[order count]; 44 | for (int i = 0; i < [_audioSources count]; i++) { 45 | AudioSource *audioSource = _audioSources[i]; 46 | NSArray *childShuffleOrder = [audioSource getShuffleIndices]; 47 | for (int j = 0; j < [childShuffleOrder count]; j++) { 48 | [order addObject:@([childShuffleOrder[j] integerValue] + offset)]; 49 | } 50 | offset += [childShuffleOrder count]; 51 | } 52 | return order; 53 | } 54 | 55 | - (void)decodeShuffleOrder:(NSDictionary *)dict { 56 | NSDictionary *dictChild = (NSDictionary *)dict[@"child"]; 57 | for (int i = 0; i < [_audioSources count]; i++) { 58 | AudioSource *child = _audioSources[i]; 59 | [child decodeShuffleOrder:dictChild]; 60 | } 61 | } 62 | 63 | @end 64 | -------------------------------------------------------------------------------- /just_audio/example/ios/Runner/Base.lproj/LaunchScreen.storyboard: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | -------------------------------------------------------------------------------- /just_audio_background/example/ios/Runner/Base.lproj/LaunchScreen.storyboard: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | -------------------------------------------------------------------------------- /just_audio_background/example/android/app/src/main/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 16 | 21 | 22 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 40 | 41 | 42 | 43 | 44 | 45 | 48 | 49 | 50 | 51 | 52 | 53 | 56 | 57 | 58 | -------------------------------------------------------------------------------- /just_audio/android/src/main/java/com/ryanheise/just_audio/MainMethodCallHandler.java: -------------------------------------------------------------------------------- 1 | package com.ryanheise.just_audio; 2 | 3 | import android.content.Context; 4 | import androidx.annotation.NonNull; 5 | import io.flutter.plugin.common.BinaryMessenger; 6 | import io.flutter.plugin.common.MethodCall; 7 | import io.flutter.plugin.common.MethodChannel.MethodCallHandler; 8 | import io.flutter.plugin.common.MethodChannel.Result; 9 | import java.util.HashMap; 10 | import java.util.List; 11 | import java.util.ArrayList; 12 | import java.util.Map; 13 | 14 | public class MainMethodCallHandler implements MethodCallHandler { 15 | 16 | private final Context applicationContext; 17 | private final BinaryMessenger messenger; 18 | 19 | private final Map players = new HashMap<>(); 20 | 21 | public MainMethodCallHandler(Context applicationContext, 22 | BinaryMessenger messenger) { 23 | this.applicationContext = applicationContext; 24 | this.messenger = messenger; 25 | } 26 | 27 | @Override 28 | public void onMethodCall(MethodCall call, @NonNull Result result) { 29 | switch (call.method) { 30 | case "init": { 31 | String id = call.argument("id"); 32 | if (players.containsKey(id)) { 33 | result.error("Platform player " + id + " already exists", null, null); 34 | break; 35 | } 36 | List rawAudioEffects = call.argument("androidAudioEffects"); 37 | players.put( 38 | id, 39 | new AudioPlayer( 40 | applicationContext, 41 | messenger, 42 | id, 43 | call.argument("audioLoadConfiguration"), 44 | rawAudioEffects, 45 | call.argument("androidAudioOffloadPreferences"), 46 | call.argument("androidOffloadSchedulingEnabled"), 47 | call.argument("useLazyPreparation") 48 | ) 49 | ); 50 | result.success(null); 51 | break; 52 | } 53 | case "disposePlayer": { 54 | String id = call.argument("id"); 55 | AudioPlayer player = players.get(id); 56 | if (player != null) { 57 | player.dispose(); 58 | players.remove(id); 59 | } 60 | result.success(new HashMap()); 61 | break; 62 | } 63 | case "disposeAllPlayers": { 64 | dispose(); 65 | result.success(new HashMap()); 66 | break; 67 | } 68 | default: 69 | result.notImplemented(); 70 | break; 71 | } 72 | } 73 | 74 | void dispose() { 75 | for (AudioPlayer player : new ArrayList(players.values())) { 76 | player.dispose(); 77 | } 78 | players.clear(); 79 | } 80 | } 81 | -------------------------------------------------------------------------------- /just_audio/darwin/just_audio/Sources/just_audio/JustAudioPlugin.m: -------------------------------------------------------------------------------- 1 | #import "./include/just_audio/JustAudioPlugin.h" 2 | #import "./include/just_audio/AudioPlayer.h" 3 | #import 4 | #include 5 | 6 | @implementation JustAudioPlugin { 7 | NSObject* _registrar; 8 | NSMutableDictionary *_players; 9 | } 10 | 11 | + (void)registerWithRegistrar:(NSObject*)registrar { 12 | FlutterMethodChannel* channel = [FlutterMethodChannel 13 | methodChannelWithName:@"com.ryanheise.just_audio.methods" 14 | binaryMessenger:[registrar messenger]]; 15 | JustAudioPlugin* instance = [[JustAudioPlugin alloc] initWithRegistrar:registrar]; 16 | [registrar addMethodCallDelegate:instance channel:channel]; 17 | } 18 | 19 | - (instancetype)initWithRegistrar:(NSObject *)registrar { 20 | self = [super init]; 21 | NSAssert(self, @"super init cannot be nil"); 22 | _registrar = registrar; 23 | _players = [[NSMutableDictionary alloc] init]; 24 | return self; 25 | } 26 | 27 | - (void)handleMethodCall:(FlutterMethodCall*)call result:(FlutterResult)result { 28 | //NSLog(@"plugin method: %@", call.method); 29 | if ([@"init" isEqualToString:call.method]) { 30 | NSDictionary *request = (NSDictionary *)call.arguments; 31 | NSString *playerId = (NSString *)request[@"id"]; 32 | NSDictionary *loadConfiguration = (NSDictionary *)request[@"audioLoadConfiguration"]; 33 | BOOL useLazyPreparation = [((NSNumber *)request[@"useLazyPreparation"]) boolValue]; 34 | if ([_players objectForKey:playerId] != nil) { 35 | FlutterError *flutterError = [FlutterError errorWithCode:@"error" message:@"Platform player already exists" details:nil]; 36 | result(flutterError); 37 | } else { 38 | AudioPlayer* player = [[AudioPlayer alloc] initWithRegistrar:_registrar playerId:playerId loadConfiguration:loadConfiguration useLazyPreparation:useLazyPreparation]; 39 | [_players setValue:player forKey:playerId]; 40 | result(nil); 41 | } 42 | } else if ([@"disposePlayer" isEqualToString:call.method]) { 43 | NSDictionary *request = (NSDictionary *)call.arguments; 44 | NSString *playerId = request[@"id"]; 45 | [_players[playerId] dispose:NO]; 46 | [_players setValue:nil forKey:playerId]; 47 | result(@{}); 48 | } else if ([@"disposeAllPlayers" isEqualToString:call.method]) { 49 | for (NSString *playerId in _players) { 50 | [_players[playerId] dispose:NO]; 51 | } 52 | [_players removeAllObjects]; 53 | result(@{}); 54 | } else { 55 | result(FlutterMethodNotImplemented); 56 | } 57 | } 58 | 59 | - (void)dealloc { 60 | for (NSString *playerId in _players) { 61 | [_players[playerId] dispose:YES]; 62 | } 63 | [_players removeAllObjects]; 64 | } 65 | 66 | @end 67 | -------------------------------------------------------------------------------- /just_audio/example/linux/flutter/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | cmake_minimum_required(VERSION 3.10) 2 | 3 | set(EPHEMERAL_DIR "${CMAKE_CURRENT_SOURCE_DIR}/ephemeral") 4 | 5 | # Configuration provided via flutter tool. 6 | include(${EPHEMERAL_DIR}/generated_config.cmake) 7 | 8 | # TODO: Move the rest of this into files in ephemeral. See 9 | # https://github.com/flutter/flutter/issues/57146. 10 | 11 | # Serves the same purpose as list(TRANSFORM ... PREPEND ...), 12 | # which isn't available in 3.10. 13 | function(list_prepend LIST_NAME PREFIX) 14 | set(NEW_LIST "") 15 | foreach(element ${${LIST_NAME}}) 16 | list(APPEND NEW_LIST "${PREFIX}${element}") 17 | endforeach(element) 18 | set(${LIST_NAME} "${NEW_LIST}" PARENT_SCOPE) 19 | endfunction() 20 | 21 | # === Flutter Library === 22 | # System-level dependencies. 23 | find_package(PkgConfig REQUIRED) 24 | pkg_check_modules(GTK REQUIRED IMPORTED_TARGET gtk+-3.0) 25 | pkg_check_modules(GLIB REQUIRED IMPORTED_TARGET glib-2.0) 26 | pkg_check_modules(GIO REQUIRED IMPORTED_TARGET gio-2.0) 27 | 28 | set(FLUTTER_LIBRARY "${EPHEMERAL_DIR}/libflutter_linux_gtk.so") 29 | 30 | # Published to parent scope for install step. 31 | set(FLUTTER_LIBRARY ${FLUTTER_LIBRARY} PARENT_SCOPE) 32 | set(FLUTTER_ICU_DATA_FILE "${EPHEMERAL_DIR}/icudtl.dat" PARENT_SCOPE) 33 | set(PROJECT_BUILD_DIR "${PROJECT_DIR}/build/" PARENT_SCOPE) 34 | set(AOT_LIBRARY "${PROJECT_DIR}/build/lib/libapp.so" PARENT_SCOPE) 35 | 36 | list(APPEND FLUTTER_LIBRARY_HEADERS 37 | "fl_basic_message_channel.h" 38 | "fl_binary_codec.h" 39 | "fl_binary_messenger.h" 40 | "fl_dart_project.h" 41 | "fl_engine.h" 42 | "fl_json_message_codec.h" 43 | "fl_json_method_codec.h" 44 | "fl_message_codec.h" 45 | "fl_method_call.h" 46 | "fl_method_channel.h" 47 | "fl_method_codec.h" 48 | "fl_method_response.h" 49 | "fl_plugin_registrar.h" 50 | "fl_plugin_registry.h" 51 | "fl_standard_message_codec.h" 52 | "fl_standard_method_codec.h" 53 | "fl_string_codec.h" 54 | "fl_value.h" 55 | "fl_view.h" 56 | "flutter_linux.h" 57 | ) 58 | list_prepend(FLUTTER_LIBRARY_HEADERS "${EPHEMERAL_DIR}/flutter_linux/") 59 | add_library(flutter INTERFACE) 60 | target_include_directories(flutter INTERFACE 61 | "${EPHEMERAL_DIR}" 62 | ) 63 | target_link_libraries(flutter INTERFACE "${FLUTTER_LIBRARY}") 64 | target_link_libraries(flutter INTERFACE 65 | PkgConfig::GTK 66 | PkgConfig::GLIB 67 | PkgConfig::GIO 68 | ) 69 | add_dependencies(flutter flutter_assemble) 70 | 71 | # === Flutter tool backend === 72 | # _phony_ is a non-existent file to force this command to run every time, 73 | # since currently there's no way to get a full input/output list from the 74 | # flutter tool. 75 | add_custom_command( 76 | OUTPUT ${FLUTTER_LIBRARY} ${FLUTTER_LIBRARY_HEADERS} 77 | ${CMAKE_CURRENT_BINARY_DIR}/_phony_ 78 | COMMAND ${CMAKE_COMMAND} -E env 79 | ${FLUTTER_TOOL_ENVIRONMENT} 80 | "${FLUTTER_ROOT}/packages/flutter_tools/bin/tool_backend.sh" 81 | ${FLUTTER_TARGET_PLATFORM} ${CMAKE_BUILD_TYPE} 82 | VERBATIM 83 | ) 84 | add_custom_target(flutter_assemble DEPENDS 85 | "${FLUTTER_LIBRARY}" 86 | ${FLUTTER_LIBRARY_HEADERS} 87 | ) 88 | -------------------------------------------------------------------------------- /just_audio/darwin/just_audio/Sources/just_audio/IndexedAudioSource.m: -------------------------------------------------------------------------------- 1 | #import "./include/just_audio/IndexedAudioSource.h" 2 | #import "./include/just_audio/IndexedPlayerItem.h" 3 | #import 4 | 5 | @implementation IndexedAudioSource { 6 | BOOL _isAttached; 7 | BOOL _lazyLoading; 8 | CMTime _queuedSeekPos; 9 | void (^_queuedSeekCompletionHandler)(BOOL); 10 | } 11 | 12 | - (instancetype)initWithId:(NSString *)sid { 13 | self = [super initWithId:sid]; 14 | NSAssert(self, @"super init cannot be nil"); 15 | _isAttached = NO; 16 | _lazyLoading = NO; 17 | _queuedSeekPos = kCMTimeInvalid; 18 | _queuedSeekCompletionHandler = nil; 19 | return self; 20 | } 21 | 22 | - (void)onStatusChanged:(AVPlayerItemStatus)status { 23 | if (status == AVPlayerItemStatusReadyToPlay) { 24 | // This handles a pending seek during a load. 25 | // TODO: Test seeking during a seek. 26 | if (_queuedSeekCompletionHandler) { 27 | [self seek:_queuedSeekPos completionHandler:_queuedSeekCompletionHandler]; 28 | _queuedSeekPos = kCMTimeInvalid; 29 | _queuedSeekCompletionHandler = nil; 30 | } 31 | } 32 | } 33 | 34 | - (IndexedPlayerItem *)playerItem { 35 | return nil; 36 | } 37 | 38 | - (IndexedPlayerItem *)playerItem2 { 39 | return nil; 40 | } 41 | 42 | - (BOOL)isAttached { 43 | return _isAttached; 44 | } 45 | 46 | - (BOOL)lazyLoading { 47 | return _lazyLoading; 48 | } 49 | 50 | - (void)setLazyLoading:(BOOL)lazyLoading { 51 | _lazyLoading = lazyLoading; 52 | } 53 | 54 | - (int)buildSequence:(NSMutableArray *)sequence treeIndex:(int)treeIndex { 55 | [sequence addObject:self]; 56 | return treeIndex + 1; 57 | } 58 | 59 | - (void)attach:(AVQueuePlayer *)player initialPos:(CMTime)initialPos { 60 | _isAttached = YES; 61 | if (CMTIME_IS_VALID(initialPos)) { 62 | [self seek:initialPos]; 63 | } 64 | } 65 | 66 | - (void)play:(AVQueuePlayer *)player { 67 | } 68 | 69 | - (void)pause:(AVQueuePlayer *)player { 70 | } 71 | 72 | - (void)stop:(AVQueuePlayer *)player { 73 | } 74 | 75 | - (void)seek:(CMTime)position { 76 | [self seek:position completionHandler:nil]; 77 | } 78 | 79 | - (void)seek:(CMTime)position completionHandler:(void (^)(BOOL))completionHandler { 80 | if (completionHandler && (self.playerItem.status != AVPlayerItemStatusReadyToPlay)) { 81 | _queuedSeekPos = position; 82 | _queuedSeekCompletionHandler = completionHandler; 83 | } 84 | } 85 | 86 | - (void)flip { 87 | } 88 | 89 | - (void)preparePlayerItem2 { 90 | } 91 | 92 | - (CMTime)duration { 93 | return kCMTimeInvalid; 94 | } 95 | 96 | - (void)setDuration:(CMTime)duration { 97 | } 98 | 99 | - (CMTime)position { 100 | return kCMTimeInvalid; 101 | } 102 | 103 | - (CMTime)bufferedPosition { 104 | return kCMTimeInvalid; 105 | } 106 | 107 | - (void)applyPreferredForwardBufferDuration { 108 | } 109 | 110 | - (void)applyCanUseNetworkResourcesForLiveStreamingWhilePaused { 111 | } 112 | 113 | - (void)applyPreferredPeakBitRate { 114 | } 115 | 116 | @end 117 | -------------------------------------------------------------------------------- /just_audio/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "size" : "20x20", 5 | "idiom" : "iphone", 6 | "filename" : "Icon-App-20x20@2x.png", 7 | "scale" : "2x" 8 | }, 9 | { 10 | "size" : "20x20", 11 | "idiom" : "iphone", 12 | "filename" : "Icon-App-20x20@3x.png", 13 | "scale" : "3x" 14 | }, 15 | { 16 | "size" : "29x29", 17 | "idiom" : "iphone", 18 | "filename" : "Icon-App-29x29@1x.png", 19 | "scale" : "1x" 20 | }, 21 | { 22 | "size" : "29x29", 23 | "idiom" : "iphone", 24 | "filename" : "Icon-App-29x29@2x.png", 25 | "scale" : "2x" 26 | }, 27 | { 28 | "size" : "29x29", 29 | "idiom" : "iphone", 30 | "filename" : "Icon-App-29x29@3x.png", 31 | "scale" : "3x" 32 | }, 33 | { 34 | "size" : "40x40", 35 | "idiom" : "iphone", 36 | "filename" : "Icon-App-40x40@2x.png", 37 | "scale" : "2x" 38 | }, 39 | { 40 | "size" : "40x40", 41 | "idiom" : "iphone", 42 | "filename" : "Icon-App-40x40@3x.png", 43 | "scale" : "3x" 44 | }, 45 | { 46 | "size" : "60x60", 47 | "idiom" : "iphone", 48 | "filename" : "Icon-App-60x60@2x.png", 49 | "scale" : "2x" 50 | }, 51 | { 52 | "size" : "60x60", 53 | "idiom" : "iphone", 54 | "filename" : "Icon-App-60x60@3x.png", 55 | "scale" : "3x" 56 | }, 57 | { 58 | "size" : "20x20", 59 | "idiom" : "ipad", 60 | "filename" : "Icon-App-20x20@1x.png", 61 | "scale" : "1x" 62 | }, 63 | { 64 | "size" : "20x20", 65 | "idiom" : "ipad", 66 | "filename" : "Icon-App-20x20@2x.png", 67 | "scale" : "2x" 68 | }, 69 | { 70 | "size" : "29x29", 71 | "idiom" : "ipad", 72 | "filename" : "Icon-App-29x29@1x.png", 73 | "scale" : "1x" 74 | }, 75 | { 76 | "size" : "29x29", 77 | "idiom" : "ipad", 78 | "filename" : "Icon-App-29x29@2x.png", 79 | "scale" : "2x" 80 | }, 81 | { 82 | "size" : "40x40", 83 | "idiom" : "ipad", 84 | "filename" : "Icon-App-40x40@1x.png", 85 | "scale" : "1x" 86 | }, 87 | { 88 | "size" : "40x40", 89 | "idiom" : "ipad", 90 | "filename" : "Icon-App-40x40@2x.png", 91 | "scale" : "2x" 92 | }, 93 | { 94 | "size" : "76x76", 95 | "idiom" : "ipad", 96 | "filename" : "Icon-App-76x76@1x.png", 97 | "scale" : "1x" 98 | }, 99 | { 100 | "size" : "76x76", 101 | "idiom" : "ipad", 102 | "filename" : "Icon-App-76x76@2x.png", 103 | "scale" : "2x" 104 | }, 105 | { 106 | "size" : "83.5x83.5", 107 | "idiom" : "ipad", 108 | "filename" : "Icon-App-83.5x83.5@2x.png", 109 | "scale" : "2x" 110 | }, 111 | { 112 | "size" : "1024x1024", 113 | "idiom" : "ios-marketing", 114 | "filename" : "Icon-App-1024x1024@1x.png", 115 | "scale" : "1x" 116 | } 117 | ], 118 | "info" : { 119 | "version" : 1, 120 | "author" : "xcode" 121 | } 122 | } 123 | -------------------------------------------------------------------------------- /just_audio_background/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "size" : "20x20", 5 | "idiom" : "iphone", 6 | "filename" : "Icon-App-20x20@2x.png", 7 | "scale" : "2x" 8 | }, 9 | { 10 | "size" : "20x20", 11 | "idiom" : "iphone", 12 | "filename" : "Icon-App-20x20@3x.png", 13 | "scale" : "3x" 14 | }, 15 | { 16 | "size" : "29x29", 17 | "idiom" : "iphone", 18 | "filename" : "Icon-App-29x29@1x.png", 19 | "scale" : "1x" 20 | }, 21 | { 22 | "size" : "29x29", 23 | "idiom" : "iphone", 24 | "filename" : "Icon-App-29x29@2x.png", 25 | "scale" : "2x" 26 | }, 27 | { 28 | "size" : "29x29", 29 | "idiom" : "iphone", 30 | "filename" : "Icon-App-29x29@3x.png", 31 | "scale" : "3x" 32 | }, 33 | { 34 | "size" : "40x40", 35 | "idiom" : "iphone", 36 | "filename" : "Icon-App-40x40@2x.png", 37 | "scale" : "2x" 38 | }, 39 | { 40 | "size" : "40x40", 41 | "idiom" : "iphone", 42 | "filename" : "Icon-App-40x40@3x.png", 43 | "scale" : "3x" 44 | }, 45 | { 46 | "size" : "60x60", 47 | "idiom" : "iphone", 48 | "filename" : "Icon-App-60x60@2x.png", 49 | "scale" : "2x" 50 | }, 51 | { 52 | "size" : "60x60", 53 | "idiom" : "iphone", 54 | "filename" : "Icon-App-60x60@3x.png", 55 | "scale" : "3x" 56 | }, 57 | { 58 | "size" : "20x20", 59 | "idiom" : "ipad", 60 | "filename" : "Icon-App-20x20@1x.png", 61 | "scale" : "1x" 62 | }, 63 | { 64 | "size" : "20x20", 65 | "idiom" : "ipad", 66 | "filename" : "Icon-App-20x20@2x.png", 67 | "scale" : "2x" 68 | }, 69 | { 70 | "size" : "29x29", 71 | "idiom" : "ipad", 72 | "filename" : "Icon-App-29x29@1x.png", 73 | "scale" : "1x" 74 | }, 75 | { 76 | "size" : "29x29", 77 | "idiom" : "ipad", 78 | "filename" : "Icon-App-29x29@2x.png", 79 | "scale" : "2x" 80 | }, 81 | { 82 | "size" : "40x40", 83 | "idiom" : "ipad", 84 | "filename" : "Icon-App-40x40@1x.png", 85 | "scale" : "1x" 86 | }, 87 | { 88 | "size" : "40x40", 89 | "idiom" : "ipad", 90 | "filename" : "Icon-App-40x40@2x.png", 91 | "scale" : "2x" 92 | }, 93 | { 94 | "size" : "76x76", 95 | "idiom" : "ipad", 96 | "filename" : "Icon-App-76x76@1x.png", 97 | "scale" : "1x" 98 | }, 99 | { 100 | "size" : "76x76", 101 | "idiom" : "ipad", 102 | "filename" : "Icon-App-76x76@2x.png", 103 | "scale" : "2x" 104 | }, 105 | { 106 | "size" : "83.5x83.5", 107 | "idiom" : "ipad", 108 | "filename" : "Icon-App-83.5x83.5@2x.png", 109 | "scale" : "2x" 110 | }, 111 | { 112 | "size" : "1024x1024", 113 | "idiom" : "ios-marketing", 114 | "filename" : "Icon-App-1024x1024@1x.png", 115 | "scale" : "1x" 116 | } 117 | ], 118 | "info" : { 119 | "version" : 1, 120 | "author" : "xcode" 121 | } 122 | } 123 | -------------------------------------------------------------------------------- /just_audio/example/windows/runner/Runner.rc: -------------------------------------------------------------------------------- 1 | // Microsoft Visual C++ generated resource script. 2 | // 3 | #pragma code_page(65001) 4 | #include "resource.h" 5 | 6 | #define APSTUDIO_READONLY_SYMBOLS 7 | ///////////////////////////////////////////////////////////////////////////// 8 | // 9 | // Generated from the TEXTINCLUDE 2 resource. 10 | // 11 | #include "winres.h" 12 | 13 | ///////////////////////////////////////////////////////////////////////////// 14 | #undef APSTUDIO_READONLY_SYMBOLS 15 | 16 | ///////////////////////////////////////////////////////////////////////////// 17 | // English (United States) resources 18 | 19 | #if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU) 20 | LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US 21 | 22 | #ifdef APSTUDIO_INVOKED 23 | ///////////////////////////////////////////////////////////////////////////// 24 | // 25 | // TEXTINCLUDE 26 | // 27 | 28 | 1 TEXTINCLUDE 29 | BEGIN 30 | "resource.h\0" 31 | END 32 | 33 | 2 TEXTINCLUDE 34 | BEGIN 35 | "#include ""winres.h""\r\n" 36 | "\0" 37 | END 38 | 39 | 3 TEXTINCLUDE 40 | BEGIN 41 | "\r\n" 42 | "\0" 43 | END 44 | 45 | #endif // APSTUDIO_INVOKED 46 | 47 | 48 | ///////////////////////////////////////////////////////////////////////////// 49 | // 50 | // Icon 51 | // 52 | 53 | // Icon with lowest ID value placed first to ensure application icon 54 | // remains consistent on all systems. 55 | IDI_APP_ICON ICON "resources\\app_icon.ico" 56 | 57 | 58 | ///////////////////////////////////////////////////////////////////////////// 59 | // 60 | // Version 61 | // 62 | 63 | #ifdef FLUTTER_BUILD_NUMBER 64 | #define VERSION_AS_NUMBER FLUTTER_BUILD_NUMBER 65 | #else 66 | #define VERSION_AS_NUMBER 1,0,0 67 | #endif 68 | 69 | #ifdef FLUTTER_BUILD_NAME 70 | #define VERSION_AS_STRING #FLUTTER_BUILD_NAME 71 | #else 72 | #define VERSION_AS_STRING "1.0.0" 73 | #endif 74 | 75 | VS_VERSION_INFO VERSIONINFO 76 | FILEVERSION VERSION_AS_NUMBER 77 | PRODUCTVERSION VERSION_AS_NUMBER 78 | FILEFLAGSMASK VS_FFI_FILEFLAGSMASK 79 | #ifdef _DEBUG 80 | FILEFLAGS VS_FF_DEBUG 81 | #else 82 | FILEFLAGS 0x0L 83 | #endif 84 | FILEOS VOS__WINDOWS32 85 | FILETYPE VFT_APP 86 | FILESUBTYPE 0x0L 87 | BEGIN 88 | BLOCK "StringFileInfo" 89 | BEGIN 90 | BLOCK "040904e4" 91 | BEGIN 92 | VALUE "CompanyName", "com.ryanheise" "\0" 93 | VALUE "FileDescription", "Demonstrates how to use the just_audio plugin." "\0" 94 | VALUE "FileVersion", VERSION_AS_STRING "\0" 95 | VALUE "InternalName", "just_audio_example" "\0" 96 | VALUE "LegalCopyright", "Copyright (C) 2021 com.ryanheise. All rights reserved." "\0" 97 | VALUE "OriginalFilename", "just_audio_example.exe" "\0" 98 | VALUE "ProductName", "just_audio_example" "\0" 99 | VALUE "ProductVersion", VERSION_AS_STRING "\0" 100 | END 101 | END 102 | BLOCK "VarFileInfo" 103 | BEGIN 104 | VALUE "Translation", 0x409, 1252 105 | END 106 | END 107 | 108 | #endif // English (United States) resources 109 | ///////////////////////////////////////////////////////////////////////////// 110 | 111 | 112 | 113 | #ifndef APSTUDIO_INVOKED 114 | ///////////////////////////////////////////////////////////////////////////// 115 | // 116 | // Generated from the TEXTINCLUDE 3 resource. 117 | // 118 | 119 | 120 | ///////////////////////////////////////////////////////////////////////////// 121 | #endif // not APSTUDIO_INVOKED 122 | -------------------------------------------------------------------------------- /just_audio/example/windows/runner/win32_window.h: -------------------------------------------------------------------------------- 1 | #ifndef RUNNER_WIN32_WINDOW_H_ 2 | #define RUNNER_WIN32_WINDOW_H_ 3 | 4 | #include 5 | 6 | #include 7 | #include 8 | #include 9 | 10 | // A class abstraction for a high DPI-aware Win32 Window. Intended to be 11 | // inherited from by classes that wish to specialize with custom 12 | // rendering and input handling 13 | class Win32Window { 14 | public: 15 | struct Point { 16 | unsigned int x; 17 | unsigned int y; 18 | Point(unsigned int x, unsigned int y) : x(x), y(y) {} 19 | }; 20 | 21 | struct Size { 22 | unsigned int width; 23 | unsigned int height; 24 | Size(unsigned int width, unsigned int height) 25 | : width(width), height(height) {} 26 | }; 27 | 28 | Win32Window(); 29 | virtual ~Win32Window(); 30 | 31 | // Creates and shows a win32 window with |title| and position and size using 32 | // |origin| and |size|. New windows are created on the default monitor. Window 33 | // sizes are specified to the OS in physical pixels, hence to ensure a 34 | // consistent size to will treat the width height passed in to this function 35 | // as logical pixels and scale to appropriate for the default monitor. Returns 36 | // true if the window was created successfully. 37 | bool CreateAndShow(const std::wstring& title, 38 | const Point& origin, 39 | const Size& size); 40 | 41 | // Release OS resources associated with window. 42 | void Destroy(); 43 | 44 | // Inserts |content| into the window tree. 45 | void SetChildContent(HWND content); 46 | 47 | // Returns the backing Window handle to enable clients to set icon and other 48 | // window properties. Returns nullptr if the window has been destroyed. 49 | HWND GetHandle(); 50 | 51 | // If true, closing this window will quit the application. 52 | void SetQuitOnClose(bool quit_on_close); 53 | 54 | // Return a RECT representing the bounds of the current client area. 55 | RECT GetClientArea(); 56 | 57 | protected: 58 | // Processes and route salient window messages for mouse handling, 59 | // size change and DPI. Delegates handling of these to member overloads that 60 | // inheriting classes can handle. 61 | virtual LRESULT MessageHandler(HWND window, 62 | UINT const message, 63 | WPARAM const wparam, 64 | LPARAM const lparam) noexcept; 65 | 66 | // Called when CreateAndShow is called, allowing subclass window-related 67 | // setup. Subclasses should return false if setup fails. 68 | virtual bool OnCreate(); 69 | 70 | // Called when Destroy is called. 71 | virtual void OnDestroy(); 72 | 73 | private: 74 | friend class WindowClassRegistrar; 75 | 76 | // OS callback called by message pump. Handles the WM_NCCREATE message which 77 | // is passed when the non-client area is being created and enables automatic 78 | // non-client DPI scaling so that the non-client area automatically 79 | // responsponds to changes in DPI. All other messages are handled by 80 | // MessageHandler. 81 | static LRESULT CALLBACK WndProc(HWND const window, 82 | UINT const message, 83 | WPARAM const wparam, 84 | LPARAM const lparam) noexcept; 85 | 86 | // Retrieves a class instance pointer for |window| 87 | static Win32Window* GetThisFromHandle(HWND const window) noexcept; 88 | 89 | bool quit_on_close_ = false; 90 | 91 | // window handle for top level window. 92 | HWND window_handle_ = nullptr; 93 | 94 | // window handle for hosted content. 95 | HWND child_content_ = nullptr; 96 | }; 97 | 98 | #endif // RUNNER_WIN32_WINDOW_H_ 99 | -------------------------------------------------------------------------------- /just_audio/example/windows/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | cmake_minimum_required(VERSION 3.15) 2 | project(just_audio_example LANGUAGES CXX) 3 | 4 | set(BINARY_NAME "just_audio_example") 5 | 6 | cmake_policy(SET CMP0063 NEW) 7 | 8 | set(CMAKE_INSTALL_RPATH "$ORIGIN/lib") 9 | 10 | # Configure build options. 11 | get_property(IS_MULTICONFIG GLOBAL PROPERTY GENERATOR_IS_MULTI_CONFIG) 12 | if(IS_MULTICONFIG) 13 | set(CMAKE_CONFIGURATION_TYPES "Debug;Profile;Release" 14 | CACHE STRING "" FORCE) 15 | else() 16 | if(NOT CMAKE_BUILD_TYPE AND NOT CMAKE_CONFIGURATION_TYPES) 17 | set(CMAKE_BUILD_TYPE "Debug" CACHE 18 | STRING "Flutter build mode" FORCE) 19 | set_property(CACHE CMAKE_BUILD_TYPE PROPERTY STRINGS 20 | "Debug" "Profile" "Release") 21 | endif() 22 | endif() 23 | 24 | set(CMAKE_EXE_LINKER_FLAGS_PROFILE "${CMAKE_EXE_LINKER_FLAGS_RELEASE}") 25 | set(CMAKE_SHARED_LINKER_FLAGS_PROFILE "${CMAKE_SHARED_LINKER_FLAGS_RELEASE}") 26 | set(CMAKE_C_FLAGS_PROFILE "${CMAKE_C_FLAGS_RELEASE}") 27 | set(CMAKE_CXX_FLAGS_PROFILE "${CMAKE_CXX_FLAGS_RELEASE}") 28 | 29 | # Use Unicode for all projects. 30 | add_definitions(-DUNICODE -D_UNICODE) 31 | 32 | # Compilation settings that should be applied to most targets. 33 | function(APPLY_STANDARD_SETTINGS TARGET) 34 | target_compile_features(${TARGET} PUBLIC cxx_std_17) 35 | target_compile_options(${TARGET} PRIVATE /W4 /WX /wd"4100") 36 | target_compile_options(${TARGET} PRIVATE /EHsc) 37 | target_compile_definitions(${TARGET} PRIVATE "_HAS_EXCEPTIONS=0") 38 | target_compile_definitions(${TARGET} PRIVATE "$<$:_DEBUG>") 39 | endfunction() 40 | 41 | set(FLUTTER_MANAGED_DIR "${CMAKE_CURRENT_SOURCE_DIR}/flutter") 42 | 43 | # Flutter library and tool build rules. 44 | add_subdirectory(${FLUTTER_MANAGED_DIR}) 45 | 46 | # Application build 47 | add_subdirectory("runner") 48 | 49 | # Generated plugin build rules, which manage building the plugins and adding 50 | # them to the application. 51 | include(flutter/generated_plugins.cmake) 52 | 53 | 54 | # === Installation === 55 | # Support files are copied into place next to the executable, so that it can 56 | # run in place. This is done instead of making a separate bundle (as on Linux) 57 | # so that building and running from within Visual Studio will work. 58 | set(BUILD_BUNDLE_DIR "$") 59 | # Make the "install" step default, as it's required to run. 60 | set(CMAKE_VS_INCLUDE_INSTALL_TO_DEFAULT_BUILD 1) 61 | if(CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT) 62 | set(CMAKE_INSTALL_PREFIX "${BUILD_BUNDLE_DIR}" CACHE PATH "..." FORCE) 63 | endif() 64 | 65 | set(INSTALL_BUNDLE_DATA_DIR "${CMAKE_INSTALL_PREFIX}/data") 66 | set(INSTALL_BUNDLE_LIB_DIR "${CMAKE_INSTALL_PREFIX}") 67 | 68 | install(TARGETS ${BINARY_NAME} RUNTIME DESTINATION "${CMAKE_INSTALL_PREFIX}" 69 | COMPONENT Runtime) 70 | 71 | install(FILES "${FLUTTER_ICU_DATA_FILE}" DESTINATION "${INSTALL_BUNDLE_DATA_DIR}" 72 | COMPONENT Runtime) 73 | 74 | install(FILES "${FLUTTER_LIBRARY}" DESTINATION "${INSTALL_BUNDLE_LIB_DIR}" 75 | COMPONENT Runtime) 76 | 77 | if(PLUGIN_BUNDLED_LIBRARIES) 78 | install(FILES "${PLUGIN_BUNDLED_LIBRARIES}" 79 | DESTINATION "${INSTALL_BUNDLE_LIB_DIR}" 80 | COMPONENT Runtime) 81 | endif() 82 | 83 | # Fully re-copy the assets directory on each build to avoid having stale files 84 | # from a previous install. 85 | set(FLUTTER_ASSET_DIR_NAME "flutter_assets") 86 | install(CODE " 87 | file(REMOVE_RECURSE \"${INSTALL_BUNDLE_DATA_DIR}/${FLUTTER_ASSET_DIR_NAME}\") 88 | " COMPONENT Runtime) 89 | install(DIRECTORY "${PROJECT_BUILD_DIR}/${FLUTTER_ASSET_DIR_NAME}" 90 | DESTINATION "${INSTALL_BUNDLE_DATA_DIR}" COMPONENT Runtime) 91 | 92 | # Install the AOT library on non-Debug builds only. 93 | install(FILES "${AOT_LIBRARY}" DESTINATION "${INSTALL_BUNDLE_DATA_DIR}" 94 | CONFIGURATIONS Profile;Release 95 | COMPONENT Runtime) 96 | -------------------------------------------------------------------------------- /just_audio/example/windows/flutter/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | cmake_minimum_required(VERSION 3.15) 2 | 3 | set(EPHEMERAL_DIR "${CMAKE_CURRENT_SOURCE_DIR}/ephemeral") 4 | 5 | # Configuration provided via flutter tool. 6 | include(${EPHEMERAL_DIR}/generated_config.cmake) 7 | 8 | # TODO: Move the rest of this into files in ephemeral. See 9 | # https://github.com/flutter/flutter/issues/57146. 10 | set(WRAPPER_ROOT "${EPHEMERAL_DIR}/cpp_client_wrapper") 11 | 12 | # === Flutter Library === 13 | set(FLUTTER_LIBRARY "${EPHEMERAL_DIR}/flutter_windows.dll") 14 | 15 | # Published to parent scope for install step. 16 | set(FLUTTER_LIBRARY ${FLUTTER_LIBRARY} PARENT_SCOPE) 17 | set(FLUTTER_ICU_DATA_FILE "${EPHEMERAL_DIR}/icudtl.dat" PARENT_SCOPE) 18 | set(PROJECT_BUILD_DIR "${PROJECT_DIR}/build/" PARENT_SCOPE) 19 | set(AOT_LIBRARY "${PROJECT_DIR}/build/windows/app.so" PARENT_SCOPE) 20 | 21 | list(APPEND FLUTTER_LIBRARY_HEADERS 22 | "flutter_export.h" 23 | "flutter_windows.h" 24 | "flutter_messenger.h" 25 | "flutter_plugin_registrar.h" 26 | "flutter_texture_registrar.h" 27 | ) 28 | list(TRANSFORM FLUTTER_LIBRARY_HEADERS PREPEND "${EPHEMERAL_DIR}/") 29 | add_library(flutter INTERFACE) 30 | target_include_directories(flutter INTERFACE 31 | "${EPHEMERAL_DIR}" 32 | ) 33 | target_link_libraries(flutter INTERFACE "${FLUTTER_LIBRARY}.lib") 34 | add_dependencies(flutter flutter_assemble) 35 | 36 | # === Wrapper === 37 | list(APPEND CPP_WRAPPER_SOURCES_CORE 38 | "core_implementations.cc" 39 | "standard_codec.cc" 40 | ) 41 | list(TRANSFORM CPP_WRAPPER_SOURCES_CORE PREPEND "${WRAPPER_ROOT}/") 42 | list(APPEND CPP_WRAPPER_SOURCES_PLUGIN 43 | "plugin_registrar.cc" 44 | ) 45 | list(TRANSFORM CPP_WRAPPER_SOURCES_PLUGIN PREPEND "${WRAPPER_ROOT}/") 46 | list(APPEND CPP_WRAPPER_SOURCES_APP 47 | "flutter_engine.cc" 48 | "flutter_view_controller.cc" 49 | ) 50 | list(TRANSFORM CPP_WRAPPER_SOURCES_APP PREPEND "${WRAPPER_ROOT}/") 51 | 52 | # Wrapper sources needed for a plugin. 53 | add_library(flutter_wrapper_plugin STATIC 54 | ${CPP_WRAPPER_SOURCES_CORE} 55 | ${CPP_WRAPPER_SOURCES_PLUGIN} 56 | ) 57 | apply_standard_settings(flutter_wrapper_plugin) 58 | set_target_properties(flutter_wrapper_plugin PROPERTIES 59 | POSITION_INDEPENDENT_CODE ON) 60 | set_target_properties(flutter_wrapper_plugin PROPERTIES 61 | CXX_VISIBILITY_PRESET hidden) 62 | target_link_libraries(flutter_wrapper_plugin PUBLIC flutter) 63 | target_include_directories(flutter_wrapper_plugin PUBLIC 64 | "${WRAPPER_ROOT}/include" 65 | ) 66 | add_dependencies(flutter_wrapper_plugin flutter_assemble) 67 | 68 | # Wrapper sources needed for the runner. 69 | add_library(flutter_wrapper_app STATIC 70 | ${CPP_WRAPPER_SOURCES_CORE} 71 | ${CPP_WRAPPER_SOURCES_APP} 72 | ) 73 | apply_standard_settings(flutter_wrapper_app) 74 | target_link_libraries(flutter_wrapper_app PUBLIC flutter) 75 | target_include_directories(flutter_wrapper_app PUBLIC 76 | "${WRAPPER_ROOT}/include" 77 | ) 78 | add_dependencies(flutter_wrapper_app flutter_assemble) 79 | 80 | # === Flutter tool backend === 81 | # _phony_ is a non-existent file to force this command to run every time, 82 | # since currently there's no way to get a full input/output list from the 83 | # flutter tool. 84 | set(PHONY_OUTPUT "${CMAKE_CURRENT_BINARY_DIR}/_phony_") 85 | set_source_files_properties("${PHONY_OUTPUT}" PROPERTIES SYMBOLIC TRUE) 86 | add_custom_command( 87 | OUTPUT ${FLUTTER_LIBRARY} ${FLUTTER_LIBRARY_HEADERS} 88 | ${CPP_WRAPPER_SOURCES_CORE} ${CPP_WRAPPER_SOURCES_PLUGIN} 89 | ${CPP_WRAPPER_SOURCES_APP} 90 | ${PHONY_OUTPUT} 91 | COMMAND ${CMAKE_COMMAND} -E env 92 | ${FLUTTER_TOOL_ENVIRONMENT} 93 | "${FLUTTER_ROOT}/packages/flutter_tools/bin/tool_backend.bat" 94 | windows-x64 $ 95 | VERBATIM 96 | ) 97 | add_custom_target(flutter_assemble DEPENDS 98 | "${FLUTTER_LIBRARY}" 99 | ${FLUTTER_LIBRARY_HEADERS} 100 | ${CPP_WRAPPER_SOURCES_CORE} 101 | ${CPP_WRAPPER_SOURCES_PLUGIN} 102 | ${CPP_WRAPPER_SOURCES_APP} 103 | ) 104 | --------------------------------------------------------------------------------