Closed VideoSystems closed 12 months ago
Hi @VideoSystems. We have added the "needs reproduction" label to this issue, which indicates that we cannot take further action. This issue will be closed automatically in 5 days if we do not hear back from you by then - please feel free to re-open it if you come back to this issue after that time.
Apologies, here's a gihub link to a small example project that highlights the issue: https://github.com/VideoSystems/repos
I have been looking into this. I can confirm with Toolkit sample. If you switch sources position tracking stops working. Not an issue for windows. For android changing sources causes position tracking to break. But duration works fine. On IOS both position and duration are not working when you switch sources. This is tested against main.
edit: Tried testing on Mac. Was unable to verify as clicking on menu item to select source failed to work. Not sure but that appears to be unrelated issue. Will try manually doing in code behind to test. All testing was done against main as of November 21 2023.
Another note using sample app and selecting any item in source menu will have same effect. So both xaml and code behind will result in position not being tracked. It only works once. This does not affect windows at all. IOS, android both affected. Was unable to test on Mac with sample app. On mac the sample app menu for source fails to load. The issue with menu appears to an issue with Microsoft.Maui.Controls and nothing to do with position bug.
Hi, I can confirm that after upgrading my MediaElement from version 2 to 3 the problem with Position not being updated appeared on Android. Also PositionChanged is not being fired up. No problem on Windows though. Hopefully, this can be solved quickly as there are no alternative media players for MAUI. There is an option to revert to version 2, but this is not the direction we should sail, right?
This issue has been automatically marked as stale because it has been marked as requiring author feedback but has not had any activity for 3 days. It will be closed if no further activity occurs within 2 days of this comment. If it is closed, feel free to comment when you are able to provide the additional information and we will re-investigate.
Can someone mark this as open and not close it till my PR gets reviewed please? @pictos ? The OP did add a sample repo but did it as a reply and not as an edit.
@ne0rrmatrix which issue are you talking about? This one remains opened
@pictos it was updated a few minutes after I made that comment by @brminnick to keep it open.
This is my first post on GitHub, not sure if I'm required to take further action to progress this issue, but am happy to do whatever needed in terms of review or updates to get this solved.
@ne0rrmatrix , I see that you've made the edits to the code to get the Position working again. I'm using NuGet to get the MediaElement, do I simply need to wait until the next release to get the updated code in my project? Is there a different way I can/need to get the updates?
@VideoSystems welcome to the community. If you want you can download the PR and build it yourself and see if it fixes your issue. If you are not comfortable building the project yourself it will be out soon. I am waiting on a maintainer to look at it and verify that the code I submitted meets the code standards and does what it is supposed to. I imagine by the end of this week or early next week it should be merge to main. Fingers crossed.
You can also look at https://github.com/CommunityToolkit/Maui/wiki/Preview-Packages and learn more about how to use Pull requests as a nuget. There are two feeds on that page from azure. Latest which is the main feed. The pull request feed is the one where you can grab this PR.
Fantastic! Thanks for the information! 😁
I'm having the same issue. @ne0rrmatrix Thanks for the fix and hopefully the NuGet update will be released soon
I've hit the same issue - is it really unverified? Can we remove that tag?
It seems that @ne0rrmatrix was able to verify the issue and created a fix for it. Not sure how to get the tag changed though. Anxiously awaiting the new release with the fix!
Is there an existing issue for this?
Did you read the "Reporting a bug" section on Contributing file?
Current Behavior
After specifying a source in the C# backend, the MediaElement no longer reports the position of the video and PositionChanged never fires.
Expected Behavior
When the video is playing, or the SeekTo() is complete, the PositionChanged method should fire and the correct position of the video player should be reported.
Steps To Reproduce
Using the CommunityToolkit.Maui.Sample project, remove the Source of the MediaElement control from the XAML. Use the button to change the Source of the MediaElement to any other element. The Position no longer updates in the label, and the slider no longer works.
Link to public reproduction project repository
https://github.com/VideoSystems/repos
Environment
Anything else?
If you specify the source of the MediaElement in the MainPage() method, then the Position works just like specifying in the XAML.