fix: bundle video in app to prevent crash when not available (2nd attempt)#5941
Merged
NicolasMassart merged 12 commits intomainfrom Mar 16, 2023
Merged
fix: bundle video in app to prevent crash when not available (2nd attempt)#5941NicolasMassart merged 12 commits intomainfrom
NicolasMassart merged 12 commits intomainfrom
Conversation
- use import instead of require - declare mp4 as modules for import - fix code format issues
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. |
3 tasks
* update urls constants * restore original video name * add a readme in video folder to clarify and provide video encoding options
NicolasMassart
commented
Mar 10, 2023
- 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
NicolasMassart
commented
Mar 15, 2023
NicolasMassart
commented
Mar 15, 2023
NicolasMassart
commented
Mar 15, 2023
NicolasMassart
commented
Mar 15, 2023
NicolasMassart
commented
Mar 15, 2023
sethkfman
reviewed
Mar 15, 2023
Cal-L
reviewed
Mar 15, 2023
NicolasMassart
commented
Mar 15, 2023
Andepande
reviewed
Mar 16, 2023
Contributor
Andepande
left a comment
There was a problem hiding this comment.
- 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.
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 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