-
Notifications
You must be signed in to change notification settings - Fork 710
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
Implement feature AnimatedVisualPlayer #130
Implement feature AnimatedVisualPlayer #130
Conversation
@simeoncran @jevansaks @Microsoft/microsoft-ui-xaml-codereviews ping... |
Can you fix the title of this PR to be the newly added feature with a full description about the feature? There's no context for this feature on the GitHub. |
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.
Added comments.
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.
Approved assuming that the open comments are resolved.
fb2d33b
to
7706210
Compare
d9e7681
to
c8f53d2
Compare
5a2ad70
to
cc89861
Compare
The latest preview SDK is 18323.. this PR is still targeting 18312 |
We can retarget in a subsequent change -- until the SDK for this release is finalized there's not too much reason to keep moving insider SDKs. You can use the Install-WindowsSdkISO.ps1 in the repo to install the archived ones. |
Merged PR 2627158: AnimatedVisualPlayer: Fix bug that AnimatedVisualPlayer does not accept hit-testing for pointer event handler The change is set a transparent background for AnimatedVisualPlayer(looks like UIElement, Element content panel in real) in ::OnLoaded. Element content panel has visual tree underneath for rendering. And a xaml element background child under this panel for hit-testing. Related work items: #19685745 merge PR 2638219: AnimatedVisualPlayer: Fix IsPlaying not working issue Merged PR 2644493: fix keyframe crossing bounds scenario issue This issue is caused by in-correct split crossing bounds key frame animation into two. when [fromKeyframe...toKeyframe] range is defined as [0.35...0], it is supposed to have two key frame animations, one is [0.35...1], another one is nothing. However, we have another one [1+10e-7, 0]. clearly 1 + 10e-7 is greater than 1 and crash the app. The fix is to check [fromKeyframe...toKeyframe] range value, when fromKeyframe > toKeyframe, but toKeyframe == 0, then simply correct toKeyframe to 1 to avoid additional key frame animation. Also, when fromKeyframe == 1, then simply correct fromKeyframe to 0 to save additional key frame animation as well. Related work items: #19757860 merge PR 2665041: [Lottie][Ship-Blocker] fix reverse negative playbackrate animation not working bug. merge PR 2670894: [Lottie][Ship-Blocker]Adding missing AVP bug fix test in WinUI correct some configuration or namespace missing issues. delete unrelated files. use codegen for dependency properties in AnimatedVisualPlayer. Removed experimental flags for AVP and abandoned other duplicate PR. Set the expected default values for dependency properties initialization in *idl file of AVP. Added build support for UseInsiderSDK. Added/corrected telemetry instrumenting code. Added callback registration macro for dependency properties in .idl if necessary. Automated test has being run and passed for AVP accessibility tests.
…more using USE_INTERNAL_SDK, auto test running AVP passed in nebula VM.
…lated. Correct Win2D 1.23.0 with Win2D 1.22.0 in WUXTestApp solution.
…d redundante header includes in AnimatedVisualPlayer.h
…tadataProviderWindowsCodeGen.tt
…ests.cs for windows build.
…ion in RS1|2|3 where RS4 API ICompositor5 QI failed and crash taef test app.
…void atlas test failures in RS3_desktop test run.
… test run happy in RS3.
…for commandbarflyout and slider/buttonInteraction test to filter them out.
…InternalSDK except AVP
… to USE_INTERNAL_SDK for razzle.
…ther issue; add prefxied.
cf437a9
to
d687630
Compare
🎉 Handy links: |
* merge AnimatedVisualPlayer change from winui_rs5 to master in GitHub. Merged PR 2627158: AnimatedVisualPlayer: Fix bug that AnimatedVisualPlayer does not accept hit-testing for pointer event handler The change is set a transparent background for AnimatedVisualPlayer(looks like UIElement, Element content panel in real) in ::OnLoaded. Element content panel has visual tree underneath for rendering. And a xaml element background child under this panel for hit-testing. Related work items: #19685745 merge PR 2638219: AnimatedVisualPlayer: Fix IsPlaying not working issue Merged PR 2644493: fix keyframe crossing bounds scenario issue This issue is caused by in-correct split crossing bounds key frame animation into two. when [fromKeyframe...toKeyframe] range is defined as [0.35...0], it is supposed to have two key frame animations, one is [0.35...1], another one is nothing. However, we have another one [1+10e-7, 0]. clearly 1 + 10e-7 is greater than 1 and crash the app. The fix is to check [fromKeyframe...toKeyframe] range value, when fromKeyframe > toKeyframe, but toKeyframe == 0, then simply correct toKeyframe to 1 to avoid additional key frame animation. Also, when fromKeyframe == 1, then simply correct fromKeyframe to 0 to save additional key frame animation as well. Related work items: #19757860 merge PR 2665041: [Lottie][Ship-Blocker] fix reverse negative playbackrate animation not working bug. merge PR 2670894: [Lottie][Ship-Blocker]Adding missing AVP bug fix test in WinUI correct some configuration or namespace missing issues. delete unrelated files. use codegen for dependency properties in AnimatedVisualPlayer. Removed experimental flags for AVP and abandoned other duplicate PR. Set the expected default values for dependency properties initialization in *idl file of AVP. Added build support for UseInsiderSDK. Added/corrected telemetry instrumenting code. Added callback registration macro for dependency properties in .idl if necessary. Automated test has being run and passed for AVP accessibility tests. * add AnimatedVisualPlayer and its test items into solution. massaging more using USE_INTERNAL_SDK, auto test running AVP passed in nebula VM. * restore to USE_INSIDER_SDK because of upgrading to SDK 18312 * upgrade RunTests/Build SDK version to insider SDK 18312. * Replace USE_INSIDER_SDK with USE_INTERNAL_SDK for CommandBarFlyout related. Correct Win2D 1.23.0 with Win2D 1.22.0 in WUXTestApp solution. * Removed Win2D.uwp package reference by updating LOttieLogo.cs. Removed redundante header includes in AnimatedVisualPlayer.h * Add CompositionObject into Windows.UI.Composition namesapce in XamlMetadataProviderWindowsCodeGen.tt * remove Windows.Foundation.Metadata direction in AnimatedVisualPlayerTests.cs for windows build. * remove AVP from windows build. * remove AVP from windows build in XamlMetadataProviderGenerated.tt * add os version check in AVP::UpdateContent to avoid source instantiation in RS1|2|3 where RS4 API ICompositor5 QI failed and crash taef test app. * remove hack of commenting out return null for OS check in TryCreateAnimatedVisual * More agressively to turn off USE_INSIDER_SDK to USE_INTERNAL_SDK to avoid atlas test failures in RS3_desktop test run. * fix merge conflicts. in TreeViewAutomationPeers.idl * more massaging from USE_INSIDER_SDK to USE_INTERNAL_SDK to maks ATLAS test run happy in RS3. * Keep USE_INSIDER_SDK consistent with recent master. USE_INTERNAL_SDK for commandbarflyout and slider/buttonInteraction test to filter them out. * switch all USE_INSIDER_SDK|UseInsiderSDK code to USE_INTERNAL_SDK|UseInternalSDK except AVP * work around to fix rs3 xbf issue with SDK 18312. turn USE_INSIDER_SDK to USE_INTERNAL_SDK for razzle. * Rmove Any CPU configurations from MUXControls.sln * switch some USE_INSTERNAL_SDK to USE_INSIDE_SDK. xbf work around for RS4 and RS5. * Resolve this pointer captured in m_batch; fix source revoker issue; other issue; add prefxied.
Full description of AVP(cited from simeon's words):
"The AnimatedVisualPlayer is a XAML FrameworkElement that hosts and controls animated Windows.UI.Composition content. This content is typically Lotties (see https://airbnb.design/lottie/) but can be anything that conforms to the IAnimatedVisualSource interface. The player is most typically used to display and control micro-animations within UI, for example an animated icon on a button.
To use the AnimatedVisualPlayer with Lottie files, see https://github.com/windows-toolkit/Lottie-Windows."
In this PR, I have made following changes: