Giter Site home page Giter Site logo

florent37 / flutter-assetsaudioplayer Goto Github PK

View Code? Open in Web Editor NEW
736.0 17.0 329.0 96.26 MB

Play simultaneously music/audio from assets/network/file directly from Flutter, compatible with android / ios / web / macos, displays notifications

Home Page: https://pub.dartlang.org/packages/assets_audio_player

License: Apache License 2.0

Kotlin 27.51% Ruby 1.26% Swift 13.77% Objective-C 0.17% Dart 56.92% Shell 0.10% HTML 0.27%
dart kotlin flutter swift android ios media player mp3 audio

flutter-assetsaudioplayer's People

Contributors

ahmedabogameel avatar alexmercerind avatar alichter avatar asmengistu avatar byteszero avatar campcoxconsultants avatar florent37 avatar fyt7943tyf avatar jaichangpark avatar jeremiahseun avatar kalismeras61 avatar luis901101 avatar markst avatar mayb3nots avatar nikitadol avatar nohli avatar offline-first avatar preetjdp avatar rishiagrawal2609 avatar sahharyoucef avatar shadyboshra2012 avatar siddharth-cmd avatar simon-hypecast avatar sumitkakshapati avatar tinusneethling avatar vbuberen avatar vipulasri avatar xni06 avatar zbutwialypiernik avatar zerobytesx avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

flutter-assetsaudioplayer's Issues

Volume control

could this be supported or is it too complicated to implement yet?

Local files on iOS, yes/no/maybe?

It is not clear whether one should expect this plugin to work on iOS when playing local files (for example downloaded to some path) is working. on the description (and also https://pub.dev/packages/assets_audio_player) there is only an apple icon for that row but no mention anywhere.
would appreciate it if this is made clear as I tried and it does not work (bug file will follow if you want to make it work).

bug in newer version!

the package was running fine but after upgrading to 1.26 and newer verisons my application can't run and it shows this

e: C:\src\flutter\.pub-cache\hosted\pub.dartlang.org\assets_audio_player-1.2.5\android\src\main\kotlin\com\github\florent37\assetsaudioplayer\AssetsAudioPlayerPlugin.kt: (14, 14): Conflicting declarations: internal val METHOD_FINISHED: String, internal val METHOD_FINISHED: String
e: C:\src\flutter\.pub-cache\hosted\pub.dartlang.org\assets_audio_player-1.2.5\android\src\main\kotlin\com\github\florent37\assetsaudioplayer\AssetsAudioPlayerPlugin.kt: (15, 14): Conflicting declarations: internal val METHOD_IS_PLAYING: String, internal val METHOD_IS_PLAYING: String
e: C:\src\flutter\.pub-cache\hosted\pub.dartlang.org\assets_audio_player-1.2.5\android\src\main\kotlin\com\github\florent37\assetsaudioplayer\AssetsAudioPlayerPlugin.kt: (16, 14): Conflicting declarations: internal val METHOD_CURRENT: String, internal val METHOD_CURRENT: String
e: C:\src\flutter\.pub-cache\hosted\pub.dartlang.org\assets_audio_player-1.2.5\android\src\main\kotlin\com\github\florent37\assetsaudioplayer\AssetsAudioPlayerPlugin.kt: (17, 14): Conflicting declarations: internal val METHOD_NEXT: String, internal val METHOD_NEXT: String
e: C:\src\flutter\.pub-cache\hosted\pub.dartlang.org\assets_audio_player-1.2.5\android\src\main\kotlin\com\github\florent37\assetsaudioplayer\AssetsAudioPlayerPlugin.kt: (18, 14): Conflicting declarations: internal val METHOD_PREV: String, internal val METHOD_PREV: String
e: C:\src\flutter\.pub-cache\hosted\pub.dartlang.org\assets_audio_player-1.2.5\android\src\main\kotlin\com\github\florent37\assetsaudioplayer\AssetsAudioPlayerPlugin.kt: (20, 7): Redeclaration: AssetsAudioPlayerPlugin
e: C:\src\flutter\.pub-cache\hosted\pub.dartlang.org\assets_audio_player-1.2.5\android\src\main\kotlin\com\github\florent37\assetsaudioplayer\AssetsAudioPlayerPlugin.kt: (47, 42): Overload resolution ambiguity: 
internal val METHOD_POSITION: String defined in com.github.florent37.assetsaudioplayer in file AssetsAudioPlayerPlugin.kt
internal val METHOD_POSITION: String defined in com.github.florent37.assetsaudioplayer in file AssetsAudioPlayerPlugin.kt
e: C:\src\flutter\.pub-cache\hosted\pub.dartlang.org\assets_audio_player-1.2.5\android\src\main\kotlin\com\github\florent37\assetsaudioplayer\AssetsAudioPlayerPlugin.kt: (103, 34): Overload resolution ambiguity: 
internal val METHOD_POSITION: String defined in com.github.florent37.assetsaudioplayer in file AssetsAudioPlayerPlugin.kt
internal val METHOD_POSITION: String defined in com.github.florent37.assetsaudioplayer in file AssetsAudioPlayerPlugin.kt
e: C:\src\flutter\.pub-cache\hosted\pub.dartlang.org\assets_audio_player-1.2.5\android\src\main\kotlin\com\github\florent37\assetsaudioplayer\AssetsAudioPlayerPlugin.kt: (107, 34): Overload resolution ambiguity: 
internal val METHOD_IS_PLAYING: String defined in com.github.florent37.assetsaudioplayer in file AssetsAudioPlayerPlugin.kt
internal val METHOD_IS_PLAYING: String defined in com.github.florent37.assetsaudioplayer in file AssetsAudioPlayerPlugin.kt
e: C:\src\flutter\.pub-cache\hosted\pub.dartlang.org\assets_audio_player-1.2.5\android\src\main\kotlin\com\github\florent37\assetsaudioplayer\AssetsAudioPlayerPlugin.kt: (137, 34): Overload resolution ambiguity: 
internal val METHOD_POSITION: String defined in com.github.florent37.assetsaudioplayer in file AssetsAudioPlayerPlugin.kt
internal val METHOD_POSITION: String defined in com.github.florent37.assetsaudioplayer in file AssetsAudioPlayerPlugin.kt
e: C:\src\flutter\.pub-cache\hosted\pub.dartlang.org\assets_audio_player-1.2.5\android\src\main\kotlin\com\github\florent37\assetsaudioplayer\AssetsAudioPlayerPlugin.kt: (149, 34): Overload resolution ambiguity: 
internal val METHOD_POSITION: String defined in com.github.florent37.assetsaudioplayer in file AssetsAudioPlayerPlugin.kt
internal val METHOD_POSITION: String defined in com.github.florent37.assetsaudioplayer in file AssetsAudioPlayerPlugin.kt
e: C:\src\flutter\.pub-cache\hosted\pub.dartlang.org\assets_audio_player-1.2.5\android\src\main\kotlin\com\github\florent37\assetsaudioplayer\AssetsAudioPlayerPlugin.kt: (159, 34): Overload resolution ambiguity: 
internal val METHOD_FINISHED: String defined in com.github.florent37.assetsaudioplayer in file AssetsAudioPlayerPlugin.kt
internal val METHOD_FINISHED: String defined in com.github.florent37.assetsaudioplayer in file AssetsAudioPlayerPlugin.kt
e: C:\src\flutter\.pub-cache\hosted\pub.dartlang.org\assets_audio_player-1.2.5\android\src\main\kotlin\com\github\florent37\assetsaudioplayer\AssetsAudioPlayerPlugin.kt: (160, 34): Overload resolution ambiguity: 
internal val METHOD_IS_PLAYING: String defined in com.github.florent37.assetsaudioplayer in file AssetsAudioPlayerPlugin.kt
internal val METHOD_IS_PLAYING: String defined in com.github.florent37.assetsaudioplayer in file AssetsAudioPlayerPlugin.kt
e: C:\src\flutter\.pub-cache\hosted\pub.dartlang.org\assets_audio_player-1.2.5\android\src\main\kotlin\com\github\florent37\assetsaudioplayer\AssetsAudioPlayerPlugin.kt: (163, 30): Overload resolution ambiguity: 
internal val METHOD_CURRENT: String defined in com.github.florent37.assetsaudioplayer in file AssetsAudioPlayerPlugin.kt
internal val METHOD_CURRENT: String defined in com.github.florent37.assetsaudioplayer in file AssetsAudioPlayerPlugin.kt
e: C:\src\flutter\.pub-cache\hosted\pub.dartlang.org\assets_audio_player-1.2.5\android\src\main\kotlin\com\github\florent37\assetsaudioplayer\AssetsAudioPlayerPlugin.kt: (182, 34): Overload resolution ambiguity: 
internal val METHOD_IS_PLAYING: String defined in com.github.florent37.assetsaudioplayer in file AssetsAudioPlayerPlugin.kt
internal val METHOD_IS_PLAYING: String defined in com.github.florent37.assetsaudioplayer in file AssetsAudioPlayerPlugin.kt
e: C:\src\flutter\.pub-cache\hosted\pub.dartlang.org\assets_audio_player-1.2.5\android\src\main\kotlin\com\github\florent37\assetsaudioplayer\AssetsAudioPlayerPlugin.kt: (190, 34): Overload resolution ambiguity: 
internal val METHOD_IS_PLAYING: String defined in com.github.florent37.assetsaudioplayer in file AssetsAudioPlayerPlugin.kt
internal val METHOD_IS_PLAYING: String defined in com.github.florent37.assetsaudioplayer in file AssetsAudioPlayerPlugin.kt
e: C:\src\flutter\.pub-cache\hosted\pub.dartlang.org\assets_audio_player-1.2.5\android\src\main\kotlin\com\github\florent37\assetsaudioplayer\AssetsAudioPlayerPlugin.kt: (197, 34): Overload resolution ambiguity: 
internal val METHOD_POSITION: String defined in com.github.florent37.assetsaudioplayer in file AssetsAudioPlayerPlugin.kt
internal val METHOD_POSITION: String defined in com.github.florent37.assetsaudioplayer in file AssetsAudioPlayerPlugin.kt
e: C:\src\flutter\.pub-cache\hosted\pub.dartlang.org\assets_audio_player-1.2.8\android\src\main\kotlin\com\github\florent37\assetsaudioplayer\AssetsAudioPlayerPlugin.kt: (14, 14): Conflicting declarations: internal val METHOD_POSITION: String, internal val METHOD_POSITION: String
e: C:\src\flutter\.pub-cache\hosted\pub.dartlang.org\assets_audio_player-1.2.8\android\src\main\kotlin\com\github\florent37\assetsaudioplayer\AssetsAudioPlayerPlugin.kt: (16, 14): Conflicting declarations: internal val METHOD_FINISHED: String, internal val METHOD_FINISHED: String
e: C:\src\flutter\.pub-cache\hosted\pub.dartlang.org\assets_audio_player-1.2.8\android\src\main\kotlin\com\github\florent37\assetsaudioplayer\AssetsAudioPlayerPlugin.kt: (17, 14): Conflicting declarations: internal val METHOD_IS_PLAYING: String, internal val METHOD_IS_PLAYING: String
e: C:\src\flutter\.pub-cache\hosted\pub.dartlang.org\assets_audio_player-1.2.8\android\src\main\kotlin\com\github\florent37\assetsaudioplayer\AssetsAudioPlayerPlugin.kt: (18, 14): Conflicting declarations: internal val METHOD_CURRENT: String, internal val METHOD_CURRENT: String
e: C:\src\flutter\.pub-cache\hosted\pub.dartlang.org\assets_audio_player-1.2.8\android\src\main\kotlin\com\github\florent37\assetsaudioplayer\AssetsAudioPlayerPlugin.kt: (19, 14): Conflicting declarations: internal val METHOD_NEXT: String, internal val METHOD_NEXT: String
e: C:\src\flutter\.pub-cache\hosted\pub.dartlang.org\assets_audio_player-1.2.8\android\src\main\kotlin\com\github\florent37\assetsaudioplayer\AssetsAudioPlayerPlugin.kt: (20, 14): Conflicting declarations: internal val METHOD_PREV: String, internal val METHOD_PREV: String
e: C:\src\flutter\.pub-cache\hosted\pub.dartlang.org\assets_audio_player-1.2.8\android\src\main\kotlin\com\github\florent37\assetsaudioplayer\AssetsAudioPlayerPlugin.kt: (40, 42): Overload resolution ambiguity: 
internal val METHOD_POSITION: String defined in com.github.florent37.assetsaudioplayer in file AssetsAudioPlayerPlugin.kt
internal val METHOD_POSITION: String defined in com.github.florent37.assetsaudioplayer in file AssetsAudioPlayerPlugin.kt
e: C:\src\flutter\.pub-cache\hosted\pub.dartlang.org\assets_audio_player-1.2.8\android\src\main\kotlin\com\github\florent37\assetsaudioplayer\AssetsAudioPlayerPlugin.kt: (76, 34): Overload resolution ambiguity: 
internal val METHOD_POSITION: String defined in com.github.florent37.assetsaudioplayer in file AssetsAudioPlayerPlugin.kt
internal val METHOD_POSITION: String defined in com.github.florent37.assetsaudioplayer in file AssetsAudioPlayerPlugin.kt
e: C:\src\flutter\.pub-cache\hosted\pub.dartlang.org\assets_audio_player-1.2.8\android\src\main\kotlin\com\github\florent37\assetsaudioplayer\AssetsAudioPlayerPlugin.kt: (90, 34): Overload resolution ambiguity: 
internal val METHOD_POSITION: String defined in com.github.florent37.assetsaudioplayer in file AssetsAudioPlayerPlugin.kt
internal val METHOD_POSITION: String defined in com.github.florent37.assetsaudioplayer in file AssetsAudioPlayerPlugin.kt
e: C:\src\flutter\.pub-cache\hosted\pub.dartlang.org\assets_audio_player-1.2.8\android\src\main\kotlin\com\github\florent37\assetsaudioplayer\AssetsAudioPlayerPlugin.kt: (100, 34): Overload resolution ambiguity: 
internal val METHOD_FINISHED: String defined in com.github.florent37.assetsaudioplayer in file AssetsAudioPlayerPlugin.kt
internal val METHOD_FINISHED: String defined in com.github.florent37.assetsaudioplayer in file AssetsAudioPlayerPlugin.kt
e: C:\src\flutter\.pub-cache\hosted\pub.dartlang.org\assets_audio_player-1.2.8\android\src\main\kotlin\com\github\florent37\assetsaudioplayer\AssetsAudioPlayerPlugin.kt: (104, 30): Overload resolution ambiguity: 
internal val METHOD_CURRENT: String defined in com.github.florent37.assetsaudioplayer in file AssetsAudioPlayerPlugin.kt
internal val METHOD_CURRENT: String defined in com.github.florent37.assetsaudioplayer in file AssetsAudioPlayerPlugin.kt
e: C:\src\flutter\.pub-cache\hosted\pub.dartlang.org\assets_audio_player-1.2.8\android\src\main\kotlin\com\github\florent37\assetsaudioplayer\AssetsAudioPlayerPlugin.kt: (118, 34): Overload resolution ambiguity: 
internal val METHOD_POSITION: String defined in com.github.florent37.assetsaudioplayer in file AssetsAudioPlayerPlugin.kt
internal val METHOD_POSITION: String defined in com.github.florent37.assetsaudioplayer in file AssetsAudioPlayerPlugin.kt
e: C:\src\flutter\.pub-cache\hosted\pub.dartlang.org\assets_audio_player-1.2.8\android\src\main\kotlin\com\github\florent37\assetsaudioplayer\AssetsAudioPlayerPlugin.kt: (123, 34): Overload resolution ambiguity: 
internal val METHOD_IS_PLAYING: String defined in com.github.florent37.assetsaudioplayer in file AssetsAudioPlayerPlugin.kt
internal val METHOD_IS_PLAYING: String defined in com.github.florent37.assetsaudioplayer in file AssetsAudioPlayerPlugin.kt
e: C:\src\flutter\.pub-cache\hosted\pub.dartlang.org\assets_audio_player-1.2.8\android\src\main\kotlin\com\github\florent37\assetsaudioplayer\AssetsAudioPlayerPlugin.kt: (142, 34): Overload resolution ambiguity: 
internal val METHOD_IS_PLAYING: String defined in com.github.florent37.assetsaudioplayer in file AssetsAudioPlayerPlugin.kt
internal val METHOD_IS_PLAYING: String defined in com.github.florent37.assetsaudioplayer in file AssetsAudioPlayerPlugin.kt
e: C:\src\flutter\.pub-cache\hosted\pub.dartlang.org\assets_audio_player-1.2.8\android\src\main\kotlin\com\github\florent37\assetsaudioplayer\AssetsAudioPlayerPlugin.kt: (150, 34): Overload resolution ambiguity: 
internal val METHOD_IS_PLAYING: String defined in com.github.florent37.assetsaudioplayer in file AssetsAudioPlayerPlugin.kt
internal val METHOD_IS_PLAYING: String defined in com.github.florent37.assetsaudioplayer in file AssetsAudioPlayerPlugin.kt
e: C:\src\flutter\.pub-cache\hosted\pub.dartlang.org\assets_audio_player-1.2.8\android\src\main\kotlin\com\github\florent37\assetsaudioplayer\AssetsAudioPlayerPlugin.kt: (157, 34): Overload resolution ambiguity: 
internal val METHOD_POSITION: String defined in com.github.florent37.assetsaudioplayer in file AssetsAudioPlayerPlugin.kt
internal val METHOD_POSITION: String defined in com.github.florent37.assetsaudioplayer in file AssetsAudioPlayerPlugin.kt
e: C:\src\flutter\.pub-cache\hosted\pub.dartlang.org\assets_audio_player-1.2.8\android\src\main\kotlin\com\github\florent37\assetsaudioplayer\AssetsAudioPlayerPlugin.kt: (169, 7): Redeclaration: AssetsAudioPlayerPlugin
e: C:\src\flutter\.pub-cache\hosted\pub.dartlang.org\assets_audio_player-1.2.8\android\src\main\kotlin\com\github\florent37\assetsaudioplayer\AssetsAudioPlayerPlugin.kt: (175, 87): Type mismatch: inferred type is BinaryMessenger! but MethodChannel was expected
e: C:\src\flutter\.pub-cache\hosted\pub.dartlang.org\assets_audio_player-1.2.8\android\src\main\kotlin\com\github\florent37\assetsaudioplayer\AssetsAudioPlayerPlugin.kt: (175, 110): Too many arguments for public constructor AssetsAudioPlayerPlugin(context: Context, channel: MethodChannel) defined in com.github.florent37.assetsaudioplayer.AssetsAudioPlayerPlugin

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':assets_audio_player:compileDebugKotlin'.

Example code pubspec.yaml gives error code 66

Good morning. When I run the example code included on the github,and I attempt to run the pubspec.yaml file,this occurs.

Could not find a file named "pubspec.yaml" in "C:\Users\Skelly\Documents\offline code". pub get failed (66) exit code 66

How can I fix this?

Bug in Android release mode even after Flutter clean

I am having this issue in release mode even after i do flutter clean. I tried the version of the gradle but another error is shown

Gabriels-MacBook-Pro:lyric_hero jumpbotron$ flutter clean
Cleaning Xcode workspace...                                         9.4s
Deleting build...                                                1,082ms
Deleting .dart_tool...                                               2ms
Deleting Generated.xcconfig...                                       2ms
Deleting flutter_export_environment.sh...                            1ms
Gabriels-MacBook-Pro:lyric_hero jumpbotron$ Minimum supported Gradle version is 4.10.1.
bash: Minimum: command not found
Gabriels-MacBook-Pro:lyric_hero jumpbotron$ flutter run -d ba2b9fba2ef7 --release
Launching lib/main.dart on Mi A3 in release mode...
Note: /Users/jumpbotron/Documents/programming/installations/flutter/.pub-cache/hosted/pub.dartlang.org/firebase_core-0.4.3+1/android/src/main/java/io/flutter/plugins/firebase/core/FirebaseCorePlugin.java uses or overrides a deprecated API.
Note: Recompile with -Xlint:deprecation for details.                    
Note: /Users/jumpbotron/Documents/programming/installations/flutter/.pub-cache/hosted/pub.dartlang.org/cloud_firestore-0.13.0+1/android/src/main/java/io/flutter/plugins/firebase/cloudfirestore/CloudFirestorePlugin.java uses unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.                      
Note: /Users/jumpbotron/Documents/programming/installations/flutter/.pub-cache/hosted/pub.dartlang.org/firebase_database-3.1.1/android/src/main/java/io/flutter/plugins/firebase/database/FirebaseDatabasePlugin.java uses or overrides a deprecated API.
Note: Recompile with -Xlint:deprecation for details.                    
/Users/jumpbotron/Documents/programming/installations/flutter/.pub-cache/hosted/pub.dartlang.org/firebase_storage-3.1.1/android/src/main/java/io/flutter/plugins/firebase/storage/FirebaseStoragePlugin.java:60: warning: [deprecation] getFlutterEngine() in FlutterPluginBinding has been deprecated
        binding.getApplicationContext(), binding.getFlutterEngine().getDartExecutor());
                                                ^                       
