Ensure that PlayerInterop is always used on the UI thread

This commit is contained in:
Yoshi Askharoun
2023-05-07 14:24:44 -05:00
parent e0027ba726
commit 1844ea71eb
@@ -91,8 +91,11 @@ namespace Microsoft.Zune.Playback
private void PlaybackWrapper_UriSet(object sender, EventArgs e)
{
_playbackWrapper.UriSet -= PlaybackWrapper_UriSet;
_playbackWrapper.Play();
Iris.Application.DeferredInvoke(new Iris.DeferredInvokeHandler(delegate
{
_playbackWrapper.UriSet -= PlaybackWrapper_UriSet;
_playbackWrapper.Play();
}), Iris.DeferredInvokePriority.Normal);
}
public async Task Preload(PlaybackItem sourceConfig, CancellationToken cancellationToken = default)