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
Users report my app isn't working on Samsung Galaxy S21+ #21
Comments
It will be difficult to support what's happening on the Samsung devices without any further information. As you may have seen when you opened this issue, we request bugreports to inspect what may have gone wrong. A copy of the logs and/or stack trace would at least be more helpful than nothing.
Can you please explain in more detail what's happening? Also consider attaching a bureport when issues occur. @krocard can you offer some assistance on the audio off-load issues? |
@christosts I can appreciate and understand that. Unfortunately I don't have access to the particular device and haven't been able to get the users to create a bugreport. Perhaps I can bake something into the app that will allow me to generate that remotely, but I am not super experienced with Android so I'll have to investigate. |
I'll test on Pixel 6 Pro, but can I am wondering why you choose to enable this option. It is designed for power savings during long audio only playback with the screen off. Additionally only AAC and MP3 are supported and there are severe limitations on offload scheduling (you can't interact with the Player). |
Because it says in the docs that this feature should be used to minimize battery consumption, in cases where audio should play with the screen off for longer durations. I linked to my app (both source and play store) in the original issue description and it is a radio/podcast app. I cannot think of a better match for the feature described. Additionally the streams, that I also linked in the original issue description, are pure AAC streams.
Okay, I wasn't aware. The documentation on the matter is scarce at best. I wasn't able to find a sample, though the fact that audio playback behaved slightly differently with offloading enabled, led me to believe it was in fact working (playback was a few seconds delayed when being started for example).
I don't mind that :) love to be on the edge |
To clarify, it says: "Audio offload disables ExoPlayer audio processing, but significantly reduces the energy consumption of the playback when offload scheduling is enabled" [emphasis added]. Please refer to the linked offload scheduling doc that lists many restriction on how the player can be controlled when offload scheduling is enabled: media/libraries/exoplayer/src/main/java/androidx/media3/exoplayer/ExoPlayer.java Lines 1564 to 1601 in 341bb57
One of the main current limitation of offload scheduling is that it is not compatible with the demo or the media-3/ExoPlayer current UI module as it accesses the player state without leaving offload scheduling. Unfortunately, one can't simply enabling offload playback to gain battery power (though it is a state where we would like to be on the long term). The main issue is that because ExoPlayer internal thread doesn't run very often (to save battery), the shared state visible by the UI thread is only updated every ~1min. In theory it could be avoided by updating the state in the UI thread, but we are waiting to get more data on the power savings across the ecosystem before considering such architectural change. |
Right, but from the user guide:
Anyways I understand and I've also turned it off now as it seemed to break on Pixel 6 Pro. I don't use the ExoPlayer provided UI elements. Instead I've built player layout using compose and interact with the player through media3. All of this is however not super important as users do not seem to be concerned about battery usage without offloading. It is however quite a big issue for us that it doesn't seem to work at all on Samsung Galaxy S21+. Unfortunately I don't have a device at hand. There is no chance the media3 team has one? |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
We are going to improve support for audio offload, but for now it is still experimental. We have known issues currently with offload, especially on track transition. |
@krocard Totally understand. Main issue is that it doesn't work at all on S21+ (I am not using offload). |
I checked with the app you mentioned on S21+ (Exynos). I can confirm that audio does not play reliably on S21+ (it is able to play rarely). I observed that your app goes to IDLE state instead of receiving timeline change event with correct duration, and remains stuck in this state. Your app works as expected on Pixel 3. Since reference demo applications work reliably with your content on S21+, the issue appears to be in how your application has implemented its custom listener and state manager in Player.kt. This issue is not at all reproducible in reference demo app. I would recommend you to review the demo-session reference app again to try and identify the root-cause in your app. @Krovad may recommend things to try, however following the reference as closely as possible would be the way to proceed to resolve this. Thanks. |
@umangsaini Okay, thanks. However quite hard for me to understand how it can be implemented incorrectly. It's super simple. |
Thanks @umangsaini for carring the test! @rhummelmose Given that the the demo app has no issue, it is highly likely that the problem comes from your app. Unfortunatly, we do not have the time to help you debug your app. Nevertheless, would you have any ExoPlayer specific question, feel free to open a new issue. |
To anybody who might be coming here facing the same issue: |
I've just built and released an application with media3.
Links:
Versions:
Everything seems to work fine for most devices, but we've received 2 reports from users of Samsung Galaxy S21+ devices who are unable to play any of the media.
I haven't been able to verify the issue as I don't have a device at hand.
Another thing: enableAudioOffload causes things not to work properly on Pixel 6 Pro and perhaps more devices: https://github.com/denuafhaengige/duah-android/blob/master/app/src/player/Service.kt#L106
Hope for help/guidance, thanks.
The text was updated successfully, but these errors were encountered: