Skip to content

fix(mpe): AutoPlay=false stuck in Opening state - #12581

Merged
Xiaoy312 merged 1 commit into
masterfrom
dev/xygu/20230608/mpe-autoplay-false
Jun 12, 2023
Merged

Xiaoy312 merged 1 commit into
masterfrom
dev/xygu/20230608/mpe-autoplay-false

Conversation

@Xiaoy312

@Xiaoy312 Xiaoy312 commented Jun 8, 2023 •

Copy link
Copy Markdown
Contributor

GitHub Issue (If applicable): closes #12535

PR Type

What kind of change does this PR introduce?

  • Bugfix

What is the new behavior?

Setting MPE.AutoPlay=false no longer cause the media player to be stuck in the Opening state for wasm, ios/macos and android.

Copilot Summary

🤖 Generated by Copilot at eb750a5

This pull request fixes the playback state of media player elements that have a source but not autoplay on various platforms. It updates the MediaPlayerExtension class and the MediaPlayer classes for Android, iOS, and macOS to set the playback state to paused when the media player is prepared or ready to play. It also adds a new test case in Given_MediaPlayerElement.cs to verify this behavior.

PR Checklist

Please check if your PR fulfills the following requirements:

Other information

@github-actions github-actions Bot added platform/android 🤖 Categorizes an issue or PR as relevant to the Android platform platform/ios 🍎 Categorizes an issue or PR as relevant to the iOS platform platform/macos 🍏 Categorizes an issue or PR as relevant to the macOS platform labels Jun 8, 2023
@Xiaoy312
Xiaoy312 force-pushed the dev/xygu/20230608/mpe-autoplay-false branch from b0aa08c to eb750a5 Compare June 8, 2023 21:30
@Xiaoy312
Xiaoy312 force-pushed the dev/xygu/20230608/mpe-autoplay-false branch from 2afb053 to 9a1b955 Compare June 8, 2023 22:16

@ajpinedam ajpinedam left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🚀 nice!

@Xiaoy312
Xiaoy312 force-pushed the dev/xygu/20230608/mpe-autoplay-false branch 3 times, most recently from 3ff08c9 to 0e74c04 Compare June 9, 2023 20:52
@Xiaoy312
Xiaoy312 enabled auto-merge June 9, 2023 20:52
@Xiaoy312
Xiaoy312 force-pushed the dev/xygu/20230608/mpe-autoplay-false branch from 0e74c04 to 204a034 Compare June 11, 2023 05:33
@nventive-devops

Copy link
Copy Markdown
Contributor

The build 82295 found UI Test snapshots differences: android-28-xamarin: 41, android-28-xamarin-Snap: 90, ios: 27, ios-Snap: 82, macOS-screenshots: 24, skia-gtk-screenshots: 15, skia-wpf-screenshots: 16, wasm: 40, wasm-automated-net7.0-UWP-Benchmarks: 0, wasm-automated-net7.0-UWP-Default: 13, wasm-automated-net7.0-UWP-RuntimeTests: 0, wasm-automated-net7.0-WinUI-RuntimeTests: 0

