Commit 4ff9e9b0 authored by Yue Li's avatar Yue Li Committed by Commit Bot

Replace voice match already setup video with lottie

The cl replaces the use of webm video with lottie animation in Assistant
opt-in flow.

Also update the style to center the lottie animation.

Bug: b/1012793
Test: Manual Test
Change-Id: I620d01dee2bf9c6670f57ec2390b6b0bf0da53df
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1891336Reviewed-by: default avatarXiyuan Xia <xiyuan@chromium.org>
Reviewed-by: default avatarSteven Bennetts <stevenjb@chromium.org>
Commit-Queue: Yue Li <updowndota@chromium.org>
Cr-Commit-Position: refs/heads/master@{#712364}
parent bff7cdbc
...@@ -32,12 +32,17 @@ ...@@ -32,12 +32,17 @@
width: 255px; width: 255px;
} }
#already-setup-video-container { #already-setup-animation-container {
text-align: center; flex-grow: 1;
} }
#already-setup-video { #already-setup-animation {
height: 450px; height: 300px;
left: 50%;
position: relative;
top: 50%;
transform: translate(-50%, -50%);
width: 360px;
} }
#intro-container, #intro-container,
......
...@@ -69,10 +69,12 @@ ...@@ -69,10 +69,12 @@
i18n-content="assistantVoiceMatchAlreadySetupTitle"></div> i18n-content="assistantVoiceMatchAlreadySetupTitle"></div>
<div class="content" <div class="content"
i18n-content="assistantVoiceMatchAlreadySetupMessage"></div> i18n-content="assistantVoiceMatchAlreadySetupMessage"></div>
<div id="already-setup-video-container"> <div id="already-setup-animation-container">
<video id="already-setup-video" muted autoplay loop> <div id="already-setup-animation">
<source src="voice_already_setup.webm" type="video/webm"> <cr-lottie id="already-setup-lottie"
</video> animation-url="voice_match_already_setup_animation.json">
</cr-lottie>
</div>
</div> </div>
</div> </div>
</div> </div>
......
...@@ -48,6 +48,7 @@ Polymer({ ...@@ -48,6 +48,7 @@ Polymer({
'login.AssistantOptInFlowScreen.VoiceMatchScreen.userActed', 'login.AssistantOptInFlowScreen.VoiceMatchScreen.userActed',
['skip-pressed']); ['skip-pressed']);
this.$['voice-match-lottie'].setPlay(false); this.$['voice-match-lottie'].setPlay(false);
this.$['already-setup-lottie'].setPlay(false);
}, },
/** /**
...@@ -149,6 +150,7 @@ Polymer({ ...@@ -149,6 +150,7 @@ Polymer({
'login.AssistantOptInFlowScreen.VoiceMatchScreen.userActed', 'login.AssistantOptInFlowScreen.VoiceMatchScreen.userActed',
['voice-match-done']); ['voice-match-done']);
this.$['voice-match-lottie'].setPlay(false); this.$['voice-match-lottie'].setPlay(false);
this.$['already-setup-lottie'].setPlay(false);
}, this.doneActionDelayMs_); }, this.doneActionDelayMs_);
}, },
...@@ -158,6 +160,7 @@ Polymer({ ...@@ -158,6 +160,7 @@ Polymer({
onShow: function() { onShow: function() {
chrome.send('login.AssistantOptInFlowScreen.VoiceMatchScreen.screenShown'); chrome.send('login.AssistantOptInFlowScreen.VoiceMatchScreen.screenShown');
this.$['voice-match-lottie'].setPlay(true); this.$['voice-match-lottie'].setPlay(true);
this.$['already-setup-lottie'].setPlay(true);
this.$['agree-button'].focus(); this.$['agree-button'].focus();
if (loadTimeData.getBoolean('hotwordDspAvailable')) { if (loadTimeData.getBoolean('hotwordDspAvailable')) {
this.$['no-dsp-message'].hidden = true; this.$['no-dsp-message'].hidden = true;
......
...@@ -96,6 +96,8 @@ AssistantOptInUI::AssistantOptInUI(content::WebUI* web_ui) ...@@ -96,6 +96,8 @@ AssistantOptInUI::AssistantOptInUI(content::WebUI* web_ui)
source->SetDefaultResource(IDR_ASSISTANT_OPTIN_HTML); source->SetDefaultResource(IDR_ASSISTANT_OPTIN_HTML);
source->AddResourcePath("voice_match_animation.json", source->AddResourcePath("voice_match_animation.json",
IDR_ASSISTANT_VOICE_MATCH_ANIMATION); IDR_ASSISTANT_VOICE_MATCH_ANIMATION);
source->AddResourcePath("voice_match_already_setup_animation.json",
IDR_ASSISTANT_VOICE_MATCH_ALREADY_SETUP_ANIMATION);
source->OverrideContentSecurityPolicyWorkerSrc("worker-src blob: 'self';"); source->OverrideContentSecurityPolicyWorkerSrc("worker-src blob: 'self';");
content::WebUIDataSource::Add(Profile::FromWebUI(web_ui), source); content::WebUIDataSource::Add(Profile::FromWebUI(web_ui), source);
......
...@@ -184,6 +184,8 @@ void AddArcScreensResources(content::WebUIDataSource* source) { ...@@ -184,6 +184,8 @@ void AddArcScreensResources(content::WebUIDataSource* source) {
void AddAssistantScreensResources(content::WebUIDataSource* source) { void AddAssistantScreensResources(content::WebUIDataSource* source) {
source->AddResourcePath("voice_match_animation.json", source->AddResourcePath("voice_match_animation.json",
IDR_ASSISTANT_VOICE_MATCH_ANIMATION); IDR_ASSISTANT_VOICE_MATCH_ANIMATION);
source->AddResourcePath("voice_match_already_setup_animation.json",
IDR_ASSISTANT_VOICE_MATCH_ALREADY_SETUP_ANIMATION);
source->OverrideContentSecurityPolicyWorkerSrc("worker-src blob: 'self';"); source->OverrideContentSecurityPolicyWorkerSrc("worker-src blob: 'self';");
} }
......
...@@ -101,6 +101,7 @@ ...@@ -101,6 +101,7 @@
<!-- Assistant images. --> <!-- Assistant images. -->
<structure type="chrome_html" name="IDR_ASSISTANT_VOICE_MATCH_ANIMATION" file="vector/voice_laptop.json" compress="gzip" /> <structure type="chrome_html" name="IDR_ASSISTANT_VOICE_MATCH_ANIMATION" file="vector/voice_laptop.json" compress="gzip" />
<structure type="chrome_html" name="IDR_ASSISTANT_VOICE_MATCH_ALREADY_SETUP_ANIMATION" file="vector/connecting_loop.json" compress="gzip" />
</structures> </structures>
</release> </release>
......
This diff is collapsed.
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment