MediaElement stops playing after Android screen locks #2121
-
I'm hoping someone with MediaElement experience can provide some guidance. I'm having trouble playing internet hosted mp3 files on an Android device after the screen locks. After a few songs, MediaElement fails to play the next song, apparently with an UnknownHostException from ExoPlayer. This appears similar to a previous bug, but that bug was supposedly fixed with MediaElement 4.0. I have placed a barebones demonstration project on github. I made all of the platform specific additions mentioned by MediaElement's documentation. This little app works perfectly on iOS. The code is purposefully simple. Pick a URL at random and set the MediaElement's Source. When that media ends, do it again. Relevant lines: MainPage.xaml:
Mainpage.xml.cs:
Thanks in advance for any help. |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 4 replies
-
Please test further and get back to me. I will be happy to make any changes to media element once you determine what the exact issue is. I am in the process of adding Appium UI testing to the Community toolkit and in the future this should help developers automate all of this. |
Beta Was this translation helpful? Give feedback.
-
Gerald is planning for today or tomorrow. Fingers crossed 🤞
…On Thu, Aug 15, 2024, 08:50 sbalkum ***@***.***> wrote:
Excellent! Yes, the main branch works. I let my test play for 20 repeats
with the screen locked and then tried in my media player app and it played
an entire 1 hour playlist. I'm guessing this is bugfix #2052
<#2052>. Do you have an
estimated date when the nuget package will be updated?
—
Reply to this email directly, view it on GitHub
<#2121 (reply in thread)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AA7ZRN26EUKWKYNUIMLDOY3ZRTE37AVCNFSM6AAAAABMRGUYGWVHI2DSMVQWIX3LMV43URDJONRXK43TNFXW4Q3PNVWWK3TUHMYTAMZUHE2TCNA>
.
You are receiving this because you commented.Message ID:
***@***.***>
|
Beta Was this translation helpful? Give feedback.
-
Closed as Answered. |
Beta Was this translation helpful? Give feedback.
Can you test against the current main branch? The fix has not made it into public nuget yet. The last release was early July for media element.