1 warning                                                               
Note: Some input files use or override a deprecated API.                
Note: Recompile with -Xlint:deprecation for details.                    
Note: /Users/jumpbotron/Documents/programming/installations/flutter/.pub-cache/hosted/pub.dartlang.org/webview_media-0.1.1+3/android/src/main/java/io/flutter/plugins/webviewflutter/FlutterWebView.java uses unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.                      
/Users/jumpbotron/Documents/programming/installations/flutter/.pub-cache/hosted/pub.dartlang.org/shared_preferences-0.5.6+1/android/src/main/java/io/flutter/plugins/sharedpreferences/SharedPreferencesPlugin.java:25: warning: [deprecation] getFlutterEngine() in FlutterPluginBinding has been deprecated
    setupChannel(binding.getFlutterEngine().getDartExecutor(), binding.getApplicationContext());
                        ^                                               
1 warning                                                               
                                                                        
FAILURE: Build failed with an exception.                                
                                                                        
* What went wrong:                                                      
Execution failed for task ':clipboard_manager:verifyReleaseResources'.  
> A failure occurred while executing com.android.build.gradle.internal.tasks.Workers$ActionFacade
   > Android resource linking failed                                    
     /Users/jumpbotron/.gradle/caches/transforms-2/files-2.1/1128c5e807499d6aa189b07ac586a9bf/core-1.1.0/res/values/values.xml:142:5-173:25: AAPT: error: resource android:attr/fontVariationSettings not found.
                                                                        
     /Users/jumpbotron/.gradle/caches/transforms-2/files-2.1/1128c5e807499d6aa189b07ac586a9bf/core-1.1.0/res/values/values.xml:142:5-173:25: AAPT: error: resource android:attr/ttcIndex not found.
                                                                        
                                                                        
