This project is read-only.

PlaylistPlugin.SkipBackThreshold doesn't seem to work

Topics: Windows 8 Xaml
Feb 14, 2013 at 6:20 AM
When I set SkipBackThreshold to be something different than TimeSpan.Zero, I can go back from playlist item 1 to playlist item 0 by skipping back. This is good.

However, when the player starts playing playlist item 0, the player's position is at the beginning of item 0, and not from a few seconds before the end, as one might reasonably expect.

Maybe I've misunderstood the intention here?

Feb 15, 2013 at 12:03 AM
mfeingol, we always start playlistitems at the beginning but you can set playlistItem.StartupPosition if you'd like to start at a specific position when the playlist item is loaded.
Feb 18, 2013 at 11:55 PM
Oh, interesting. Okay, I'll give that a try.
Feb 20, 2013 at 11:43 PM
Update: it works.

However, there's one subtlety I observed that might be a PF bug.

Say I have two playlist items, 0 and 1. When I play item 0 to the end, I receive a MediaEnded notification. If AutoAdvance is false, then I can do StartupPosition accounting and move to the next playlist item. Great. However, if I'm almost at the end of part 0 and I skip ahead to part 1, then part 1 starts playing but I don't receive a MediaEnded notification.

So my StartupPosition accounting ended up in MediaLoading. Which is fine, but it was somewhat surprising to not receive MediaEnded.
Feb 27, 2013 at 7:20 PM
This is expected behavior. The MediaEnded event only fires when you actually play all the way to the end. MediaLoading is a good place to put your code -- or you could use the MediaClosed event.