![]() Call the file's OpenAsync method to get an IRandomAccessStream for the file. Check to make sure the file isn't null, which it will be if the user cancels the picking operation. When this method returns, the result is a StorageFile object representing the video file. In the Click event handler for the button, create a new instance of the FileOpenPicker, add video file types to the FileTypeFilter collection, and set the starting location to the user's videos library.Ĭall PickSingleFileAsync to launch the file picker dialog. Īdd a button to let the user initiate picking a file. In your app's XAML file, add a MediaPlayerElement and set AreTransportControlsEnabled to true. To allow the user to open a video file to be played in the MediaPlayerElement control, add the following namespaces to your project. The simplest way to cast media from a Universal Windows app is to use the built-in casting capability of the MediaPlayerElement control. Built-in media casting with MediaPlayerElement ![]() This article shows you how to cast media to remote devices from a Universal Windows app.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |