-
Notifications
You must be signed in to change notification settings - Fork 29.7k
Description
As of the migration from SurfaceTexture to ImageReader, we inadvertently broke the ability to run videos in the background, because when the application is backgrounded it typically receives a TRIM_MEMORY(BACKGROUND) event, which in turn causes the surface to be released.
For example, this option is no longer functional:
VideoPlayerOptions({
bool allowBackgroundPlayback = false,
})@johnmccutchan mentioned that the particular workaround was for Android 14, and it's possible that in other versions (i.e. Android 15 or newer), we could support background playback (by not releasing the texture). However, I want to make sure (a) I understand this correctly, (b) we consider this a problem, and (c) have a plan on how to fix this - for now it's likely I need to just make a note this functionality is unsupported on Android (or folks will need to fallback to an older pre-ImageReader version of the plugin, which is not ideal).