-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We鈥檒l occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: bundle video in app to prevent crash when not available (2nd attempt) #5941
Conversation
- use import instead of require - declare mp4 as modules for import - fix code format issues
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. |
* update urls constants * restore original video name * add a readme in video folder to clarify and provide video encoding options
- added an ffmpeg script to use when we want to regenerate the video - updated readme instructions removed useless SRP video constants and code related to external subs.
2aa674c
to
4e99678
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Minor comments
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- Tested on bitrise with IOS & Android devices
- Video together with subtitles load fine even when network is throttled
- Verified video loads correctly with appropriate subtitles in different Languages [en, es, hi]
- Verified with @NicolasMassart production issue that occurred on previous merge has been rectified.
Development & PR Process
release-xx
label to identify the PR slated for a upcoming release (will be used in release discussion)needs-dev-review
label when work is completedneeds-qa
label when dev review is completedQA Passed
label when QA has signed offImportant
This PR is the second attempt to push this change as the previous one #5886 failed because of an unexpected side effect and required revert, see #5940
This new one takes the side effect into account, see description bellow.
Description
Make the SRP video bundled in the app instead of retrieved from Github repos.
Have the subtitles embedded in the video, removing the need to load them from an external source.
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 ffmpeg script allows to compress with higher bitrates if requested (change variables in the script).
Source video
https://github.com/MetaMask/metamask-mobile/raw/471_make_SRP_video_embeded_in_app/app/videos/recovery-phrase-source.mp4
Compressed video with embedded subs
https://github.com/MetaMask/metamask-mobile/raw/471_make_SRP_video_embeded_in_app/app/videos/recovery-phrase.mp4
App size impact
The app size is only 2 additional Mb for the video. Makes it around 27.8Mb for iOS and 274.7Mb for Android.
Issue
Relates to MetaMask/mobile-planning#471
fixes #5497
Testing
Simulator.Screen.Recording.-.iPhone.11.Pro.-.2023-03-15.at.14.12.23.mov
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
Checklist