-
Notifications
You must be signed in to change notification settings - Fork 187
Cherry pick PR #8342 #8821 #8882: Play splash video from Main app's cache #9044
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.eap
Are you sure you want to change the base?
Conversation
…vcc schema and move hard coded webm to the embedded file (youtube#7997) See original youtube#8570: Register the H5VCC URL schema to the fetch API at render side. With the change, native splash implementation could call H5VCC to get the cached contents via fetch API. In the Cherry pick, I have to refactor a new target for "//cobalt/shell:url_constants", as in M114 cobalt_shell_lib is still under "testonly = true", which blocks us to use the constants in production targets. Issue: 454630524
…deo from Main app's cache (youtube#8854) See original PR: youtube#8342 youtube#8821 youtube#8882 Add cache reader to h5vcc loader to extract the splash video from local storage With it, youtube main app([www.youtube.com](http://www.youtube.com/)) could cache the splash video into local storage. At the following start, if the cache hits, h5vcc loader will return the local stored video to media source to display. h5vcc loader exposes two URL parameters for the callers: fallback: designate the webm file if cache is empty. For now only allow splash_480.webm for the low spec devices. cache: specify the cache name, default is "default". Check the h5vcc_scheme_url_loader_factory_browsertest.cc for the expected behaviors. Issue: 454630524
🤖 Gemini Suggested Commit Message💡 Pro Tips for a Better Commit Message:
|
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.
Code Review
This pull request enables playing the splash video from the main application's cache, implementing a new BlobReader class and enhancing H5vccSchemeURLLoader to interact with the Cache Storage API. However, a medium-severity security vulnerability was identified: the cache query parameter is used from the URL without validation, potentially allowing access to other caches within the same origin. It is recommended to use a hardcoded cache name instead. Additionally, a minor issue was found in the new tests that could lead to flakiness, for which a suggestion has been provided.
See original PR: #8342 #8821 #8882
Add cache reader to h5vcc loader to extract the splash video from local storage
With it, youtube main app(www.youtube.com) could cache the splash video into local storage. At the following start, if the cache hits, h5vcc loader will return the local stored video to media source to display.
h5vcc loader exposes two URL parameters for the callers:
fallback: designate the webm file if cache is empty. For now only allow splash_480.webm for the low spec devices.
cache: specify the cache name, default is "default".
Check the h5vcc_scheme_url_loader_factory_browsertest.cc for the expected behaviors.
Issue: 454630524