public async void Play(MediaElement mediaElement) { var amsResult = await AdaptiveMediaSource.CreateFromUriAsync(new Uri("http://player.pptvyun.com/svc/m3u8player/pl/0a2dnq6ZqaOgn6qL4K2eoqmVp-ydn6ieoKad.m3u8", UriKind.Absolute)); if (amsResult.Status == AdaptiveMediaSourceCreationStatus.Success) { await Dispatcher.RunAsync(CoreDispatcherPriority.Normal, () => { AdaptiveMediaSource ams = amsResult.MediaSource; mediaElement.SetMediaStreamSource(ams); mediaElement.Play(); }); }; }