Play videos in your game
C#using CI.WSANative.Media;
You must have the internet client capability enabled in the app manifest if you are playing content from the internet
Uri supports either a web url or the path to an embedded file starting with ms-appx:///
C#WSANativeMediaPlayer.Create(new WSAMediaPlayerSettings()
{
HorizontalPlacement = WSAHorizontalPlacement.Centre,
VerticalPlacement = WSAVerticalPlacement.Centre,
Height = 700,
Width = 700,
AreTransportControlsEnabled = true,
AutoPlay = true,
IsFullWindow = false,
Uri = new Uri("https://cdn.flowplayer.com/a30bd6bc-f98b-47bc-abf5-97633d4faea0/hls/de3f6ca7-2db3-4689-8160-0f574a5996ad/playlist.m3u8")
});
C#WSANativeMediaPlayer.Destroy();
C#WSANativeMediaPlayer.Play();
C#WSANativeMediaPlayer.Pause();
C#WSANativeMediaPlayer.SetPosition(TimeSpan.FromSeconds(30));
C#var duration = WSANativeMediaPlayer.Duration;
Listen to these events for info about the media players lifecycle
C#WSANativeMediaPlayer.MediaOpened
C#WSANativeMediaPlayer.MediaEnded
C#WSANativeMediaPlayer.MediaFailed