Gu.Wpf.Media icon indicating copy to clipboard operation
Gu.Wpf.Media copied to clipboard

Looping feature

Open julesx opened this issue 8 years ago • 4 comments

Could you add a setting to loop the video continuously?

julesx avatar Feb 09 '17 19:02 julesx

Yeah it would be nice, @milleniumbug asked about it also. What is a good name for a property like that? Loop Repeat

JohanLarsson avatar Feb 09 '17 20:02 JohanLarsson

LoopsEndlessly or Repeating maybe.

tbh my workaround was like 6 lines, so I don't feel very strongly about this feature.

milleniumbug avatar Feb 09 '17 20:02 milleniumbug

The built-in looping could be improved over my workaround if, some time before the end, the control would pre-load the start of the film so it would be able to start it again without any delay.

milleniumbug avatar Feb 09 '17 21:02 milleniumbug

You could have a property Loop and, on MediaEnded, simply execute:

if (Loop)
{
    MediaElement.Stop();
    MediaElement.Play();
}

ghost avatar Jun 28 '17 13:06 ghost