Fix UI block on iOS during initial load #1086
Closed
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.
Possibly related issues: #577 #1067.
I'm experiencing an issue where, if any prop that causes the applyModifiers function to be called has a value set, then the UI will block during the initial video load from a network location. This is the 'ignoreSilentSwitch', 'rate', 'volume' and 'muted' props.
I can reproduce this by pointing the player to a remote file such as 'https://www.sample-videos.com/video/mp4/720/big_buck_bunny_720p_10mb.mp4' and setting, for example, volume to 1. If the player is mounted when the app starts, then no UI will render until the video loads. Removing the volume prop prevents the issue.
I fixed the issue by adding a check that the video is ready in the applyModifiers function. The function is called again when the video state changes to ready so I don't think this causes any problems.