* Try:                                                                  
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.
                                                                        
* Get more help at https://help.gradle.org                              
                                                                        
BUILD FAILED in 58s                                                     
Running Gradle task 'assembleRelease'...                                
Running Gradle task 'assembleRelease'... Done                      59.4s
The built failed likely due to AndroidX incompatibilities in a plugin. The tool is about to try using Jetfier to solve the
incompatibility.
Building plugin assets_audio_player...
Running Gradle task 'assembleAarRelease'...                             
Running Gradle task 'assembleAarRelease'... Done                    1.1s


FAILURE: Build failed with an exception.

* Where:
Build file '/Users/jumpbotron/Documents/programming/installations/flutter/.pub-cache/hosted/pub.dartlang.org/assets_audio_player-1.3.0/android/build.gradle' line: 24

* What went wrong:
A problem occurred evaluating root project 'assets_audio_player'.
> Failed to apply plugin [id 'com.android.library']
   > Minimum supported Gradle version is 4.10.1. Current version is 4.6. If using the gradle wrapper, try editing the distributionUrl in /Users/jumpbotron/Documents/programming/installations/flutter/.pub-cache/hosted/pub.dartlang.org/assets_audio_player-1.3.0/android/gradle/wrapper/gradle-wrapper.properties to gradle-4.10.1-all.zip

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.

* Get more help at https://help.gradle.org

BUILD FAILED in 0s


The plugin assets_audio_player could not be built due to the issue above.

Errors when trying to build iOS project

On Android it works fine, but I can't build my project in XCode due to the following errors:

assets_audio_player-1.2.3/ios/Classes/SwiftAssetsAudioPlayerPlugin.swift:114:65: 'AVAudioSessionCategoryPlayback' has been renamed to 'AVAudioSession.Category.playback'

assets_audio_player-1.2.3/ios/Classes/SwiftAssetsAudioPlayerPlugin.swift:114:65: 'AVAudioSessionCategoryPlayback' was obsoleted in Swift 3 (AVFoundation.AVAudioSessionCategoryPlayback)

assets_audio_player-1.2.3/ios/Classes/SwiftAssetsAudioPlayerPlugin.swift:114:103: 'AVAudioSessionModeDefault' has been renamed to 'AVAudioSession.Mode.default'

assets_audio_player-1.2.3/ios/Classes/SwiftAssetsAudioPlayerPlugin.swift:114:103: 'AVAudioSessionModeDefault' was obsoleted in Swift 3 (AVFoundation.AVAudioSessionModeDefault)

assets_audio_player-1.2.3/ios/Classes/SwiftAssetsAudioPlayerPlugin.swift:116:36: Ambiguous reference to member 'setCategory'

For iOS i am getting this error

assets_audio_player does not specify a Swift version and none of the targets (Runner) integrating it have the SWIFT_VERSION attribute set. Please contact the author or set the SWIFT_VERSION attribute in at least one of the targets that integrate this pod.

image

Kotlin Version Error

  • What went wrong:
    The Android Gradle plugin supports only Kotlin Gradle plugin version 1.3.10 and higher.
    The following dependencies do not satisfy the required version:
    project ':assets_audio_player' -> org.jetbrains.kotlin:kotlin-gradle-plugin:1.2.71

  • Try:
    Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.

  • Get more help at https://help.gradle.org

BU�LD FAILED in 4s
Finished with error: Gradle task assembleDebug failed with exit code 1

Could not find assets_audio_player-Swift.h

I am using version ^1.2.3, it works on Windows using android, but I am getting this error when trying to build it on a mac.

=== BUILD TARGET assets_audio_player OF PROJECT Pods WITH CONFIGURATION Debug ===
    /Users/tobbe/development/flutter/.pub-cache/hosted/pub.dartlang.org/assets_audio_player-1.2.3/ios/Classes/AssetsAudioPlayerPlugin.m:2:9: fatal error:
    'assets_audio_player/assets_audio_player-Swift.h' file not found
    #import <assets_audio_player/assets_audio_player-Swift.h>
            ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    1 error generated.

Support for Swift 4

When using Xcode 10.2, flutter run returns the error:

Xcode's output:
↳
  === BUILD TARGET assets_audio_player OF PROJECT Pods WITH CONFIGURATION Debug ===
    
 The “Swift Language Version” (SWIFT_VERSION) build setting must be set to a supported value for
 targets which use Swift. Supported values are: 4.0, 4.2, 5.0. This setting can be set in the
 build settings editor.

And when using Xcode to open the project, the error message is:

Unsupported Swift Version

The target “assets_audio_player” contains source code developed with Swift 3.x. This version of Xcode does not support building or migrating Swift 3.x targets.

Use Xcode 10.1 to migrate the code to Swift 4.

It seems migration to Swift 4 is necessary to catch up with the iOS platform.

iOS Issues related to import_js_library

I can't run this on iOS because the cocoapods installer runs into an issue:

[!] No podspec found for `import_js_library` in `.symlinks/plugins/import_js_library/ios`

Bug about finished

I find a small bug.
ValueObservable<bool> get finished => _isPlaying.stream;
Feel free to update it.

sample does not work....

sample does not work....
I just build sample in /sample.

I pushed button but log: resource not log appeared.

flutter: log: resource not found song1.mp3
flutter: log: openOptional({
    file = "song2.mp3";
    folder = "assets/audios";
})
flutter: log: resource not found song2.mp3
flutter: log: openOptional({
    file = "song3.mp3";
    folder = "assets/audios";
})
flutter: log: resource not found song3.mp3
flutter: log: playnil
flutter: log: openOptional({
    file = "song2.mp3";
    folder = "assets/audios";
})
flutter: log: resource not found song2.mp3
flutter: log: openOptional({
    file = "song2.mp3";
    folder = "assets/audios";
})

IOS build - error: type 'AVAudioSession.Category' (aka 'NSString') has no member 'playback'

    ** BUILD FAILED **
Xcode's output:
↳
    /Users/neto/.flutter-sdk/.pub-cache/hosted/pub.dartlang.org/assets_audio_player-1.3.0/ios/Classes/AssetsAudioPlayer.swift:44:93: error: type 'AVAudioSession.Category' (aka 'NSString') has no member 'playback'
                        try AVAudioSession.sharedInstance().setCategory(AVAudioSession.Category.playback, mode: AVAudioSession.Mode.default, options: [])

Compatibily with rxdart

Does not work with current version of rxdart (0.22)
Can you please update the plugin ?

Because bloc 0.13.0 depends on rxdart ^0.22.0 and no versions of bloc match >0.13.0 <0.14.0, bloc ^0.13.0 requires rxdart ^0.22.0.
And because every version of assets_audio_player depends on rxdart ^0.20.0, assets_audio_player is incompatible with bloc ^0.13.0.
And because flutter_bloc 0.13.0 depends on bloc ^0.13.0 and no versions of flutter_bloc match >0.13.0 <0.14.0, assets_audio_player is incompatible with flutter_bloc ^0.13.0.
So, because tibe depends on both flutter_bloc ^0.13.0 and assets_audio_player ^1.0.1, version solving failed.

Execution failed for task ':assets_audio_player:compileDebugKotlin ON 1.4.0

