fix: bundle video in app to prevent crash when not available#5886
Merged
NicolasMassart merged 6 commits intomainfrom Mar 9, 2023
Merged
fix: bundle video in app to prevent crash when not available#5886NicolasMassart merged 6 commits intomainfrom
NicolasMassart merged 6 commits intomainfrom
Conversation
Contributor
|
CLA Signature Action: All authors have signed the CLA. You may need to manually re-run the blocking PR check if it doesn't pass in a few minutes. |
- use import instead of require - declare mp4 as modules for import - fix code format issues
sethkfman
reviewed
Mar 3, 2023
Member
|
removing "needs-qa" since dev-review is still pending. |
|
Closes #5497 |
Andepande
reviewed
Mar 9, 2023
Contributor
Andepande
left a comment
There was a problem hiding this comment.
- Tested on physical Pixel 6
- Tested on Browserstack devices (IOS/Android) while throttling network
- QA PASSED
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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
Development & PR Process
release-xxlabel to identify the PR slated for a upcoming release (will be used in release discussion)needs-dev-reviewlabel when work is completedneeds-qalabel when dev review is completedQA Passedlabel when QA has signed offDescription
Make the SRP video bundled in the app instead of retrieved from Github repos.
1. What is the reason for the change?
App crashed when video player tried to load the remote video and remote was not available (or network down or anything)
2. What is the improvement/solution?

The video is displayed by default on its original format on portrait mobile, meaning this video is most of the time around 5x3cm, very hard to see the quality diff when not really looking for it. Fullscreen makes it a bit more visible though. The source video is still in the repos (but not bundled in the app) and the above script allows to compress with higher bitrates if requested.Source video
https://github.com/MetaMask/metamask-mobile/blob/471_make_SRP_video_embeded_in_app/app/videos/recovery-phrase-source.mp4?raw=true
Compressed video
https://github.com/MetaMask/metamask-mobile/blob/471_make_SRP_video_embeded_in_app/app/videos/recovery-phrase-mobile-2pass-optimized.mp4?raw=true
App size impact
The app size is only 1.9 additional Mb for the video. Makes it arround 27.7Mb for iOS and 274.6Mb for Android.
Issue
Relates to MetaMask/mobile-planning#471
fixes #5497
Testing
Here are the tests done:
GIVEN: User has NO access to internet (airplane mode): the app has a system preventing it to be used and requires the user to turn network on, so not relevant.Test artifacts
TODO
test that the video player is not broken for other usecases (NFTs) -> requires a video NFT in the test wallet, will create and drop one for testing.
Checklist