unosquare / ffmediaelement

FFME: The Advanced WPF MediaElement (based on FFmpeg)
https://unosquare.github.io/ffmediaelement/
Other
1.17k stars 240 forks source link

player state Inaccurate values BUG #522

Closed a44281071 closed 3 years ago

a44281071 commented 4 years ago

Demo Code:

var player =new Unosquare.FFME.MediaElement();
// ..... load video.
await player.Play();
Console.WriteLine(player.IsPlaying);
// display:
// > false
Console.WriteLine(player.MediaState);
// display:
// > Play

correct value is true. But IsPlaying property read the result by MediaCore.Timing.IsRunning, this is not correct. But MediaState have a right play state, and return by AtomicInteger.Value.

Nuget package ver: 4.2.330 .net Framework: 4.6.1

stale[bot] commented 3 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

mariodivece commented 3 years ago

The IsPlaying property shows if the clock and the media are running. Sometimes it takes a few milliseconds to get the clocks and media streams going before this property is updated. This is by design.