Skip to content
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: ExoPlayer for Android #1526

Open
fzyzcjy opened this issue May 29, 2023 · 5 comments · May be fixed by #1691
Open

feat: ExoPlayer for Android #1526

fzyzcjy opened this issue May 29, 2023 · 5 comments · May be fixed by #1691
Assignees
Labels
feature-request platform-android Affects the android platform

Comments

@fzyzcjy
Copy link
Contributor

fzyzcjy commented May 29, 2023

It seems that many people prefer ExoPlayer than AudioPlayer (eg. https://www.reddit.com/r/androiddev/comments/95l3hc, and searching demo apps in Github for Android + audio). ExoPlayer also seems to have a lot of pros (see https://developer.android.com/guide/topics/media/exoplayer/pros-and-cons), and is an official android thing.

Therefore, shall we switch to ExoPlayer?

@fzyzcjy fzyzcjy changed the title Use ExoPlayer for Android? (Will PR) Use ExoPlayer for Android? May 29, 2023
@Gustl22
Copy link
Collaborator

Gustl22 commented May 29, 2023

I already started a new branch:
https://github.com/bluefireteam/audioplayers/tree/gustl22/exoplayer

But as some features are not available, I thought about using a completely new module like audioplayers_android_exoplayer, and replace it some time after testing in audioplayers.

@fzyzcjy
Copy link
Contributor Author

fzyzcjy commented May 29, 2023

@Gustl22 Oh that's great! Looking forward to that!

@fzyzcjy
Copy link
Contributor Author

fzyzcjy commented May 29, 2023

@Gustl22 So... Does it work now, or is there any problems?

@Gustl22
Copy link
Collaborator

Gustl22 commented May 29, 2023

@fzyzcjy it's not really functional (only experimental), and I also propose a new module, which does not mess around with the "old" android code. So it may be better to restart from the beginning.

@fzyzcjy
Copy link
Contributor Author

fzyzcjy commented May 29, 2023

@Gustl22 I see :)

@Gustl22 Gustl22 added the platform-android Affects the android platform label May 30, 2023
Gustl22 added a commit that referenced this issue Sep 7, 2023
# Description

The tests in Windows & Android are possibly flaky for this reason:
- In general it is not tested, if a source starts to play for app tests.
- In the app test for `ReleaseMode.loop`, the source starts to play, but
never completes or stops. See:
https://github.com/bluefireteam/audioplayers/blob/fe81f3b1e600fe005febbe7cd3da02735a3de004/packages/audioplayers/example/integration_test/app/tabs/controls_tab.dart#L104
. This is now checked by getting the current position.

The solution to the problem also raises another issue on Android, as the
position can not be retrieved on very short sources, thus they are
excluded from these tests and it is expected to make it work with
Exoplayer (#1526).
Gustl22 added a commit that referenced this issue Sep 26, 2023
# Description

The tests in Windows & Android are possibly flaky for this reason:
- In general it is not tested, if a source starts to play for app tests.
- In the app test for `ReleaseMode.loop`, the source starts to play, but
never completes or stops. See:
https://github.com/bluefireteam/audioplayers/blob/fe81f3b1e600fe005febbe7cd3da02735a3de004/packages/audioplayers/example/integration_test/app/tabs/controls_tab.dart#L104
. This is now checked by getting the current position.

The solution to the problem also raises another issue on Android, as the
position can not be retrieved on very short sources, thus they are
excluded from these tests and it is expected to make it work with
Exoplayer (#1526).

(cherry picked from commit c5b0b6e)
@Gustl22 Gustl22 changed the title (Will PR) Use ExoPlayer for Android? feat: ExoPlayer for Android Oct 1, 2023
@Gustl22 Gustl22 linked a pull request Nov 5, 2023 that will close this issue
7 tasks
Gustl22 added a commit that referenced this issue Nov 14, 2023
# Description

The tests in Windows & Android are possibly flaky for this reason:
- In general it is not tested, if a source starts to play for app tests.
- In the app test for `ReleaseMode.loop`, the source starts to play, but
never completes or stops. See:
https://github.com/bluefireteam/audioplayers/blob/fe81f3b1e600fe005febbe7cd3da02735a3de004/packages/audioplayers/example/integration_test/app/tabs/controls_tab.dart#L104
. This is now checked by getting the current position.

The solution to the problem also raises another issue on Android, as the
position can not be retrieved on very short sources, thus they are
excluded from these tests and it is expected to make it work with
Exoplayer (#1526).
@Gustl22 Gustl22 self-assigned this Nov 20, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature-request platform-android Affects the android platform
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants
@fzyzcjy @Gustl22 and others