Add auto-collapse capability to pinned messages based on timeout provided by bannerProperties #156
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.
This also updates the impl in ChatSummary, and adds a fix for responseIsAction for summary (in case YT ever starts sending summary in liveChatContinuation instead of initial data).
Note that in all cases, the behavior is auto-collapse instead of YT's default behavior of removing certain banners entirely after the time expires.
bannerProperties exists both on the top-level object as well as inside the liveChatBannerRenderer.
This impl does the following:
In stock YT, Redirects and AI Chat Summary use the top-level properties with isEphemeral=true and bannerTimeoutMs, and pinned chat messages use the inner object with just autoCollapseDelay.
AI Chat Summary also has an inner object with isEphemeral=true and autoCollapseDelay, but it never seems to get used by stock YT, and has a 30-second value instead of the 12 seconds of the top-level properties (the actual behavior uses 12 seconds).
Tested on mv3/chrome