You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
MediaStatePlayer.MediaStateChanged event should raise whenever a song loops. For example, the following code could be used:
MediaPlayer.MediaStateChanged+=HandleStateChange;
...
private void HandleStateChange(objectsender,EventArgse){System.Diagnostics.Debug.WriteLine($"State change at {DateTime.Now} to {MediaPlayer.State}");}
When running on a MonoGame DesktopGL project, this happens when it loops:
Statechange at 1/11/20259:39:22 AM to Stopped
State change at 1/11/20259:39:22 AM to Playing
On Blazor GL projects the events are not raised.
This is important because this can be used to detect when a song loops.
What version of KNI does the bug occur on:
KNI 3.14
What operating system are you using:
Windows11
What KNI platform are you using:
BlazorGL
The text was updated successfully, but these errors were encountered:
When HTMLMediaElement is set to loop = true, I didn't get any events when the loop restarts.
We could fake the loop, and restart the song manually when the song is finished, but that will introduce a gap between the loops.
or we could perhaps use the timeupdate event and currentTime property to detect a restart.
There is also the SongFinishedPlaying event, which I have to check if it's working in looped songs.
MediaStatePlayer.MediaStateChanged event should raise whenever a song loops. For example, the following code could be used:
When running on a MonoGame DesktopGL project, this happens when it loops:
On Blazor GL projects the events are not raised.
This is important because this can be used to detect when a song loops.
What version of KNI does the bug occur on:
What operating system are you using:
What KNI platform are you using:
The text was updated successfully, but these errors were encountered: