Skip to content
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

Allow change position after MediaEnded event #1315

Conversation

niksedk
Copy link
Contributor

@niksedk niksedk commented Jul 31, 2023

Description of Change

Allow change position after MediaEnded event

The report-status-timer in this PR is:

  • started in OnMediaOpened (when a new media opened successfully)
  • stopped in OnSourcePropertyChanged (when opening a new media or setting media to null)

This will keep the status/positioning/progress-bar alive until the media is set to null or a new media is loaded, but dragging the progress-bar-position to the end, will not stop the status/positioning/progress-bar from being alive.

Linked Issues

@niksedk
Copy link
Contributor Author

niksedk commented Jul 31, 2023

@dotnet-policy-service agree

1 similar comment
@niksedk
Copy link
Contributor Author

niksedk commented Aug 1, 2023

@dotnet-policy-service agree

@pictos
Copy link
Member

pictos commented Aug 2, 2023

I'm pretty sure we have a good reason to keep the timer. So removing it doesn't look like the right solution

@niksedk
Copy link
Contributor Author

niksedk commented Aug 2, 2023

I'm pretty sure we have a good reason to keep the timer. So removing it doesn't look like the right solution

This PR is not removing the timer... it's keeping it active :)

The timer is started in OnMediaOpened

@pictos
Copy link
Member

pictos commented Aug 2, 2023

I'm pretty sure we have a good reason to keep the timer. So removing it doesn't look like the right solution

This PR is not removing the timer... it's keeping it active :)

The timer is started in OnMediaOpened

And we never stop the timer?

@niksedk
Copy link
Contributor Author

niksedk commented Aug 3, 2023

I'm pretty sure we have a good reason to keep the timer. So removing it doesn't look like the right solution

This PR is not removing the timer... it's keeping it active :)
The timer is started in OnMediaOpened

And we never stop the timer?

Ah, good point. OK, the ClearTimer is back. MediaElement will now stop the timer when setting the media source to null.

@niksedk niksedk requested a review from pictos August 18, 2023 15:00
@pictos
Copy link
Member

pictos commented Aug 28, 2023

@jfversluis can you take a look at this PR and make sure that it's fine to change the behavior of the timer? I believe this will be a breaking change anyway.

@brminnick brminnick added the needs discussion Discuss it on the next Monthly standup label Sep 7, 2023
@jfversluis jfversluis merged commit 21777e1 into CommunityToolkit:main Sep 8, 2023
8 checks passed
@niksedk niksedk deleted the feature/Allow-change-position-after-media-ended-event branch September 8, 2023 14:39
@brminnick brminnick removed the needs discussion Discuss it on the next Monthly standup label May 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[BUG] MediaElement StateChanged Event Position doesn't update after media has reached end
4 participants