Details
  • android-28-xamarin: 41 changed over 832

    🚨🚨 Comparison Details (first 20) 🚨🚨
    • CommandBar_LongTitle_Validation_CommandBar_-_LongTitle_-_4_-_Orientation_Landscape
    • CommandTest_UITests_Microsoft_UI_Xaml_Controls_SplitButtonTests_SplitButtonPage
    • DecimalFormatterTest_UITests_Shared_Microsoft_UI_Xaml_Controls_NumberBoxTests_NumberBoxPage
    • FocusManager_GetFocusedElement_CheckBox_LostFocus_Validation_Uno_UI_Samples_Content_UITests_FocusTests_FocusManager_GetFocus_Automated
    • FocusManager_GetFocusedElement_ComboBox_LostFocus_Validation_Uno_UI_Samples_Content_UITests_FocusTests_FocusManager_GetFocus_Automated
    • FocusManager_GetFocusedElement_HyperlinkButton_Validation_FocusManager_-_GetFocusedElement_-_HyperlinkButton_-_1_-_Initial_State
    • FocusManager_GetFocusedElement_HyperlinkButton_Validation_FocusManager_-_GetFocusedElement_-_HyperlinkButton_-_2_-_Click_outside
    • FocusManager_GetFocusedElement_HyperlinkButton_Validation_Uno_UI_Samples_Content_UITests_FocusTests_FocusManager_GetFocus_Automated
    • FocusManager_GetFocusedElement_ListViewItem_LostFocus_Validation_FocusManager_-_LostFocus_-_ListViewItem_-_1_-_Initial_State
    • FocusManager_GetFocusedElement_ListViewItem_LostFocus_Validation_FocusManager_-_LostFocus_-_ListViewItem_-_2_-_Click_outside
    • FocusManager_GetFocusedElement_ListViewItem_LostFocus_Validation_Uno_UI_Samples_Content_UITests_FocusTests_FocusManager_GetFocus_Automated
    • FocusManager_GetFocusedElement_TextBoxSingleLine_LostFocus_Validation_Uno_UI_Samples_Content_UITests_FocusTests_FocusManager_GetFocus_Automated
    • FocusManager_GetFocusedElement_ToggleButton_LostFocus_Validation_Uno_UI_Samples_Content_UITests_FocusTests_FocusManager_GetFocus_Automated
    • Keyboard_Textbox_NoScrollViewer_Validation_5_-_Remove_Focus_on_numberTextBox
    • ListView_ExpandableItemLarge_ExpandHeaderWithMultipleItems_Validation_Expanded_State
    • ListView_ExpandableItem_ExpandMultipleItems_Expanded_State
    • ListView_SelectedItems_SamplesApp_Windows_UI_Xaml_Controls_ListView_ListViewSelectedItems
    • MinMaxTest_UITests_Shared_Microsoft_UI_Xaml_Controls_NumberBoxTests_NumberBoxPage
    • NativeCommandBar_Size_Uno_UI_Samples_Content_UITests_CommandBar_CommandBar_Dynamic
    • ProgressRing_IsEnabled_Running_UITests_Windows_UI_Xaml_Controls_ProgressRing_WindowsProgressRing_GH1220
  • android-28-xamarin-Snap: 90 changed over 1040

    🚨🚨 Comparison Details (first 20) 🚨🚨
    • Clipping_UITests_Shared_Windows_UI_Xaml_Clipping_ClippingToControlBounds_UITests_Shared_Windows_UI_Xaml_Clipping_ClippingToControlBounds
    • ColorPicker_WinUIColorPickerPage_UITests_Shared_Microsoft_UI_Xaml_Controls_ColorPickerTests_WinUIColorPickerPage
    • ComboBox_UITests_Shared_Windows_UI_Xaml_Controls_ComboBox_ComboBox_VisibleBounds_UITests_Shared_Windows_UI_Xaml_Controls_ComboBox_ComboBox_VisibleBounds
    • Default_UITests_Toolkit_ElevatedView_Levels_UITests_Toolkit_ElevatedView_Levels
    • DragAndDrop_UITests_Windows_UI_Xaml_DragAndDrop_DragDrop_ListView_Custom_States_UITests_Windows_UI_Xaml_DragAndDrop_DragDrop_ListView_Custom_States
    • Expander_WinUIExpanderPage_UITests_Shared_Microsoft_UI_Xaml_Controls_ExpanderTests_WinUIExpanderPage
    • Default_SamplesApp_Wasm_Windows_UI_Xaml_Controls_ListView_ListView_IsSelected_SamplesApp_Wasm_Windows_UI_Xaml_Controls_ListView_ListView_IsSelected
    • GridView_Uno_UI_Samples_Content_UITests_GridView_GridViewFirstVisibleIndex_Uno_UI_Samples_Content_UITests_GridView_GridViewFirstVisibleIndex
    • Flyouts_Flyout_LargeContent_UITests_Shared_Windows_UI_Xaml_Controls_Flyout_Flyout_LargeContent
    • Flyouts_Flyout_Simple_Uno_UI_Samples_Content_UITests_Flyout_Flyout_Simple
    • Flyouts_Flyout_Target_Uno_UI_Samples_Content_UITests_Flyout_Flyout_Target
    • Gesture_Recognizer_Pointer_Events_test_bench_UITests_Shared_Windows_UI_Input_GestureRecognizer_PointersEvents
    • Gesture_Recognizer_UITests_Shared_Windows_UI_Input_GestureRecognizerTests_HoldingTests_UITests_Shared_Windows_UI_Input_GestureRecognizerTests_HoldingTests
    • Grid_GridWithColumnSpan_Uno_UI_Samples_Content_UITests_GridTestsControl_GridWithColumnSpan
    • Grid_Grid_MinWidth_MaxWidth_UITests_Shared_Windows_UI_Xaml_Controls_GridTestsControl_Grid_MinWidth_MaxWidth
    • Icons_UITests_Microsoft_UI_Xaml_Controls_ImageIconTests_ImageIconPage_UITests_Microsoft_UI_Xaml_Controls_ImageIconTests_ImageIconPage
    • Image_ImageSourceStream_Uno_UI_Samples_UITests_ImageTestsControl_ImageSourceStream
    • Image_UITests_Windows_UI_Xaml_Controls_ImageTests_SvgImageSource_FromStream_UITests_Windows_UI_Xaml_Controls_ImageTests_SvgImageSource_FromStream
    • Image_UITests_Windows_UI_Xaml_Controls_ImageTests_SvgImageSource_NoSize_UITests_Windows_UI_Xaml_Controls_ImageTests_SvgImageSource_NoSize
    • ListView_HorizontalListView_Templates_SamplesApp_Windows_UI_Xaml_Controls_ListView_HorizontalListView_Templates
  • ios: 27 changed over 291

    🚨🚨 Comparison Details (first 20) 🚨🚨
    • DatePicker_Flyout_DatePicker_-_Flyout
    • Keyboard_Textbox_NoScrollViewer_Validation_2_-_Remove_Focus_on_placeholderTextTextBox
    • Keyboard_Textbox_NoScrollViewer_Validation_4_-_Remove_Focus_on_multilineTextBox
    • Keyboard_Textbox_NoScrollViewer_Validation_5_-_Remove_Focus_on_numberTextBox
    • Keyboard_Textbox_NoScrollViewer_Validation_0_-_Remove_Focus_on_normalTextBox
    • Keyboard_Textbox_NoScrollViewer_Validation_1_-_Remove_Focus_on_filledTextBox
    • NativeCommandBar_Size_SecondOrientation
    • ProgressRing_IsEnabled_Running_UITests_Windows_UI_Xaml_Controls_ProgressRing_WindowsProgressRing_GH1220
    • ProgressRing_Visibility_Collapsed_UITests_Windows_UI_Xaml_Controls_ProgressRing_WindowsProgressRing_GH1220
    • Screenshots_Image_Stretch_Alignment_Bigger_Mode-1
    • Screenshots_Image_Stretch_Alignment_Bigger_Mode-2
    • Screenshots_Image_Stretch_Alignment_Taller_Mode-1
    • Screenshots_Image_Stretch_Alignment_Taller_Mode-2
    • Screenshots_Image_Stretch_Alignment_Wider_Mode-1
    • TextBox_BeforeTextChanging_UITests_Shared_Windows_UI_Xaml_Controls_TextBoxTests_TextBox_BeforeTextChanging
    • TextBox_RoundedCorners_UITests_Shared_Windows_UI_Xaml_Controls_TextBoxTests_TextBox_RoundedCorners
    • TextBox_UpdatedBinding_On_OneWay_Mode_UITests_Windows_UI_Xaml_Controls_TextBox_TextBox_Bindings
    • Screenshots_Image_Stretch_Algmnt_Inf_Horizontal_Mode-1
    • Screenshots_Image_Stretch_Algmnt_Inf_Horizontal_Mode-2
    • Screenshots_Image_Stretch_Alignment_Wider_Mode-2
  • ios-Snap: 82 changed over 1031

    🚨🚨 Comparison Details (first 20) 🚨🚨
    • Automation_UITests_Shared_Windows_UI_Xaml_Automation_AutomationProperties_Name_UITests_Shared_Windows_UI_Xaml_Automation_AutomationProperties_Name
    • AutoSuggestBox_UITests_Windows_UI_Xaml_Controls_AutoSuggestBoxTests_AutoSuggestBox_Description_UITests_Windows_UI_Xaml_Controls_AutoSuggestBoxTests_AutoSuggestBox_Description
    • Border_AutoBorderStretchwithleftmargin_Uno_UI_Samples_UITests_BorderTestsControl_AutoBorderStretchwithleftmargin
    • Brushes_ImageBrushStretch_Uno_UI_Samples_UITests_ImageBrushTestControl_ImageBrushStretch
    • Animations_DoubleAnimation_TranslateX_GenericApp_Views_Content_UITests_Animations_DoubleAnimation_TranslateX
    • Animations_UITests_Windows_UI_Xaml_Media_Animation_ColorAnimation_Background_UITests_Windows_UI_Xaml_Media_Animation_ColorAnimation_Background
    • AutoSuggestBox_UITests_Windows_UI_Xaml_Controls_AutoSuggestBoxTests_AutoSuggestBox_Reason_UITests_Windows_UI_Xaml_Controls_AutoSuggestBoxTests_AutoSuggestBox_Reason
    • Border_Border_Simple_with_Opacity_Uno_UI_Samples_UITests_BorderTestsControl_Border_Simple_with_Opacity
    • Brushes_ImageBrushAlignmentXY_Uno_UI_Samples_UITests_ImageBrushTestControl_ImageBrushAlignmentXY
    • Clipping_SamplesApp_Windows_UI_Xaml_Clipping_XamlButtonWithClipping_SamplesApp_Windows_UI_Xaml_Clipping_XamlButtonWithClipping
    • CommandBar_CommandBar_Xaml_Automated_UITests_Shared_Windows_UI_Xaml_Controls_CommandBar_CommandBar_Xaml_Automated
    • Buttons_UITests_Microsoft_UI_Xaml_Controls_RadioButtonsTests_RadioButtonsBasicPage_UITests_Microsoft_UI_Xaml_Controls_RadioButtonsTests_RadioButtonsBasicPage
    • ContentControl_ContentControl_Nested_TemplatedParent_Uno_UI_Samples_Content_UITests_ContentControlTestsControl_ContentControl_Nested_TemplatedParent
    • Default_SamplesApp_Wasm_Windows_UI_Xaml_Controls_ComboBox_ComboBox_Empty_SamplesApp_Wasm_Windows_UI_Xaml_Controls_ComboBox_ComboBox_Empty
    • GridView_Uno_UI_Samples_Content_UITests_GridView_GridView_Vertical_MaxItemWidth_Uno_UI_Samples_Content_UITests_GridView_GridView_Vertical_MaxItemWidth
    • Grid_Grid_DataBound_ColumnRow_Definitions_Uno_UI_Samples_Content_UITests_GridTestsControl_Grid_DataBound_ColumnRow_Definitions
    • Grid_Grid_with_UserControl_VerticalAlignment_Variable_Height_Uno_UI_Samples_Content_UITests_GridTestsControl_Grid_with_UserControl_VerticalAlignment_Variable_Height
    • Grid_Quadrant_absolute_split_Uno_UI_Samples_Content_UITests_GridTestsControl_Quadrant_absolute_split
    • Grid_Grid_with_OutOfRange_Cells_UITests_Shared_Windows_UI_Xaml_Controls_GridTestsControl_Grid_with_OutOfRange_Cells
    • Icons_UITests_Windows_UI_Xaml_Controls_IconSourceTests_IconSourceElementTests_UITests_Windows_UI_Xaml_Controls_IconSourceTests_IconSourceElementTests
  • macOS-screenshots: 24 changed over 1114

    🚨🚨 Comparison Details (first 20) 🚨🚨
    • ColorPicker-WinUIColorPickerPage.png
    • Grid-CenteredGridinGridwiththreefixedsizechildren.png
    • Image-Image_Stretch_Alignment_Smaller.png
    • Image-Image_Fixed_Size_Alignment.png
    • Image-Image_Stretch_Alignment_Bigger.png
    • ListView-ListView_Selection_Pointers.png
    • ListView-ListView_With_ListViews_Count_Measure.png
    • MediaPlayerElement-MediaPlayerElement_Stretch_Fill.png
    • MediaPlayerElement-Using .3gp.png
    • MUX-WinUIProgressRingPage.png
    • MUX-WinUIProgressRing_CustomSources.png
    • NavigationView-NavigationViewItemTemplatePage.png
    • MUX-NavigationViewMenuItemStretchPage.png
    • MUX-NavigationViewPage.png
    • MUX-NavigationViewRS4Page.png
    • MUX-PersonPicturePage.png
    • NavigationView-NavigationViewRS4Page.png
    • Pickers-TimePicker_Flyout_Automated_Reload.png
    • Progress-ProgressRingHeightTest.png
    • Progress-WinUIProgressRingPage.png
  • skia-gtk-screenshots: 15 changed over 1112

    🚨🚨 Comparison Details (first 20) 🚨🚨
    • Brushes-Ellipse.png
    • Image-UniformToFill100x100.png
    • ListView-ListViewSelectedItems.png
    • MUX-WinUIProgressRingPage.png
    • MUX-WinUIProgressRing_CustomSources.png
    • Pickers-CalendarView_Theming.png
    • PipsPager-PipsPagerExamples.png
    • MUX-NavigationViewPage.png
    • Progress-ProgressRingHeightTest.png
    • Progress-WindowsProgressRing_GH1220.png
    • Progress-WinUIProgressRingPage.png
    • Progress-WinUIProgressRing_CustomSources.png
    • Progress-WinUIProgressRing_Features.png
    • Pointers-ListView_Selection_Pointers.png
    • WinUI-PipsPagerExamples.png
  • skia-wpf-screenshots: 16 changed over 1112

    🚨🚨 Comparison Details (first 20) 🚨🚨
    • DragAndDrop-DragDrop_TestPage.png
    • ListView-ListViewSelectedItems.png
    • Image-UniformToFill100x100.png
    • MUX-TabViewPage.png
    • MUX-WinUIProgressRingPage.png
    • MUX-WinUIProgressRing_CustomSources.png
    • Pickers-CalendarView_Theming.png
    • PipsPager-PipsPagerExamples.png
    • Progress-ProgressRingHeightTest.png
    • Progress-WindowsProgressRing_GH1220.png
    • Progress-WinUIProgressRingPage.png
    • Progress-WinUIProgressRing_CustomSources.png
    • Progress-WinUIProgressRing_Features.png
    • TabView-TabViewPage.png
    • Transform-TransformToVisual_Translate2d.png
    • WinUI-PipsPagerExamples.png
  • wasm: 40 changed over 1037

    🚨🚨 Comparison Details (first 20) 🚨🚨
    • initial_state
    • MUXControlsTestApp.NavigationViewAnimationPage
    • MUXControlsTestApp.NavigationViewBlankPage1
    • MUXControlsTestApp.NavigationViewPage
    • MUXControlsTestApp.NavigationViewRS4Page
    • MUXControlsTestApp.NavigationViewTopNavOnlyPage
    • MUXControlsTestApp.NavigationViewTopNavPage
    • MUXControlsTestApp.PipsPagerExamples
    • MUXControlsTestApp.PipsPagerPage
    • SamplesApp.Samples.NavigationViewSample.NavigationViewSample
    • SamplesApp.Wasm.Windows_UI_Xaml_Controls.ListView.ListView_IsSelected
    • SamplesApp.Windows_UI_Xaml_Controls.ListView.ListViewLargeHeader
    • SamplesApp.Windows_UI_Xaml_Controls.ListView.ListViewSelectedItems
    • UITests.Microsoft_UI_Xaml_Controls.ProgressRing.ProgressRingHeightTest
    • UITests.Microsoft_UI_Xaml_Controls.ProgressRing.WinUIProgressRingPage
    • UITests.Microsoft_UI_Xaml_Controls.ProgressRing.WinUIProgressRing_CustomSources
    • UITests.Microsoft_UI_Xaml_Controls.ProgressRing.WinUIProgressRing_Features
    • UITests.Microsoft_UI_Xaml_Controls.TabViewTests.TabViewPage
    • UITests.Shared.Microsoft_UI_Xaml_Controls.ColorPickerTests.WinUIColorPickerPage
    • UITests.Shared.Windows_UI_Xaml_Controls.ListView.ListView_Explicit_Items
  • wasm-automated-net7.0-UWP-Benchmarks: 0 changed over 1

  • wasm-automated-net7.0-UWP-Default: 13 changed over 890

    🚨🚨 Comparison Details (first 20) 🚨🚨
    • ImageStretch_None_Uno_UI_Samples_UITests_ImageTestsControl_Image_Stretch_None
    • ListView_SelectedItems_SamplesApp_Windows_UI_Xaml_Controls_ListView_ListViewSelectedItems
    • Popup_PlacementTest_3Default_HCVC_Uno_UI_Samples_Content_UITests_Popup_Popup_HVAlignments
    • SequentialAnimations_SamplesApp_Windows_UI_Xaml_Media_Animation_SequentialAnimationsPage
    • TestProgressRing_InitialState_UITests_Microsoft_UI_Xaml_Controls_ProgressRing_WinUIProgressRing_Features
    • When_ExtendedSelectionWithoutItemClick_Then_PointersEvents_UITests_Windows_UI_Xaml_Controls_ListView_ListView_Selection_Pointers
    • When_MultipleSelectionWithoutItemClick_Then_PointersEvents_UITests_Windows_UI_Xaml_Controls_ListView_ListView_Selection_Pointers
    • When_NoSelectionWithItemClick_Then_PointersEvents_UITests_Windows_UI_Xaml_Controls_ListView_ListView_Selection_Pointers
    • When_NoSelection_Then_PointersEvents_UITests_Windows_UI_Xaml_Controls_ListView_ListView_Selection_Pointers
    • When_SingleSelectionWithItemClick_Then_PointersEvents_UITests_Windows_UI_Xaml_Controls_ListView_ListView_Selection_Pointers
    • When_SingleSelectionWithoutItemClick_Then_PointersEvents_UITests_Windows_UI_Xaml_Controls_ListView_ListView_Selection_Pointers
    • When_Theme_Changed_No_Crash_UITests_Windows_UI_Xaml_Controls_CalendarView_CalendarView_Theming
    • When_TransformToVisual_ScrollViewer_UITests_Shared_Windows_UI_Xaml_UIElementTests_TransformToVisual_ScrollViewer
  • wasm-automated-net7.0-UWP-RuntimeTests: 0 changed over 1

  • wasm-automated-net7.0-WinUI-RuntimeTests: 0 changed over 1

@Xiaoy312
Xiaoy312 merged commit 1c9118f into master Jun 12, 2023
@Xiaoy312
Xiaoy312 deleted the dev/xygu/20230608/mpe-autoplay-false branch June 12, 2023 11:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

platform/android 🤖 Categorizes an issue or PR as relevant to the Android platform platform/ios 🍎 Categorizes an issue or PR as relevant to the iOS platform platform/macos 🍏 Categorizes an issue or PR as relevant to the macOS platform

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[MPE][Wasm] Setting the AutoPlay property to false removes hides the MTC buttons

4 participants