Skip to content

Instantly share code, notes, and snippets.

@erfg12
Last active September 5, 2018 15:53
Show Gist options
  • Save erfg12/a16191008506b3eb3c321d7d92e1eeee to your computer and use it in GitHub Desktop.
Save erfg12/a16191008506b3eb3c321d7d92e1eeee to your computer and use it in GitHub Desktop.
Xamarin C# convert string to UriVideoSource
// need to use https://developer.xamarin.com/samples/xamarin-forms/CustomRenderers/VideoPlayerDemos/ FormsVideoLibrary class
// the function ConvertFromInvariantString is built in to this library class.
VideoSourceConverter p = new VideoSourceConverter();
UriVideoSource test = (UriVideoSource)p.ConvertFromInvariantString("http://commondatastorage.googleapis.com/gtv-videos-bucket/sample/ForBiggerFun.mp4");
videoPlayer.Source = test;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment