-
Notifications
You must be signed in to change notification settings - Fork 861
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(android): ExoPlayer for Android #1691
base: main
Are you sure you want to change the base?
Conversation
…rable-position-updates # Conflicts: # packages/audioplayers_android/android/src/main/kotlin/xyz/luan/audioplayers/player/SoundPoolPlayer.kt
…/exoplayer # Conflicts: # packages/audioplayers/example/integration_test/lib_test.dart
hi there i was able to get this branch running locally against an old alcatel pixi4 that was having issues playing mp3s with the mediaplayer library. Is this likely to get merged soon or does it need more work / is it safe for me to use in production please thank you! |
I have to work on a solution to support channel volumes to not break the library experience. I propose to fork the branch and use that in the meantime. This branch and also this functionality is not guaranteed to work and is not ready for the stable environment yet. |
# Conflicts: # packages/audioplayers/example/.metadata # packages/audioplayers/example/android/app/build.gradle # packages/audioplayers/example/android/build.gradle # packages/audioplayers/example/android/gradle.properties # packages/audioplayers/example/android/gradle/wrapper/gradle-wrapper.properties # packages/audioplayers/example/android/settings.gradle # packages/audioplayers/example/pubspec.yaml # packages/audioplayers/pubspec.yaml
# Conflicts: # packages/audioplayers/example/pubspec.yaml
@spydon I finally had some time to wrap up the ExoPlayer implementation. But like with every new things we have some quirks coming along:
|
Exciting! Sounds like a great plan |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good job!
import androidx.annotation.RequiresApi | ||
import java.util.* | ||
|
||
data class AudioContextAndroid( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this duplicated from the promoted package? Is this the only one that is duplicated, otherwise maybe the promoted package could be imported and the files reused?
If it's only this one I think duplication is fine though.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not 100% sure how this can be achieved. There are more files, which are the same, so it would be nice to have them unique.
Don't know how the files from the other package can be reused by importing them (that kind of defeats the purpose of a separate package to not be dependent on the other one). Or creating a separate kotlin package? That involes compiling and archiving and uploading it to some maven package repo(?). Pretty much effort also.
Best alternative I see: I don't know the exact outcome of this: dart-lang/pub#3298, but if symlinked files are also copied (and not referenced) during packaging, we could easily write a symlink to ensure both files are the same.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh nice, I didn't know the symlink one was finally merged!
But I guess we can do that later? Something similar needs to be done for macOS / iOS right?
Description
Closes #1526
Checklist
fix:
,feat:
,refactor:
,docs:
,chore:
,test:
,ci:
etc).///
, where necessary.Breaking Change
Related Issues
Inspiration from androidx/media#310
Blocked by flutter/flutter#137040