UWP MediaPlayerElement - how to loop/repeat mp4

2019-07-26 12:03发布

问题:

I have an mp4 that I need to repeat in a page.

How can this be achieved?

<MediaPlayerElement
    Grid.Row="0"
    Background="White"
    Source="{x:Bind MovieSource}"
    Width="900" 
    AutoPlay="True" >

</MediaPlayerElement>

I tried to use a storyboard but found out that MediaTimeline is not available in UWP.

Can't find a working alternative...

回答1:

The MediaPlayer property of the MediaPlayerElement class has an IsLoopingEnabled property.



标签: c# uwp mp4