Launching lib\main.dart on HD1903 in debug mode...
Running Gradle task 'assembleDebug'...
e: C:\Tools\flutter.pub-cache\hosted\pub.dartlang.org\assets_audio_player-1.3.8+1\android\src\main\kotlin\com\github\florent37\assets_audio_player\AssetsAudioPlayerPlugin.kt: (14, 14): Conflicting declarations: internal val METHOD_POSITION: String, internal val METHOD_POSITION: String
e: C:\Tools\flutter.pub-cache\hosted\pub.dartlang.org\assets_audio_player-1.3.8+1\android\src\main\kotlin\com\github\florent37\assets_audio_player\AssetsAudioPlayerPlugin.kt: (15, 14): Conflicting declarations: internal val METHOD_VOLUME: String, internal val METHOD_VOLUME: String
e: C:\Tools\flutter.pub-cache\hosted\pub.dartlang.org\assets_audio_player-1.3.8+1\android\src\main\kotlin\com\github\florent37\assets_audio_player\AssetsAudioPlayerPlugin.kt: (16, 14): Conflicting declarations: internal val METHOD_FINISHED: String, internal val METHOD_FINISHED: String
e: C:\Tools\flutter.pub-cache\hosted\pub.dartlang.org\assets_audio_player-1.3.8+1\android\src\main\kotlin\com\github\florent37\assets_audio_player\AssetsAudioPlayerPlugin.kt: (17, 14): Conflicting declarations: internal val METHOD_IS_PLAYING: String, internal val METHOD_IS_PLAYING: String
e: C:\Tools\flutter.pub-cache\hosted\pub.dartlang.org\assets_audio_player-1.3.8+1\android\src\main\kotlin\com\github\florent37\assets_audio_player\AssetsAudioPlayerPlugin.kt: (18, 14): Conflicting declarations: internal val METHOD_CURRENT: String, internal val METHOD_CURRENT: String
e: C:\Tools\flutter.pub-cache\hosted\pub.dartlang.org\assets_audio_player-1.3.8+1\android\src\main\kotlin\com\github\florent37\assets_audio_player\AssetsAudioPlayerPlugin.kt: (19, 14): Conflicting declarations: internal val METHOD_NEXT: String, internal val METHOD_NEXT: String
e: C:\Tools\flutter.pub-cache\hosted\pub.dartlang.org\assets_audio_player-1.3.8+1\android\src\main\kotlin\com\github\florent37\assets_audio_player\AssetsAudioPlayerPlugin.kt: (20, 14): Conflicting declarations: internal val METHOD_PREV: String, internal val METHOD_PREV: String
e: C:\Tools\flutter.pub-cache\hosted\pub.dartlang.org\assets_audio_player-1.3.8+1\android\src\main\kotlin\com\github\florent37\assets_audio_player\AssetsAudioPlayerPlugin.kt: (22, 7): Redeclaration: Player
e: C:\Tools\flutter.pub-cache\hosted\pub.dartlang.org\assets_audio_player-1.3.8+1\android\src\main\kotlin\com\github\florent37\assets_audio_player\AssetsAudioPlayerPlugin.kt: (40, 42): Overload resolution ambiguity:
internal val METHOD_POSITION: String defined in com.github.florent37.assets_audio_player in file AssetsAudioPlayerPlugin.kt
internal val METHOD_POSITION: String defined in com.github.florent37.assets_audio_player in file AssetsAudioPlayerPlugin.kt
e: C:\Tools\flutter.pub-cache\hosted\pub.dartlang.org\assets_audio_player-1.3.8+1\android\src\main\kotlin\com\github\florent37\assets_audio_player\AssetsAudioPlayerPlugin.kt: (74, 34): Overload resolution ambiguity:
internal val METHOD_POSITION: String defined in com.github.florent37.assets_audio_player in file AssetsAudioPlayerPlugin.kt
internal val METHOD_POSITION: String defined in com.github.florent37.assets_audio_player in file AssetsAudioPlayerPlugin.kt
e: C:\Tools\flutter.pub-cache\hosted\pub.dartlang.org\assets_audio_player-1.3.8+1\android\src\main\kotlin\com\github\florent37\assets_audio_player\AssetsAudioPlayerPlugin.kt: (86, 38): Overload resolution ambiguity:
internal val METHOD_CURRENT: String defined in com.github.florent37.assets_audio_player in file AssetsAudioPlayerPlugin.kt
internal val METHOD_CURRENT: String defined in com.github.florent37.assets_audio_player in file AssetsAudioPlayerPlugin.kt
e: C:\Tools\flutter.pub-cache\hosted\pub.dartlang.org\assets_audio_player-1.3.8+1\android\src\main\kotlin\com\github\florent37\assets_audio_player\AssetsAudioPlayerPlugin.kt: (101, 34): Overload resolution ambiguity:
internal val METHOD_POSITION: String defined in com.github.florent37.assets_audio_player in file AssetsAudioPlayerPlugin.kt
internal val METHOD_POSITION: String defined in com.github.florent37.assets_audio_player in file AssetsAudioPlayerPlugin.kt
e: C:\Tools\flutter.pub-cache\hosted\pub.dartlang.org\assets_audio_player-1.3.8+1\android\src\main\kotlin\com\github\florent37\assets_audio_player\AssetsAudioPlayerPlugin.kt: (111, 34): Overload resolution ambiguity:
internal val METHOD_FINISHED: String defined in com.github.florent37.assets_audio_player in file AssetsAudioPlayerPlugin.kt
internal val METHOD_FINISHED: String defined in com.github.florent37.assets_audio_player in file AssetsAudioPlayerPlugin.kt
e: C:\Tools\flutter.pub-cache\hosted\pub.dartlang.org\assets_audio_player-1.3.8+1\android\src\main\kotlin\com\github\florent37\assets_audio_player\AssetsAudioPlayerPlugin.kt: (125, 34): Overload resolution ambiguity:
internal val METHOD_POSITION: String defined in com.github.florent37.assets_audio_player in file AssetsAudioPlayerPlugin.kt
internal val METHOD_POSITION: String defined in com.github.florent37.assets_audio_player in file AssetsAudioPlayerPlugin.kt
e: C:\Tools\flutter.pub-cache\hosted\pub.dartlang.org\assets_audio_player-1.3.8+1\android\src\main\kotlin\com\github\florent37\assets_audio_player\AssetsAudioPlayerPlugin.kt: (130, 34): Overload resolution ambiguity:
internal val METHOD_IS_PLAYING: String defined in com.github.florent37.assets_audio_player in file AssetsAudioPlayerPlugin.kt
internal val METHOD_IS_PLAYING: String defined in com.github.florent37.assets_audio_player in file AssetsAudioPlayerPlugin.kt
e: C:\Tools\flutter.pub-cache\hosted\pub.dartlang.org\assets_audio_player-1.3.8+1\android\src\main\kotlin\com\github\florent37\assets_audio_player\AssetsAudioPlayerPlugin.kt: (149, 34): Overload resolution ambiguity:
internal val METHOD_IS_PLAYING: String defined in com.github.florent37.assets_audio_player in file AssetsAudioPlayerPlugin.kt
internal val METHOD_IS_PLAYING: String defined in com.github.florent37.assets_audio_player in file AssetsAudioPlayerPlugin.kt
e: C:\Tools\flutter.pub-cache\hosted\pub.dartlang.org\assets_audio_player-1.3.8+1\android\src\main\kotlin\com\github\florent37\assets_audio_player\AssetsAudioPlayerPlugin.kt: (157, 34): Overload resolution ambiguity:
internal val METHOD_IS_PLAYING: String defined in com.github.florent37.assets_audio_player in file AssetsAudioPlayerPlugin.kt
internal val METHOD_IS_PLAYING: String defined in com.github.florent37.assets_audio_player in file AssetsAudioPlayerPlugin.kt
e: C:\Tools\flutter.pub-cache\hosted\pub.dartlang.org\assets_audio_player-1.3.8+1\android\src\main\kotlin\com\github\florent37\assets_audio_player\AssetsAudioPlayerPlugin.kt: (164, 34): Overload resolution ambiguity:
internal val METHOD_POSITION: String defined in com.github.florent37.assets_audio_player in file AssetsAudioPlayerPlugin.kt
internal val METHOD_POSITION: String defined in com.github.florent37.assets_audio_player in file AssetsAudioPlayerPlugin.kt
e: C:\Tools\flutter.pub-cache\hosted\pub.dartlang.org\assets_audio_player-1.3.8+1\android\src\main\kotlin\com\github\florent37\assets_audio_player\AssetsAudioPlayerPlugin.kt: (171, 34): Overload resolution ambiguity:
internal val METHOD_VOLUME: String defined in com.github.florent37.assets_audio_player in file AssetsAudioPlayerPlugin.kt
internal val METHOD_VOLUME: String defined in com.github.florent37.assets_audio_player in file AssetsAudioPlayerPlugin.kt
e: C:\Tools\flutter.pub-cache\hosted\pub.dartlang.org\assets_audio_player-1.3.8+1\android\src\main\kotlin\com\github\florent37\assets_audio_player\AssetsAudioPlayerPlugin.kt: (176, 7): Redeclaration: AssetsAudioPlayerPlugin
e: C:\Tools\flutter.pub-cache\hosted\pub.dartlang.org\assets_audio_player-1.4.0\android\src\main\kotlin\com\github\florent37\assets_audio_player\AssetsAudioPlayerPlugin.kt: (11, 14): Conflicting declarations: internal val METHOD_POSITION: String, internal val METHOD_POSITION: String
e: C:\Tools\flutter.pub-cache\hosted\pub.dartlang.org\assets_audio_player-1.4.0\android\src\main\kotlin\com\github\florent37\assets_audio_player\AssetsAudioPlayerPlugin.kt: (12, 14): Conflicting declarations: internal val METHOD_VOLUME: String, internal val METHOD_VOLUME: String
e: C:\Tools\flutter.pub-cache\hosted\pub.dartlang.org\assets_audio_player-1.4.0\android\src\main\kotlin\com\github\florent37\assets_audio_player\AssetsAudioPlayerPlugin.kt: (13, 14): Conflicting declarations: internal val METHOD_FINISHED: String, internal val METHOD_FINISHED: String
e: C:\Tools\flutter.pub-cache\hosted\pub.dartlang.org\assets_audio_player-1.4.0\android\src\main\kotlin\com\github\florent37\assets_audio_player\AssetsAudioPlayerPlugin.kt: (14, 14): Conflicting declarations: internal val METHOD_IS_PLAYING: String, internal val METHOD_IS_PLAYING: String
e: C:\Tools\flutter.pub-cache\hosted\pub.dartlang.org\assets_audio_player-1.4.0\android\src\main\kotlin\com\github\florent37\assets_audio_player\AssetsAudioPlayerPlugin.kt: (15, 14): Conflicting declarations: internal val METHOD_CURRENT: String, internal val METHOD_CURRENT: String
e: C:\Tools\flutter.pub-cache\hosted\pub.dartlang.org\assets_audio_player-1.4.0\android\src\main\kotlin\com\github\florent37\assets_audio_player\AssetsAudioPlayerPlugin.kt: (16, 14): Conflicting declarations: internal val METHOD_NEXT: String, internal val METHOD_NEXT: String
e: C:\Tools\flutter.pub-cache\hosted\pub.dartlang.org\assets_audio_player-1.4.0\android\src\main\kotlin\com\github\florent37\assets_audio_player\AssetsAudioPlayerPlugin.kt: (17, 14): Conflicting declarations: internal val METHOD_PREV: String, internal val METHOD_PREV: String
e: C:\Tools\flutter.pub-cache\hosted\pub.dartlang.org\assets_audio_player-1.4.0\android\src\main\kotlin\com\github\florent37\assets_audio_player\AssetsAudioPlayerPlugin.kt: (20, 7): Redeclaration: AssetsAudioPlayerPlugin
e: C:\Tools\flutter.pub-cache\hosted\pub.dartlang.org\assets_audio_player-1.4.0\android\src\main\kotlin\com\github\florent37\assets_audio_player\AssetsAudioPlayerPlugin.kt: (35, 40): No value passed for parameter 'channel'
e: C:\Tools\flutter.pub-cache\hosted\pub.dartlang.org\assets_audio_player-1.4.0\android\src\main\kotlin\com\github\florent37\assets_audio_player\AssetsAudioPlayerPlugin.kt: (37, 17): Unresolved reference: onVolumeChanged
e: C:\Tools\flutter.pub-cache\hosted\pub.dartlang.org\assets_audio_player-1.4.0\android\src\main\kotlin\com\github\florent37\assets_audio_player\AssetsAudioPlayerPlugin.kt: (37, 37): Cannot infer a type for this parameter. Please specify it explicitly.
e: C:\Tools\flutter.pub-cache\hosted\pub.dartlang.org\assets_audio_player-1.4.0\android\src\main\kotlin\com\github\florent37\assets_audio_player\AssetsAudioPlayerPlugin.kt: (38, 42): Overload resolution ambiguity:
internal val METHOD_VOLUME: String defined in com.github.florent37.assets_audio_player in file AssetsAudioPlayerPlugin.kt
internal val METHOD_VOLUME: String defined in com.github.florent37.assets_audio_player in file AssetsAudioPlayerPlugin.kt
e: C:\Tools\flutter.pub-cache\hosted\pub.dartlang.org\assets_audio_player-1.4.0\android\src\main\kotlin\com\github\florent37\assets_audio_player\AssetsAudioPlayerPlugin.kt: (40, 17): Unresolved reference: onPositionChanged
e: C:\Tools\flutter.pub-cache\hosted\pub.dartlang.org\assets_audio_player-1.4.0\android\src\main\kotlin\com\github\florent37\assets_audio_player\AssetsAudioPlayerPlugin.kt: (40, 39): Cannot infer a type for this parameter. Please specify it explicitly.
e: C:\Tools\flutter.pub-cache\hosted\pub.dartlang.org\assets_audio_player-1.4.0\android\src\main\kotlin\com\github\florent37\assets_audio_player\AssetsAudioPlayerPlugin.kt: (41, 42): Overload resolution ambiguity:
internal val METHOD_POSITION: String defined in com.github.florent37.assets_audio_player in file AssetsAudioPlayerPlugin.kt
internal val METHOD_POSITION: String defined in com.github.florent37.assets_audio_player in file AssetsAudioPlayerPlugin.kt
e: C:\Tools\flutter.pub-cache\hosted\pub.dartlang.org\assets_audio_player-1.4.0\android\src\main\kotlin\com\github\florent37\assets_audio_player\AssetsAudioPlayerPlugin.kt: (43, 17): Unresolved reference: onReadyToPlay
e: C:\Tools\flutter.pub-cache\hosted\pub.dartlang.org\assets_audio_player-1.4.0\android\src\main\kotlin\com\github\florent37\assets_audio_player\AssetsAudioPlayerPlugin.kt: (43, 35): Cannot infer a type for this parameter. Please specify it explicitly.
e: C:\Tools\flutter.pub-cache\hosted\pub.dartlang.org\assets_audio_player-1.4.0\android\src\main\kotlin\com\github\florent37\assets_audio_player\AssetsAudioPlayerPlugin.kt: (44, 42): Overload resolution ambiguity:
internal val METHOD_CURRENT: String defined in com.github.florent37.assets_audio_player in file AssetsAudioPlayerPlugin.kt
internal val METHOD_CURRENT: String defined in com.github.florent37.assets_audio_player in file AssetsAudioPlayerPlugin.kt
e: C:\Tools\flutter.pub-cache\hosted\pub.dartlang.org\assets_audio_player-1.4.0\android\src\main\kotlin\com\github\florent37\assets_audio_player\AssetsAudioPlayerPlugin.kt: (44, 58): Type inference failed: Not enough information to infer parameter V in fun <K, V> mapOf(pair: Pair<K, V>): Map<K, V>
Please specify it explicitly.

