Use Azure Media Services with PowerApps

You can now build PowerApps with media hosted on Azure Media Services. In this walkthrough, Contoso Corp. wants to build an online learning app for its employees with videos of their products and services.

Create a new Azure Media Services account, if you don’t have one already

From your Azure Media Services account, locate and publish your video assets from Settings > Assets.

Encode your videos. After the videos are published, copy the manifest URLs. Start the streaming endpoint of your service, if not already.

If you haven’t tried PowerApps, you can always sign-up for a trial using your work or school account. Download PowerApps Studio from the Windows Store. Alternatively, login to the PowerApps portal and choose New app.
Choose the Blank app > Tablet layout.

We want to build a gallery of all the available AMS videos and have the user pick a video to play. An Excel spreadsheet is a quick way to load the data to the app. Here is the Excel Table we will use with the links to the AMS video URLs:

From PowerApps, choose Content > Data sources. From the right panel, choose Add data source and Add static data to your app. Browse and load the Excel file.
From PowerApps, add a Horizontal Gallery control from Insert > Gallery > Custom gallery. Choose Add an item from Insert tab and add the Video control from Media.
Bind the Gallery to the Excel table by setting the Items property of the gallery to the name of the table.

Set the Media property of the first video control in the gallery to ThisItem.VideoURL. You should see the list of the AMS videos load in the gallery. Set the Disabled property for the video control to true.

Add a Video control from Insert > Media for the main video. Bind its Media property to Gallery1.Selected.VideoURL

You can also add text fields for the Title and description from the Excel file and show them in the app. The complete app is shown in the picture below:

You can learn more about building apps from the PowerApps documentation. For feedback and questions on AMS videos in PowerApps, please post them on our forums.

 

Happy app building!
Quelle: Azure

Published by