Skip to content
This repository has been archived by the owner on May 1, 2024. It is now read-only.

[Bug] MediaElement bugs when 'IsLoop' is set to true #2002

Open
ZivFarin opened this issue Jan 24, 2024 · 3 comments
Open

[Bug] MediaElement bugs when 'IsLoop' is set to true #2002

ZivFarin opened this issue Jan 24, 2024 · 3 comments
Labels
bug Something isn't working. Breaky break.

Comments

@ZivFarin
Copy link

Description

When MediaElement's "IsLoop" is set to "True":

  1. [iOS] The MediaElement's "speed" (hardcoded to the xaml) is reset to 1 after the 1st iteration (which played at the wanted speed) is over.
  2. [iOS] Looping just stops after a while when several instances of MediaElement are running.
  3. [Android] Media controls are showing even though 'ShowsPlaybackControls' is set to "False".

Stack Trace

NaN

Link to Reproduction Sample

Steps to Reproduce

  1. Set both 'IsLoop=True' and a speed(<1 and >0)
  2. Play video on iOS device with iOS version >= 16
  3. Video\s would reset speed after first iteration is over

Expected Behavior

Speed will stay the same after first "loop"

Actual Behavior

Speed changes

Basic Information

On iOS: I believe this happens due to the usage of 'avPlayerViewController.Player?.Play()' instead of the renderer's Play() method (note that 'Play()' redefines the speed each time)

  • Version with issue: Latest (2.0.6)

  • Last known good version:

  • IDE:
    Visual studio community 2022 (64-bit) Version 17.8.5

  • Platform Target Frameworks: iOS Android

    • iOS: Xcode 15.1 15C65
    • Android: 13.0
    • UWP: X
  • Android Support Library Version: X

  • Nuget Packages: X

  • Affected Devices:

    • Android: galaxy-s20
    • iOS: Simulator, iphone-se(2020), iPad

Workaround

All bugs dissapeared when setting "IsLoop" to "False" and then using an event handler for 'MediaEnded' event to run MediaElement.Play();

Reproduction imagery

X

@ZivFarin ZivFarin added the bug Something isn't working. Breaky break. label Jan 24, 2024
@FedericoNembrini
Copy link
Contributor

Can't reproduce point 3, which version of Android are you testing on? Can you post the XAML?

@ZivFarin
Copy link
Author

ZivFarin commented Mar 5, 2024

As written - Android 13.
Can't share it... Sorry.

@FedericoNembrini
Copy link
Contributor

I tested IsLoop=True on an Android Emulator with Android 13.0 and I don't ecounter the error.

Can you test on other devices/emulators to better understand the casistics?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working. Breaky break.
Projects
None yet
2 participants