-
Notifications
You must be signed in to change notification settings - Fork 171
Cache manifest defined splash video #7860
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’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: 26.android
Are you sure you want to change the base?
Cache manifest defined splash video #7860
Conversation
to be controlled by a boolean flag and to use a data URL for the splash screen content. A new SplashScreenManager class is introduced to handle all splash screen logic. CobaltActivity is updated to use the new SplashScreenManager and to load the splash screen from a data URL. CobaltWebContentsObserver is updated to trigger caching splash video at DidUpdateWebManifestURL event. Bug: 454630524
|
@yell0wd0g Quote your questions here: For two PRs, sure will do. Regarding, "Chrome UI protocol ("h5vcc-embedded")", I saw it in the bug, but not sure how to consume it yet, maybe @borongc may provide more info around it. |
| @@ -0,0 +1,227 @@ | |||
| <!doctype html> | |||
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.
Putting this file as an Android asset made this solution only Android-specific, we should consider 3P platform as well. Same for SplashScreenManager.java.
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.
The thing is splash requires fast response once the app spin up, any chromium aka platform agnostic solution may take extra time. So I think platform specific implementation is a trade off.
The splash.html is a temp and handy solution for now, I guess. In long term, we should have a native API to consume it, probably.
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.
This PR (#7805) allows you to access the file in memory using h5vcc-embedded://{filename}, just put {filename} under cobalt/shell/embedded_resources/ and add it to BUILD.gn, then you can access it both on 3P and Android platform.
This also bypasses CSP and HTTPs enforcement, as it is only local, so it is safe and won't cause any security issues.
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.
Synced with @borongc,
- better not write any files to file asset for security
- use PWA solution for platform agnostic
For 2, I can use the installable manager in my old #7642 to fetch and parse manifest. But two issues need to figure out:
- how to notify the java native side if the chromium cache is available.
- hot to detect if the video file has updated and need to fetch again.
Cache manifest defined splash video
Bug: 454630524