e: C:\Tools\flutter.pub-cache\hosted\pub.dartlang.org\assets_audio_player-1.4.0\android\src\main\kotlin\com\github\florent37\assets_audio_player\AssetsAudioPlayerPlugin.kt: (48, 17): Unresolved reference: onPlaying
e: C:\Tools\flutter.pub-cache\hosted\pub.dartlang.org\assets_audio_player-1.4.0\android\src\main\kotlin\com\github\florent37\assets_audio_player\AssetsAudioPlayerPlugin.kt: (49, 42): Overload resolution ambiguity:
internal val METHOD_IS_PLAYING: String defined in com.github.florent37.assets_audio_player in file AssetsAudioPlayerPlugin.kt
internal val METHOD_IS_PLAYING: String defined in com.github.florent37.assets_audio_player in file AssetsAudioPlayerPlugin.kt
e: C:\Tools\flutter.pub-cache\hosted\pub.dartlang.org\assets_audio_player-1.4.0\android\src\main\kotlin\com\github\florent37\assets_audio_player\AssetsAudioPlayerPlugin.kt: (49, 61): Unresolved reference: it
e: C:\Tools\flutter.pub-cache\hosted\pub.dartlang.org\assets_audio_player-1.4.0\android\src\main\kotlin\com\github\florent37\assets_audio_player\AssetsAudioPlayerPlugin.kt: (51, 17): Unresolved reference: onFinished
e: C:\Tools\flutter.pub-cache\hosted\pub.dartlang.org\assets_audio_player-1.4.0\android\src\main\kotlin\com\github\florent37\assets_audio_player\AssetsAudioPlayerPlugin.kt: (52, 42): Overload resolution ambiguity:
internal val METHOD_FINISHED: String defined in com.github.florent37.assets_audio_player in file AssetsAudioPlayerPlugin.kt
internal val METHOD_FINISHED: String defined in com.github.florent37.assets_audio_player in file AssetsAudioPlayerPlugin.kt
e: C:\Tools\flutter.pub-cache\hosted\pub.dartlang.org\assets_audio_player-1.4.0\android\src\main\kotlin\com\github\florent37\assets_audio_player\AssetsAudioPlayerPlugin.kt: (177, 29): Type mismatch: inferred type is Boolean but MethodChannel.Result was expected
e: C:\Tools\flutter.pub-cache\hosted\pub.dartlang.org\assets_audio_player-1.4.0\android\src\main\kotlin\com\github\florent37\assets_audio_player\AssetsAudioPlayerPlugin.kt: (178, 29): Type mismatch: inferred type is MethodChannel.Result but Context was expected
e: C:\Tools\flutter.pub-cache\hosted\pub.dartlang.org\assets_audio_player-1.4.0\android\src\main\kotlin\com\github\florent37\assets_audio_player\AssetsAudioPlayerPlugin.kt: (179, 29): Too many arguments for public final fun open(assetAudioPath: String?, audioType: String, autoStart: Boolean, volume: Double, seek: Int?, result: MethodChannel.Result, context: Context): Unit defined in com.github.florent37.assets_audio_player.Player
e: C:\Tools\flutter.pub-cache\hosted\pub.dartlang.org\assets_audio_player-1.4.0\android\src\main\kotlin\com\github\florent37\assets_audio_player\Player.kt: (10, 7): Redeclaration: Player

FAILURE: Build failed with an exception.

  • What went wrong:
    Execution failed for task ':assets_audio_player:compileDebugKotlin'.

Compilation error. See log for more details

  • Try:
    Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.

  • Get more help at https://help.gradle.org

BUILD FAILED in 18s
Finished with error: Gradle task assembleDebug failed with exit code 1

New Feature

is an option to fast forward and rewind audio?

The App stop work while another app has sound

