Do you want to know how to play videos from SharePoint in PowerApps? This tutorial is everything about Power Apps play video from SharePoint. , also I will explain to you Power Apps Video Control and Power Apps Audio Control.
We will see the key properties of the Power App audio and Video controls and how to add the Power App audio and Video controls into a canvas app in Power Apps.
We will cover:
- Power Apps play videos from SharePoint
- How to use the Power Apps play sound.
- Working with the Power Apps stream video
Power Apps Video Control
- The PowerApps Video Control is a user interface element designed to enable the playback of video files from different sources, including YouTube and Azure Media Services, within a PowerApps app.
- A video control is capable of playing video content from either a file, YouTube, or Azure Media Services. Closed captions can also be displayed when enabled.
Note:
Closed captions might not be accessible for specific videos hosted on Azure Media Services.
Power Apps Audio Control
- Power Apps audio controls allow users to upload an audio file from their local system to the Power Apps designer page.
- The Audio control is capable of playing audio clips from a file, recording from a microphone control, or the audio track of a video file.
Power Apps Audio and Video Control Properties
Here, we will discuss the key properties of the Power Apps audio and video controls.
Refer to the below screenshot:
Property | Description |
AutoPause | If a user navigates to a different screen, both audio and video clips should pause automatically |
AutoStart | This feature involves determining whether to enable automatic playback of audio or video controls when the user navigates to the screen containing the respective control |
ClosedCaptionsURL | It is only for video control, you must provide the URL of the closed caption file in WebVTT format. It’s essential to ensure both the video and captions URLs are HTTPS-compliant, and the server hosting both files is CORS enabled |
DisplayMode | This control can either allow user input (Edit), only display data (View), or be disabled (Disabled) |
Fill | The color that serves as the background for a control |
Image | The term that describes the name of the image displayed in an image, audio, or microphone control is called the “image label” or “image name” |
ImagePosition | When an image is not the same size as the screen or control, its position can be adjusted using one of the following options: Fill, Fit, Stretch, Tile, or Center |
OnEnd | Here are the recommended actions to perform when an audio or video clip finishes playing |
OnPause | Here are some recommended actions to execute when a user pauses an audio or video control |
OnStart | Listed the actions to be taken when a user initiates recording via a microphone control |
Paused | This statement returns “true” if a media playback control is presently paused, and “false” if it is not |
Reset | whether a control returns to its default value |
Start | Whether an audio or video clip plays |
StartTime | The duration that elapses between initiating an audio or video clip and the commencement of playback |
Time | A media control’s current position |
Visible | Whether a control visible or is hidden |
These are the key factors of the Power Apps Audio and Video control.
Add Power Apps Audio Control to Canvas App
Now, we will see how to add a Power Apps Audio control. To do so, follow the below-mentioned steps. Such as:
1. Open Power Apps -> Create a Blank canvas app as shown below.
2. On the Power Apps Screen -> Insert an Audio Control under the Media dropdown like below.
3. Once you added the Audio control by default, the Media property is “SampleAudio,“ and the Audio control name is “Audio1” as in the screenshot below.
4. Similarly, insert a Video control under the Media dropdown. Once you add Video control by default, the Media property is “SampleVideo” and the Video control name is “Video1” as in the screenshot below.
This is how to add the Power Apps Audio and Video controls to a canvas app.
Power Apps Play Audio and Video Control
This section will show how to play Audio and Video control in the Power Apps canvas app.
Example -1: Play Audio File in PowerApps
- To play an audio file, first select the Audio control you added to the screen. Then, navigate to the “Properties” pane and click on + Add media file.
- From there, browse and select the desired audio file from your local system and click “Open”. The audio file will now be added to the Audio control. Save your changes and preview the app.
- You can then play the audio clip by clicking the play button on the control you added. The clip will continue playing until you tap the control to pause it.
Refer to the below screenshot:
Example -2: Play Video File in PowerApps
To play a video file in the Power Apps, follow these steps:
- Select the Video control that you have added to the screen.
- Go to the “Properties” pane.
- Select “+ Add media file”.
- Browse and select the video file from your local system.
- Click “Open”.
- The video file will now be added to the Video control.
- Save and preview the app and then play the video.
- Hover over the video control to reveal the play button.
- You can also maximize and minimize the screen by using the full-screen icon that appears on the video.
Refer to the below screenshot:
This is all about the Power Apps play Audio and Video control.
Power Apps Play Video from SharePoint
Now, I will explain the Power Apps play video from the SharePoint with a simple scenario:
Scenario:
I have a SharePoint document library named “Animal Documents” with two mp4 file videos. Now, I want to play this video clip in the PowerApps.
Refer to the below screenshot:
Let us now see how to play these two video files in a Power Apps canvas app.
1. On the Power Apps Screen -> Insert a Gallery control and set its Items property to the code below.
Items = 'Animal Documents'
Where,
- ‘Animal Documents’ = SharePoint Document Library
2. Select the gallery control and make its Layout as a Title. Select one section of the gallery and expand the data card vertically.
3. Insert a video control and set this below code to its Media property as:
Media = ThisItem.'Link to item'
4. Now Save, publish, and preview the app. Play the video by tapping the play button of the video control, as shown below.
This is how to play video files in Power Apps from SharePoint.
Power Apps Stream Video
Lastly, we will discuss working with the Power Apps Stream video. To do so, follow the below steps.
1. On the Power Apps Screen -> Go to the Insert tab -> Media -> Select Microsoft Stream. Then, the PowerApps stream will appear on the screen as shown below.
2. Go to the Microsoft Stream and select one video that you want to play in the Power Apps. Click on the Share icon (to get the link to the selected video) that is presented below in the streaming video.
3. The Microsoft stream video link will appear like the below screenshot. To copy the link, just tap on the Copy button.
4. Next, go back to the PowerApps screen. Select the Power Apps Stream control and paste the copied URL on its Stream URL property.
StreamUrl = https://web.microsoftstream.com/video/fc340f3b-1f9a-4405--a54f-1d59e73295ef
5. Now, it’s ready to play the streaming video on the screen. Just save and preview the app. Play the video by tapping the play button, as shown below.
This is all about the Power Apps stream video.
Conclusion
I trust this Power Apps tutorial taught in detail information about the Power Apps play video from SharePoint. Then, we learned what Power Apps Video Control and Power Apps Audio Control are.
Also, we discussed the key properties of the Power Apps Audio and Video controls and how to add the Power Apps Audio and Video controls.
Additionally, we will discuss the below topics. Such as:
- Power Apps play video from SharePoint
- How to use the Power Apps play sound
- Working with the Power Apps stream video
You may also like:
- Power Apps List Box Control
- Power Apps Split Text Into Collection
- Patch Power Apps Collection to SharePoint List
- How to Embed Power Apps in SharePoint?
I am Bijay a Microsoft MVP (10 times – My MVP Profile) in SharePoint and have more than 17 years of expertise in SharePoint Online Office 365, SharePoint subscription edition, and SharePoint 2019/2016/2013. Currently working in my own venture TSInfo Technologies a SharePoint development, consulting, and training company. I also run the popular SharePoint website EnjoySharePoint.com
Hi there, Thanks for this informative article. What’s the best way to embed a video in an app that will be shared with external/guest users as well?