fix: Android error handling, iOS memory leaks & Legacy View Manager Interop - #2
Draft
jhen0409 wants to merge 1 commit into
Draft
fix: Android error handling, iOS memory leaks & Legacy View Manager Interop#2jhen0409 wants to merge 1 commit into
jhen0409 wants to merge 1 commit into
Conversation
jhen0409
marked this pull request as draft
February 2, 2026 10:29
…nterop ## Android - Add try-catch for setDataSource and prepareAsync to prevent crashes - Emit proper error events (MEDIA_ERROR_INVALID_SOURCE, MEDIA_ERROR_PREPARE_FAILED) - Move onLoad event to onPrepared for consistent timing - Fix monorepo path resolution in build.gradle (3 levels deep) ## iOS - Add Legacy View Manager Interop compatibility (props + event callbacks) - Fix memory leaks with proper weak references in time observer block - Add _didRelease flag to prevent double-release crashes - Improve observer removal with try-catch - Add reloadCurrentSource for proper recycling - Implement dealloc for cleanup - Store current URI/headers for source reload capability - Fix prepareForRecycle to properly clear player item
jhen0409
force-pushed
the
fix/android-error-handling-ios-interop-memory-leaks
branch
from
February 2, 2026 10:59
d298fdb to
3f3e916
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This PR brings several stability and compatibility improvements from production patches.
Android Changes
Error Handling
setDataSourceandprepareAsyncto prevent uncaught exceptionsMEDIA_ERROR_INVALID_SOURCE,MEDIA_ERROR_PREPARE_FAILED) instead of crashingonLoadevent toonPreparedfor more consistent timing across platformsBuild
build.gradle(support 3 levels deep for nested workspaces)iOS Changes
Memory Leak Fixes
_didReleaseflag to prevent double-release crashesdeallocmethod for proper cleanupprepareForRecycleto properly clear player itemLegacy View Manager Interop
Testing
Tested in production with BRICKS app on both iOS and Android.