Hello, we have a problem for the last update. It is working for phone calling but when i open another app like youtube or default music player that start to play any sound my App stop working. (it crushes and doesn't go on until i close and reopen again. ) Can you check it please?

Respect Silence

Is there anyway to respect silence of the mute switch?

I like this library better than other audioplayers but its missing that key feature

Lock screen controls

Will the player support lock screen controls? For example, as the music plays on the background and the phone goes to sleep from the lock screen the user needs to be able to pause the audio or skip or stop.

Thanks

1、Resource acquisition problem,2、Pod problem

project is oc
1、
guard let urlo = Bundle.main.url(forResource: asset, withExtension: "", subdirectory: "flutter_assets/"+folder) else {
log("resource not found "+asset)
result("")
return
}

The file path may not be available

2、pod
[!] Unable to determine Swift version for the following pods:

  • assets_audio_player does not specify a Swift version and none of the targets (Runner) integrating it have the SWIFT_VERSION attribute set. Please contact the author or set the SWIFT_VERSION attribute in at least one of the targets that integrate this pod.

Can not build on iOS devices


           2020-02-29 18:06:02.704 xcodebuild[14409:311592]  DTDeviceKit: deviceType from 1394652bb7fc960ff7fbc21ce6f000aa2289e4f1 was NULL
[   +4 ms] Failed to build iOS app
[        ] Error output from Xcode build:
           ↳
[        ]     2020-02-29 18:05:58.332 xcodebuild[14387:311248]  DTDeviceKit: deviceType from a5a68d8f8f628f8e7c8ac56b2889580522c21d31 was NULL
               2020-02-29 18:05:58.424 xcodebuild[14387:311244]  DTDeviceKit: deviceType from a5a68d8f8f628f8e7c8ac56b2889580522c21d31 was NULL
               2020-02-29 18:05:58.775 xcodebuild[14387:311320]  DTDeviceKit: deviceType from 1394652bb7fc960ff7fbc21ce6f000aa2289e4f1 was NULL
               ** BUILD FAILED **


[        ] Xcode's output:
           ↳
[        ]     /Users/truonghuy/flutter/.pub-cache/hosted/pub.dartlang.org/assets_audio_player-1.2.3/ios/Classes/SwiftAssetsAudioPlayerPlugin.swift:114:65: error: 'AVAudioSessionCategoryPlayback' has been renamed to 'AVAudioSession.Category.playback'
                               try AVAudioSession.sharedInstance().setCategory(AVAudioSessionCategoryPlayback, mode: AVAudioSessionModeDefault, options: [])
                                                                               ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
                                                                               AVAudioSession.Category.playback
               AVFoundation.AVAudioSessionCategoryPlayback:3:12: note: 'AVAudioSessionCategoryPlayback' was obsoleted in Swift 3
               public let AVAudioSessionCategoryPlayback: AVAudioSession.Category
                          ^
               /Users/truonghuy/flutter/.pub-cache/hosted/pub.dartlang.org/assets_audio_player-1.2.3/ios/Classes/SwiftAssetsAudioPlayerPlugin.swift:114:103: error: 'AVAudioSessionModeDefault' has been renamed to 'AVAudioSession.Mode.default'
                               try AVAudioSession.sharedInstance().setCategory(AVAudioSessionCategoryPlayback, mode: AVAudioSessionModeDefault, options: [])
                                                                                                                     ^~~~~~~~~~~~~~~~~~~~~~~~~
                                                                                                                     AVAudioSession.Mode.default
               AVFoundation.AVAudioSessionModeDefault:3:12: note: 'AVAudioSessionModeDefault' was obsoleted in Swift 3
               public let AVAudioSessionModeDefault: AVAudioSession.Mode
                          ^
               /Users/truonghuy/flutter/.pub-cache/hosted/pub.dartlang.org/assets_audio_player-1.2.3/ios/Classes/SwiftAssetsAudioPlayerPlugin.swift:116:36: error: ambiguous reference to member 'setCategory'
                               try AVAudioSession.sharedInstance().setCategory(AVAudioSessionCategoryPlayback, with: .mixWithOthers)
                                   ~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~
               AVFoundation.AVAudioSession:22:15: note: found this candidate
                   open func setCategory(_ category: AVAudioSession.Category) throws
                             ^
               AVFoundation.AVAudioSession:24:15: note: found this candidate
                   open func setCategory(_ category: AVAudioSession.Category, options: AVAudioSession.CategoryOptions = []) throws
                             ^
               AVFoundation.AVAudioSession:27:15: note: found this candidate
                   open func setCategory(_ category: AVAudioSession.Category, withOptions options: AVAudioSession.CategoryOptions = []) throws
                             ^
               AVFoundation.AVAudioSession:29:15: note: found this candidate
                   open func setCategory(_ category: AVAudioSession.Category, mode: AVAudioSession.Mode, options: AVAudioSession.CategoryOptions = []) throws
                             ^
               AVFoundation.AVAudioSession:31:15: note: found this candidate
                   open func setCategory(_ category: AVAudioSession.Category, mode: AVAudioSession.Mode, policy: AVAudioSession.RouteSharingPolicy, options: AVAudioSession.CategoryOptions = []) throws
                             ^
               AVFoundation.AVAudioSession:34:15: note: found this candidate
                   open func setCategory(_ category: AVAudioSession.Category, mode: AVAudioSession.Mode, routeSharingPolicy policy: AVAudioSession.RouteSharingPolicy, options: AVAudioSession.CategoryOptions = []) throws
                             ^
               note: Using new build system
               note: Planning build
               note: Constructing build description

[   +3 ms] Could not build the precompiled application for the device.

Loop Bug

When setting the loop to true.
If I change the volume, it resets on restarting the song

IOS build - invalid redeclaration of 'SwiftAssetsAudioPlayerPlugin'

    ** BUILD FAILED **
Xcode's output:
↳
    /Users/neto/.flutter-sdk/.pub-cache/hosted/pub.dartlang.org/assets_audio_player-1.3.0/ios/Classes/AssetsAudioPlayer.swift:5:14: error: invalid redeclaration of 'SwiftAssetsAudioPlayerPlugin'
    public class SwiftAssetsAudioPlayerPlugin: NSObject, FlutterPlugin {

Error on IOS Device

Hello, I am trying to run this plugin on IOS device but not work.

you can see console log.
I think this plugin and sqflite plugin give error. Because i removed AssetsAudioPlayer then I tried, that is work.
sorry my bad english.

IOS version : 12.1
XCODE version : 10

***Console Log
`Launching lib/GameStartPage.dart on iPhone 8 in debug mode...
Running pod install...
Starting Xcode build...
Xcode build done. 5.6s
Failed to build iOS app
Error output from Xcode build:

** BUILD FAILED **

Xcode's output:

=== BUILD TARGET sqflite OF PROJECT Pods WITH CONFIGURATION Debug ===
/Users/onur/Documents/src/flutter/.pub-cache/hosted/pub.dartlang.org/assets_audio_player-1.0.1/ios/Classes/SwiftAssetsAudioPlayerPlugin.swift:110:49: error: 'setCategory(:with:)' is unavailable in Swift
try AVAudioSession.sharedInstance().setCategory(AVAudioSessionCategoryPlayback, with: .mixWithOthers)
^~~~~~~~~~~
AVFoundation.AVAudioSession:26:15: note: 'setCategory(
:with:)' has been explicitly marked unavailable here
open func setCategory(_ category: AVAudioSession.Category, with options: AVAudioSession.CategoryOptions = []) throws
^
/Users/onur/Documents/src/flutter/.pub-cache/hosted/pub.dartlang.org/assets_audio_player-1.0.1/ios/Classes/SwiftAssetsAudioPlayerPlugin.swift:110:61: error: 'AVAudioSessionCategoryPlayback' has been renamed to 'AVAudioSession.Category.playback'
try AVAudioSession.sharedInstance().setCategory(AVAudioSessionCategoryPlayback, with: .mixWithOthers)
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
AVAudioSession.Category.playback
AVFoundation.AVAudioSessionCategoryPlayback:3:12: note: 'AVAudioSessionCategoryPlayback' was obsoleted in Swift 3
public let AVAudioSessionCategoryPlayback: AVAudioSession.Category
^

Could not build the application for the simulator.
Error launching application on iPhone 8.
`

ambiguous reference to member 'setCategory'

`Failed to build iOS app
Error output from Xcode build:

** BUILD FAILED **

Xcode's output:

/Users/fltdev/.pub-cache/hosted/pub.dartlang.org/assets_audio_player-1.0.1/ios/Classes/SwiftAssetsAudioPlayerPlugin.swift:110:32: error: ambiguous reference to member 'setCategory'
try AVAudioSession.sharedInstance().setCategory(AVAudioSessionCategoryPlayback, with: .mixWithOthers)
~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~
AVFoundation.AVAudioSession:22:15: note: found this candidate
open func setCategory(_ category: AVAudioSession.Category) throws
^
AVFoundation.AVAudioSession:24:15: note: found this candidate
open func setCategory(_ category: AVAudioSession.Category, options: AVAudioSession.CategoryOptions = []) throws
^
AVFoundation.AVAudioSession:27:15: note: found this candidate
open func setCategory(_ category: AVAudioSession.Category, withOptions options: AVAudioSession.CategoryOptions = []) throws
^
AVFoundation.AVAudioSession:29:15: note: found this candidate
open func setCategory(_ category: AVAudioSession.Category, mode: AVAudioSession.Mode, options: AVAudioSession.CategoryOptions = []) throws
^
AVFoundation.AVAudioSession:31:15: note: found this candidate
open func setCategory(_ category: AVAudioSession.Category, mode: AVAudioSession.Mode, policy: AVAudioSession.RouteSharingPolicy, options: AVAudioSession.CategoryOptions = []) throws
^
AVFoundation.AVAudioSession:34:15: note: found this candidate
open func setCategory(_ category: AVAudioSession.Category, mode: AVAudioSession.Mode, routeSharingPolicy policy: AVAudioSession.RouteSharingPolicy, options: AVAudioSession.CategoryOptions = []) throws
^
note: Using new build system
note: Planning build
note: Constructing build description`

Rare behaviour with time

This is a minor issue, but when the audio file is opened for the first time, you can see that time goes from 0 to 1 seconds, then goes back to 0 and then the audio file starts normally. This only happens sometimes.

Can't find assets in iOS

When running on Android no problem. Running on iOS. I keep getting assets not found. Checked out example project. Same problem. Changed to other Flutter build. Same problem. Recopied audio files and still having same problem.
I also tried Xcode 10.3, 11.0, 11.1, 11.2

[✓] Flutter (Channel stable, v1.9.1+hotfix.6, on Mac OS X 10.15 19A583, locale en-NL)

[✓] Android toolchain - develop for Android devices (Android SDK version 29.0.2)
[✓] Xcode - develop for iOS and macOS (Xcode 11.1)
[✓] Android Studio (version 3.5)
[✓] VS Code (version 1.39.2)
[✓] Connected device (1 available)

Other assets in folder can be found. Like jpg and png files.

onAudioFocusChange problem

I am using, your plugin, but i am also using Speech Recognition. When i held down for activating speech recognition, sounds automaticly paused. But i dont want this i just want to set volume low instead of pause. Music in the background should continue, I just need to slowly lower the volume.

Is there any way handle this?

Xcode build failed

I saw that there are already issues about this but i tried 'flutter clean' and i still get:
/Users/erolasan/flutter/.pub-cache/hosted/pub.dartlang.org/assets_audio_player-1.3.0/ios/Classes/Asset sAudioPlayer.swift:5:14: error: invalid redeclaration of 'SwiftAssetsAudioPlayerPlugin' public class SwiftAssetsAudioPlayerPlugin: NSObject, FlutterPlugin { /Users/erolasan/flutter/.pub-cache/hosted/pub.dartlang.org/assets_audio_player-1.3.0/ios/Classes/Swift AssetsAudioPlayerPlugin.swift:4:14: note: 'SwiftAssetsAudioPlayerPlugin' previously declared here public class SwiftAssetsAudioPlayerPlugin: NSObject, FlutterPlugin {

I tried deleting Pods folder -> pod install -> flutter clean - xcode build and i still get the same error

build errors

when I try to build the app that is what I get :

Running "flutter packages get" in adliss...                         1,5s
Launching lib\main.dart on PGN528 in debug mode...
Initializing gradle...
Resolving dependencies...
Finished with error: Please review your Gradle project setup in the android/ folder.
* Error running Gradle:
ProcessException: Process "D:\codeLabs\adliss\android\gradlew.bat" exited abnormally:

> Configure project :app
WARNING: API 'variant.getMergeAssets()' is obsolete and has been replaced with 'variant.getMergeAssetsProvider()'.
It will be removed at the end of 2019.
For more information, see https://d.android.com/r/tools/task-configuration-avoidance.
To determine what is calling variant.getMergeAssets(), use -Pandroid.debug.obsoleteApi=true on the command line to display a stack trace.
WARNING: API 'variantOutput.getProcessResources()' is obsolete and has been replaced with 'variantOutput.getProcessResourcesProvider()'.
It will be removed at the end of 2019.
For more information, see https://d.android.com/r/tools/task-configuration-avoidance.
To determine what is calling variantOutput.getProcessResources(), use -Pandroid.debug.obsoleteApi=true on the command line to display a stack trace.


FAILURE: Build failed with an exception.

* What went wrong:
The Android Gradle plugin supports only Kotlin Gradle plugin version 1.3.0 and higher.
The following dependencies do not satisfy the required version:
project ':assets_audio_player' -> org.jetbrains.kotlin:kotlin-gradle-plugin:1.2.71

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.

* Get more help at https://help.gradle.org

BUILD FAILED in 8s
  Command: D:\codeLabs\adliss\android\gradlew.bat app:properties

Duck Others option?

In iOS you can lower the volume from a playing music, eg. Spotify, while the App is playing the audio file.
Is this feature included for this package or is it planned to be included at some point?

Thanks

Shuffle

How can i shuffle more than audio and make it play automatic when one finished another one starts? and thank you..

Loop Feature or play again

hi..., is there any chance to make sound loop ?

Also i have no idea audioPlayer.finished.listen never called even the music is already end. here is the log of the end of music.

V/MediaPlayer-JNI(18285): getCurrentPosition: 138001 (msec)
V/MediaPlayer-JNI(18285): getCurrentPosition: 138304 (msec)
V/MediaPlayer-JNI(18285): getCurrentPosition: 138607 (msec)
V/MediaPlayerNative(18285): message received msg=2, ext1=0, ext2=0
V/MediaPlayerNative(18285): playback complete
V/MediaPlayerNative(18285): callback application
V/MediaPlayerNative(18285): back from callback
V/MediaPlayerNative(18285): message received msg=211, ext1=0, ext2=0
V/MediaPlayerNative(18285): unrecognized message: (211, 0, 0)
V/MediaPlayerNative(18285): callback application
V/MediaPlayerNative(18285): back from callback
V/MediaPlayer-JNI(18285): getCurrentPosition: 138767 (msec)
I/chatty  (18285): uid=10277(com.teamcoret.findpairs.findpairs) identical 1 line
V/MediaPlayer-JNI(18285): getCurrentPosition: 138767 (msec)
V/MediaPlayer-JNI(18285): getCurrentPosition: 138767 (msec)
I/chatty  (18285): uid=10277(com.teamcoret.findpairs.findpairs) identical 1 line
V/MediaPlayer-JNI(18285): getCurrentPosition: 138767 (msec)
V/MediaPlayer-JNI(18285): getCurrentPosition: 138767 (msec)

and the log currentPosition always loop.

rxdart problem

`Because XXXX depends on assets_audio_player 1.0.1 which depends on rxdart ^0.20.0, rxdart ^0.20.0 is required.

So, because XXXX depends on rxdart 0.22.0, version solving failed.`

I must downgrade rxdart from 0.22.0 to 0.20.0

Play (short) audios simultaneously

TL;DR I want to play different short audios without blocking each other if any of them is played before the last one finishes. Down below i explained what i did in more detail.


I have different play buttons on the same screen and each have different AssetAudioPlayer instance. Each button has different instance because i load the audios(_assetAudioPlayer.open(_assetAudio)) on my 'Loading' page to prevent delays while playing. Unfortunately, all the buttons play the same audio which loaded last. Also i can't play again before the last audio finishes.

I realized that _assetAudioPlayer.open(_assetAudio) happens very quickly so i can repeat it at every play event. But this time it stops other play events if there is any.

Is it possible to achieve playing non-blocking audios without trading off performance?

Execution failed for task ':assets_audio_player:compileDebugKotlin'

Hello, after i update to version ^1.4.3+3 , i cant 'Run' my code. I paste error messages below:

Launching lib\main.dart on Xiaomi Redmi Note 7 in debug mode...
Running Gradle task 'assembleDebug'...
e: C:\src\flutter.pub-cache\hosted\pub.dartlang.org\assets_audio_player-1.4.3+2\android\src\main\kotlin\com\github\florent37\assets_audio_player\AssetsAudioPlayerPlugin.kt: (15, 14): Conflicting declarations: internal val METHOD_POSITION: String, internal val METHOD_POSITION: String
e: C:\src\flutter.pub-cache\hosted\pub.dartlang.org\assets_audio_player-1.4.3+2\android\src\main\kotlin\com\github\florent37\assets_audio_player\AssetsAudioPlayerPlugin.kt: (16, 14): Conflicting declarations: internal val METHOD_VOLUME: String, internal val METHOD_VOLUME: String
e: C:\src\flutter.pub-cache\hosted\pub.dartlang.org\assets_audio_player-1.4.3+2\android\src\main\kotlin\com\github\florent37\assets_audio_player\AssetsAudioPlayerPlugin.kt: (17, 14): Conflicting declarations: internal val METHOD_FORWARD_REWIND_SPEED: String, internal val METHOD_FORWARD_REWIND_SPEED: String
e: C:\src\flutter.pub-cache\hosted\pub.dartlang.org\assets_audio_player-1.4.3+2\android\src\main\kotlin\com\github\florent37\assets_audio_player\AssetsAudioPlayerPlugin.kt: (18, 14): Conflicting declarations: internal val METHOD_PLAY_SPEED: String, internal val METHOD_PLAY_SPEED: String
e: C:\src\flutter.pub-cache\hosted\pub.dartlang.org\assets_audio_player-1.4.3+2\android\src\main\kotlin\com\github\florent37\assets_audio_player\AssetsAudioPlayerPlugin.kt: (19, 14): Conflicting declarations: internal val METHOD_FINISHED: String, internal val METHOD_FINISHED: String
e: C:\src\flutter.pub-cache\hosted\pub.dartlang.org\assets_audio_player-1.4.3+2\android\src\main\kotlin\com\github\florent37\assets_audio_player\AssetsAudioPlayerPlugin.kt: (20, 14): Conflicting declarations: internal val METHOD_IS_PLAYING: String, internal val METHOD_IS_PLAYING: String
e: C:\src\flutter.pub-cache\hosted\pub.dartlang.org\assets_audio_player-1.4.3+2\android\src\main\kotlin\com\github\florent37\assets_audio_player\AssetsAudioPlayerPlugin.kt: (21, 14): Conflicting declarations: internal val METHOD_CURRENT: String, internal val METHOD_CURRENT: String
e: C:\src\flutter.pub-cache\hosted\pub.dartlang.org\assets_audio_player-1.4.3+2\android\src\main\kotlin\com\github\florent37\assets_audio_player\AssetsAudioPlayerPlugin.kt: (22, 14): Conflicting declarations: internal val METHOD_NEXT: String, internal val METHOD_NEXT: String
e: C:\src\flutter.pub-cache\hosted\pub.dartlang.org\assets_audio_player-1.4.3+2\android\src\main\kotlin\com\github\florent37\assets_audio_player\AssetsAudioPlayerPlugin.kt: (23, 14): Conflicting declarations: internal val METHOD_PREV: String, internal val METHOD_PREV: String
e: C:\src\flutter.pub-cache\hosted\pub.dartlang.org\assets_audio_player-1.4.3+2\android\src\main\kotlin\com\github\florent37\assets_audio_player\AssetsAudioPlayerPlugin.kt: (25, 7): Redeclaration: AssetsAudioPlayerPlugin
e: C:\src\flutter.pub-cache\hosted\pub.dartlang.org\assets_audio_player-1.4.3+2\android\src\main\kotlin\com\github\florent37\assets_audio_player\AssetsAudioPlayerPlugin.kt: (42, 7): Redeclaration: AssetsAudioPlayer
e: C:\src\flutter.pub-cache\hosted\pub.dartlang.org\assets_audio_player-1.4.3+2\android\src\main\kotlin\com\github\florent37\assets_audio_player\AssetsAudioPlayerPlugin.kt: (80, 42): Overload resolution ambiguity:
internal val METHOD_VOLUME: String defined in com.github.florent37.assets_audio_player in file AssetsAudioPlayerPlugin.kt
internal val METHOD_VOLUME: String defined in com.github.florent37.assets_audio_player in file AssetsAudioPlayerPlugin.kt
e: C:\src\flutter.pub-cache\hosted\pub.dartlang.org\assets_audio_player-1.4.3+2\android\src\main\kotlin\com\github\florent37\assets_audio_player\AssetsAudioPlayerPlugin.kt: (83, 42): Overload resolution ambiguity:
internal val METHOD_FORWARD_REWIND_SPEED: String defined in com.github.florent37.assets_audio_player in file AssetsAudioPlayerPlugin.kt
internal val METHOD_FORWARD_REWIND_SPEED: String defined in com.github.florent37.assets_audio_player in file AssetsAudioPlayerPlugin.kt
e: C:\src\flutter.pub-cache\hosted\pub.dartlang.org\assets_audio_player-1.4.3+2\android\src\main\kotlin\com\github\florent37\assets_audio_player\AssetsAudioPlayerPlugin.kt: (86, 42): Overload resolution ambiguity:
internal val METHOD_PLAY_SPEED: String defined in com.github.florent37.assets_audio_player in file AssetsAudioPlayerPlugin.kt
internal val METHOD_PLAY_SPEED: String defined in com.github.florent37.assets_audio_player in file AssetsAudioPlayerPlugin.kt
e: C:\src\flutter.pub-cache\hosted\pub.dartlang.org\assets_audio_player-1.4.3+2\android\src\main\kotlin\com\github\florent37\assets_audio_player\AssetsAudioPlayerPlugin.kt: (89, 42): Overload resolution ambiguity:
internal val METHOD_POSITION: String defined in com.github.florent37.assets_audio_player in file AssetsAudioPlayerPlugin.kt
internal val METHOD_POSITION: String defined in com.github.florent37.assets_audio_player in file AssetsAudioPlayerPlugin.kt
e: C:\src\flutter.pub-cache\hosted\pub.dartlang.org\assets_audio_player-1.4.3+2\android\src\main\kotlin\com\github\florent37\assets_audio_player\AssetsAudioPlayerPlugin.kt: (92, 42): Overload resolution ambiguity:
internal val METHOD_CURRENT: String defined in com.github.florent37.assets_audio_player in file AssetsAudioPlayerPlugin.kt
internal val METHOD_CURRENT: String defined in com.github.florent37.assets_audio_player in file AssetsAudioPlayerPlugin.kt
e: C:\src\flutter.pub-cache\hosted\pub.dartlang.org\assets_audio_player-1.4.3+2\android\src\main\kotlin\com\github\florent37\assets_audio_player\AssetsAudioPlayerPlugin.kt: (97, 42): Overload resolution ambiguity:
internal val METHOD_IS_PLAYING: String defined in com.github.florent37.assets_audio_player in file AssetsAudioPlayerPlugin.kt
internal val METHOD_IS_PLAYING: String defined in com.github.florent37.assets_audio_player in file AssetsAudioPlayerPlugin.kt
e: C:\src\flutter.pub-cache\hosted\pub.dartlang.org\assets_audio_player-1.4.3+2\android\src\main\kotlin\com\github\florent37\assets_audio_player\AssetsAudioPlayerPlugin.kt: (100, 42): Overload resolution ambiguity:
internal val METHOD_FINISHED: String defined in com.github.florent37.assets_audio_player in file AssetsAudioPlayerPlugin.kt
internal val METHOD_FINISHED: String defined in com.github.florent37.assets_audio_player in file AssetsAudioPlayerPlugin.kt
e: C:\src\flutter.pub-cache\hosted\pub.dartlang.org\assets_audio_player-1.4.3+2\android\src\main\kotlin\com\github\florent37\assets_audio_player\Player.kt: (25, 7): Redeclaration: Player
e: C:\src\flutter.pub-cache\hosted\pub.dartlang.org\assets_audio_player-1.4.3+2\android\src\main\kotlin\com\github\florent37\assets_audio_player\Player.kt: (310, 7): Redeclaration: ForwardHandler
e: C:\src\flutter.pub-cache\hosted\pub.dartlang.org\assets_audio_player-1.4.3+3\android\src\main\kotlin\com\github\florent37\assets_audio_player\AssetsAudioPlayerPlugin.kt: (15, 14): Conflicting declarations: internal val METHOD_POSITION: String, internal val METHOD_POSITION: String
e: C:\src\flutter.pub-cache\hosted\pub.dartlang.org\assets_audio_player-1.4.3+3\android\src\main\kotlin\com\github\florent37\assets_audio_player\AssetsAudioPlayerPlugin.kt: (16, 14): Conflicting declarations: internal val METHOD_VOLUME: String, internal val METHOD_VOLUME: String
e: C:\src\flutter.pub-cache\hosted\pub.dartlang.org\assets_audio_player-1.4.3+3\android\src\main\kotlin\com\github\florent37\assets_audio_player\AssetsAudioPlayerPlugin.kt: (17, 14): Conflicting declarations: internal val METHOD_FORWARD_REWIND_SPEED: String, internal val METHOD_FORWARD_REWIND_SPEED: String
e: C:\src\flutter.pub-cache\hosted\pub.dartlang.org\assets_audio_player-1.4.3+3\android\src\main\kotlin\com\github\florent37\assets_audio_player\AssetsAudioPlayerPlugin.kt: (18, 14): Conflicting declarations: internal val METHOD_PLAY_SPEED: String, internal val METHOD_PLAY_SPEED: String
e: C:\src\flutter.pub-cache\hosted\pub.dartlang.org\assets_audio_player-1.4.3+3\android\src\main\kotlin\com\github\florent37\assets_audio_player\AssetsAudioPlayerPlugin.kt: (19, 14): Conflicting declarations: internal val METHOD_FINISHED: String, internal val METHOD_FINISHED: String
e: C:\src\flutter.pub-cache\hosted\pub.dartlang.org\assets_audio_player-1.4.3+3\android\src\main\kotlin\com\github\florent37\assets_audio_player\AssetsAudioPlayerPlugin.kt: (20, 14): Conflicting declarations: internal val METHOD_IS_PLAYING: String, internal val METHOD_IS_PLAYING: String
e: C:\src\flutter.pub-cache\hosted\pub.dartlang.org\assets_audio_player-1.4.3+3\android\src\main\kotlin\com\github\florent37\assets_audio_player\AssetsAudioPlayerPlugin.kt: (21, 14): Conflicting declarations: internal val METHOD_CURRENT: String, internal val METHOD_CURRENT: String
e: C:\src\flutter.pub-cache\hosted\pub.dartlang.org\assets_audio_player-1.4.3+3\android\src\main\kotlin\com\github\florent37\assets_audio_player\AssetsAudioPlayerPlugin.kt: (22, 14): Conflicting declarations: internal val METHOD_NEXT: String, internal val METHOD_NEXT: String
e: C:\src\flutter.pub-cache\hosted\pub.dartlang.org\assets_audio_player-1.4.3+3\android\src\main\kotlin\com\github\florent37\assets_audio_player\AssetsAudioPlayerPlugin.kt: (23, 14): Conflicting declarations: internal val METHOD_PREV: String, internal val METHOD_PREV: String
e: C:\src\flutter.pub-cache\hosted\pub.dartlang.org\assets_audio_player-1.4.3+3\android\src\main\kotlin\com\github\florent37\assets_audio_player\AssetsAudioPlayerPlugin.kt: (25, 7): Redeclaration: AssetsAudioPlayerPlugin
e: C:\src\flutter.pub-cache\hosted\pub.dartlang.org\assets_audio_player-1.4.3+3\android\src\main\kotlin\com\github\florent37\assets_audio_player\AssetsAudioPlayerPlugin.kt: (42, 7): Redeclaration: AssetsAudioPlayer
e: C:\src\flutter.pub-cache\hosted\pub.dartlang.org\assets_audio_player-1.4.3+3\android\src\main\kotlin\com\github\florent37\assets_audio_player\AssetsAudioPlayerPlugin.kt: (80, 42): Overload resolution ambiguity:
internal val METHOD_VOLUME: String defined in com.github.florent37.assets_audio_player in file AssetsAudioPlayerPlugin.kt
internal val METHOD_VOLUME: String defined in com.github.florent37.assets_audio_player in file AssetsAudioPlayerPlugin.kt
e: C:\src\flutter.pub-cache\hosted\pub.dartlang.org\assets_audio_player-1.4.3+3\android\src\main\kotlin\com\github\florent37\assets_audio_player\AssetsAudioPlayerPlugin.kt: (83, 42): Overload resolution ambiguity:
internal val METHOD_FORWARD_REWIND_SPEED: String defined in com.github.florent37.assets_audio_player in file AssetsAudioPlayerPlugin.kt
internal val METHOD_FORWARD_REWIND_SPEED: String defined in com.github.florent37.assets_audio_player in file AssetsAudioPlayerPlugin.kt
e: C:\src\flutter.pub-cache\hosted\pub.dartlang.org\assets_audio_player-1.4.3+3\android\src\main\kotlin\com\github\florent37\assets_audio_player\AssetsAudioPlayerPlugin.kt: (86, 42): Overload resolution ambiguity:
internal val METHOD_PLAY_SPEED: String defined in com.github.florent37.assets_audio_player in file AssetsAudioPlayerPlugin.kt
internal val METHOD_PLAY_SPEED: String defined in com.github.florent37.assets_audio_player in file AssetsAudioPlayerPlugin.kt
e: C:\src\flutter.pub-cache\hosted\pub.dartlang.org\assets_audio_player-1.4.3+3\android\src\main\kotlin\com\github\florent37\assets_audio_player\AssetsAudioPlayerPlugin.kt: (89, 42): Overload resolution ambiguity:
internal val METHOD_POSITION: String defined in com.github.florent37.assets_audio_player in file AssetsAudioPlayerPlugin.kt
internal val METHOD_POSITION: String defined in com.github.florent37.assets_audio_player in file AssetsAudioPlayerPlugin.kt
e: C:\src\flutter.pub-cache\hosted\pub.dartlang.org\assets_audio_player-1.4.3+3\android\src\main\kotlin\com\github\florent37\assets_audio_player\AssetsAudioPlayerPlugin.kt: (92, 42): Overload resolution ambiguity:
internal val METHOD_CURRENT: String defined in com.github.florent37.assets_audio_player in file AssetsAudioPlayerPlugin.kt
internal val METHOD_CURRENT: String defined in com.github.florent37.assets_audio_player in file AssetsAudioPlayerPlugin.kt
e: C:\src\flutter.pub-cache\hosted\pub.dartlang.org\assets_audio_player-1.4.3+3\android\src\main\kotlin\com\github\florent37\assets_audio_player\AssetsAudioPlayerPlugin.kt: (97, 42): Overload resolution ambiguity:
internal val METHOD_IS_PLAYING: String defined in com.github.florent37.assets_audio_player in file AssetsAudioPlayerPlugin.kt
internal val METHOD_IS_PLAYING: String defined in com.github.florent37.assets_audio_player in file AssetsAudioPlayerPlugin.kt
e: C:\src\flutter.pub-cache\hosted\pub.dartlang.org\assets_audio_player-1.4.3+3\android\src\main\kotlin\com\github\florent37\assets_audio_player\AssetsAudioPlayerPlugin.kt: (100, 42): Overload resolution ambiguity:
internal val METHOD_FINISHED: String defined in com.github.florent37.assets_audio_player in file AssetsAudioPlayerPlugin.kt
internal val METHOD_FINISHED: String defined in com.github.florent37.assets_audio_player in file AssetsAudioPlayerPlugin.kt
e: C:\src\flutter.pub-cache\hosted\pub.dartlang.org\assets_audio_player-1.4.3+3\android\src\main\kotlin\com\github\florent37\assets_audio_player\AssetsAudioPlayerPlugin.kt: (264, 29): Type mismatch: inferred type is Double but MethodChannel.Result was expected
e: C:\src\flutter.pub-cache\hosted\pub.dartlang.org\assets_audio_player-1.4.3+3\android\src\main\kotlin\com\github\florent37\assets_audio_player\AssetsAudioPlayerPlugin.kt: (265, 29): Type mismatch: inferred type is MethodChannel.Result but Context was expected
e: C:\src\flutter.pub-cache\hosted\pub.dartlang.org\assets_audio_player-1.4.3+3\android\src\main\kotlin\com\github\florent37\assets_audio_player\AssetsAudioPlayerPlugin.kt: (266, 29): Too many arguments for public f�nal fun open(assetAudioPath: String?, audioType: String, autoStart: Boolean, volume: Double, seek: Int?, respectSilentMode: Boolean, result: MethodChannel.Result, context: Context): Unit defined in com.github.florent37.assets_audio_player.Player
e: C:\src\flutter.pub-cache\hosted\pub.dartlang.org\assets_audio_player-1.4.3+3\android\src\main\kotlin\com\github\florent37\assets_audio_player\Player.kt: (25, 7): Redeclaration: Player
e: C:\src\flutter.pub-cache\hosted\pub.dartlang.org\assets_audio_player-1.4.3+3\android\src\main\kotlin\com\github\florent37\assets_audio_player\Player.kt: (312, 7): Redeclaration: ForwardHandler

FAILURE: Build failed with an exception.

  • What went wrong:
    Execution failed for task ':assets_audio_player:compileDebugKotlin'.

Compilation error. See log for more details

  • Try:
    Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.

  • Get more help at https://help.gradle.org

BU�LD FAILED in 39s
Exception: Gradle task assembleDebug failed with exit code 1

iOS App crashes - Segmentation fault: 11

Problem

I use AssetsAudioPlayer to play some very short sound effects in my app.
The app crashes usually after the sound is played 10~20 times.
If I comment out the line with AssetsAudioPlayer.open() the app won't crash any more.

AssetsAudioPlayer Version
1.3.9+2

Flutter/Dart Version

Flutter 1.17.0-3.2.pre • channel beta • https://github.com/flutter/flutter.git
Framework • revision 2a7bc389f2 (5 days ago) • 2020-04-21 20:34:20 -0700
Engine • revision 4c8c31f591
Tools • Dart 2.8.0 (build 2.8.0-dev.20.10)

Code

class _GameState extends State<GameWidget> {
  final _mainAudioPlayer = AssetsAudioPlayer.withId("main");
  
  bool onDisabledObjectTapped() {
    _mainAudioPlayer.open(Audio("sounds/noselect.wav"));
  }

Crash log

Crashed Thread:        0  Dispatch queue: com.apple.main-thread

Exception Type:        EXC_BAD_ACCESS (SIGSEGV)
Exception Codes:       EXC_I386_GPFLT
Exception Note:        EXC_CORPSE_NOTIFY

Termination Signal:    Segmentation fault: 11
Termination Reason:    Namespace SIGNAL, Code 0xb
Terminating Process:   exc handler [80793]

Application Specific Information:
CoreSimulator 704.12.1 - Device: iPad Air (3rd generation) (D5D16276-A3AB-4712-BD62-428FDD5D06AB) - Runtime: iOS 13.4 (17E8260) - DeviceType: iPad Air (3rd generation)

Thread 0 Crashed:: Dispatch queue: com.apple.main-thread
0   libobjc.A.dylib               	0x00007fff50ad65f1 object_isClass + 8
1   com.apple.Foundation          	0x00007fff258e1295 KVO_IS_RETAINING_ALL_OBSERVERS_OF_THIS_OBJECT_IF_IT_CRASHES_AN_OBSERVER_WAS_OVERRELEASED_OR_SMASHED + 54
2   com.apple.Foundation          	0x00007fff258dd6a3 NSKeyValueWillChangeWithPerThreadPendingNotifications + 240
3   com.apple.avfoundation        	0x00007fff2095e5f2 -[AVPlayer setAutomaticallyWaitsToMinimizeStalling:] + 81
4   com.apple.avfoundation        	0x00007fff209570b0 -[AVPlayer init] + 1106
5   com.apple.avfoundation        	0x00007fff20956ad8 -[AVPlayer initWithPlayerItem:] + 34
6   org.cocoapods.assets-audio-player	0x000000010303b26f @nonobjc AVPlayer.init(playerItem:) + 31
7   org.cocoapods.assets-audio-player	0x000000010303b247 AVPlayer.__allocating_init(playerItem:) + 39
8   org.cocoapods.assets-audio-player	0x000000010303a4df Player.open(assetPath:audioType:autoStart:volume:seek:respectSilentMode:result:) + 1967 (AssetsAudioPlayer.swift:94)
9   org.cocoapods.assets-audio-player	0x0000000103044087 closure #1 in Music.start() + 18711 (AssetsAudioPlayer.swift:312)
10  org.cocoapods.assets-audio-player	0x0000000103044240 thunk for @escaping @callee_guaranteed (@guaranteed FlutterMethodCall, @unowned @callee_guaranteed (@in_guaranteed Any?) -> ()) -> () + 64
11  org.cocoapods.assets-audio-player	0x00000001030442f3 thunk for @escaping @callee_guaranteed (@guaranteed FlutterMethodCall, @guaranteed @escaping @callee_guaranteed (@in_guaranteed Any?) -> ()) -> () + 147
12  io.flutter.flutter            	0x0000000100ee5b5f __45-[FlutterMethodChannel setMethodCallHandler:]_block_invoke + 104
13  io.flutter.flutter            	0x0000000100e747a2 flutter::PlatformMessageRouter::HandlePlatformMessage(fml::RefPtr<flutter::PlatformMessage>) const + 166
14  io.flutter.flutter            	0x0000000100e788fa flutter::PlatformViewIOS::HandlePlatformMessage(fml::RefPtr<flutter::PlatformMessage>) + 38
15  io.flutter.flutter            	0x0000000100edf83b std::__1::__function::__func<flutter::Shell::OnEngineHandlePlatformMessage(fml::RefPtr<flutter::PlatformMessage>)::$_32, std::__1::allocator<flutter::Shell::OnEngineHandlePlatformMessage(fml::RefPtr<flutter::PlatformMessage>)::$_32>, void ()>::operator()() + 57
16  io.flutter.flutter            	0x0000000100e893e7 fml::MessageLoopImpl::FlushTasks(fml::FlushType) + 117
17  io.flutter.flutter            	0x0000000100e8e334 fml::MessageLoopDarwin::OnTimerFire(__CFRunLoopTimer*, fml::MessageLoopDarwin*) + 26
18  com.apple.CoreFoundation      	0x00007fff23d9e634 __CFRUNLOOP_IS_CALLING_OUT_TO_A_TIMER_CALLBACK_FUNCTION__ + 20
19  com.apple.CoreFoundation      	0x00007fff23d9e2ce __CFRunLoopDoTimer + 1038
20  com.apple.CoreFoundation      	0x00007fff23d9d92a __CFRunLoopDoTimers + 282
21  com.apple.CoreFoundation      	0x00007fff23d9857e __CFRunLoopRun + 1950
22  com.apple.CoreFoundation      	0x00007fff23d97ac4 CFRunLoopRunSpecific + 404
23  com.apple.GeoServices         	0x00007fff38b2fc1a GSEventRunModal + 139
24  com.apple.UIKitCore           	0x00007fff48bc7f80 UIApplicationMain + 1605
25  com.ubertao.FlutterJungle     	0x0000000100d9d1ab main + 75 (AppDelegate.swift:5)
26  libdyld.dylib                 	0x00007fff519521fd start + 1

IOS compile failed

Getting below error when compiling for IOS

/Users/runner/.pub-cache/hosted/pub.dartlang.org/assets_audio_player-1.2.3/ios/Classes/SwiftAssetsAudioPlayerPlugin.swift:114:103: error: 'AVAudioSessionModeDefault' has been renamed to 'AVAudioSession.Mode.default'
try AVAudioSession.sharedInstance().setCategory(AVAudioSessionCategoryPlayback, mode: AVAudioSessionModeDefault, options: [])
^~~~~~~~~~~~~~~~~~~~~~~~~
AVAudioSession.Mode.default
AVFoundation.AVAudioSessionModeDefault:3:12: note: 'AVAudioSessionModeDefault' was obsoleted in Swift 3
public let AVAudioSessionModeDefault: AVAudioSession.Mode
^
/Users/runner/.pub-cache/hosted/pub.dartlang.org/assets_audio_player-1.2.3/ios/Classes/SwiftAssetsAudioPlayerPlugin.swift:116:36: error: ambiguous reference to member 'setCategory'
try AVAudioSession.sharedInstance().setCategory(AVAudioSessionCategoryPlayback, with: .mixWithOthers)
~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~

AVAudioUnitEffect

Hi, any plans implementing AVAudioUnitEffect? I'm especially interested in AVAudioUnitReverb.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.