You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
VideoPlayer plugin should make sure that resources are released when FlutterView is destroyed #20989
VideoPlayer plugin on Android allocates a platform MediaPlayer object for each VideoPlayer plugin in the widget tree. MediaPlayer objects are destroyed when corresponding Flutter widgets go away. But if a whole FlutterView is destroyed, dispose methods don't run, so MediaPlayer instances are not released. This leads to leaks and also crashes (since the player continues to provide frames for non-existent surfaces; internal bug: b/112692333).
IMO, VideoPlayer should rely on normal disposing for the final cleanup and just assert that by the time the view is destroyed all resources are released. This would rely on widgets disposal methods to be called, which is tracked in #19358.
As a workaround, VideoPlayer should subscribe with a onViewDestroyListener and explicitly release all resources when the owner FlutterView goes away.
Activity
Release all resources allocated for VideoPlayers when the owning Flut…
Release all resources allocated for VideoPlayers when the owning Flut…
Release all resources allocated for VideoPlayers when the owning Flut…
Release all resources allocated for VideoPlayers when the owning Flut…
Release all resources allocated for VideoPlayers when the owning Flut…
Release all resources allocated for VideoPlayers when the owning Flut…
Release all resources allocated for VideoPlayers when the owning Flut…
Release all resources allocated for VideoPlayers when the owning Flut…
Release all resources allocated for VideoPlayers when the owning Flut…
Release all resources allocated for VideoPlayers when the owning Flut…
9 remaining items
[video_player] Calls `onDestroy` instead of `initialize` in onDetache…
[video_player] Calls `onDestroy` instead of `initialize` in onDetache…
[video_player] Calls `onDestroy` instead of `initialize` in onDetache…
[video_player] Calls `onDestroy` instead of `initialize` in onDetache…
[video_player] Calls `onDestroy` instead of `initialize` in onDetache…