› Dynamics 365, Enterprise › Media Controls in Power App

Media Controls in Power App

 Vaishali Vyas   Leave a comment

Introduction:

Working with Media controls in Power Apps

Media Controls:

There are 7 Media controls in Power Apps

  1. Image
  2. Camera
  3. Barcode
  4. Audio
  5. Video
  6. Microphone
  7. Add Picture

Image Control:

Shows an image from, for example, a local file or a data source.

Description: If you add one or more Image controls to your app, you can show individual images that aren’t part of a data set, or you can incorporate images from records in data sources.

Example: Show an image from a local file

Steps:

1. On the Content tab, click or tap Media, and then click or tap Browse.

2. Click or tap the image file that you want to add, click or tap Open, and then press Esc to return to the default workspace.

3.  Add an Image control, and set its Items property to the name of the file that you added.

Output:

Camera Control:

A control with which the user can take photos by using the camera on the device.

Description: If you add this control, the user can update a data source with one or more photos from wherever the app is running.

Example: Add photos to an Image gallery control

Steps:

1.Add camera control set it’s OnSelect Property to Collect(MyPix,Camera1.photo). (here Camera1 is the name of camera control.)

2. Add gallery control set its item property to MyPix.Url

3. Set the Image property of the Image control in the gallery to ThisItem.Url.

Output:

Barcode Control:

A control with which the user can take photos by using the barcode scanner on the device.

Description: If you add this control, the user can update a data source with one or more photos from wherever the app is running.

Steps:

1. Add a barcode control.

2. Add a label control and set its Text property to (here Barcode1 is the name of barcode control)

Output:

Microphone control:

A control with which the user can record sounds.

Description: If you add this control, the user can update a data source with one or more sounds from wherever the app is running.

Steps:

1. Add Microphone control and set its onStop Property to Collect(MySounds,MyMic.Audio). (here MyMic is the name of microphone)

2. Add a blank gallery control and set its items property to MySounds and add audio control inside it. And set its Media Property to ThisItem.Url


3. Add A button if you want to remove any audio. Set its OnSelect property to : Remove(MySounds,ThisItem)

Output:

Add picture control:

Takes a photo or loads images from the local device.

Description: With this control users can take photos or upload image files from their device and update the data source with this content.

Example: Add images to an image gallery control

Steps:

1.Add an Add Picture control

2. Add Button control inside Add picture control.

3. Set OnSelect Property of button to: Collect(Pics, AddMediaButton2.Media)

4. Add gallery control and set its items property to pics. (gallery control will display all the images which are added)

Output:

Audio Control:

A control that plays an audio file.

Description: An Audio control plays a sound clip from a file, a recording from a Microphone control, or the audio track from a video file.

Steps:

1. Add Audio control.

2. On the Content tab, click or tap Media, and then click or tap Browse
And select the audio from local device.

3. Set Media property of audio to the name of audio file.

Output:

Video Control:

A control that plays a video file, or a video on YouTube.

Description: A Video control plays a video clip from a file or from YouTube if you specify a URL.

Example: For adding a YouTube video

Steps:

Add video controller and set its Media property to the URL link of that YouTube video. (add URL in quotes)

Output:


Liked it? Share it.

Leave a Reply

Your email address will not be published. Required fields are marked *

Time limit is exhausted. Please reload the CAPTCHA.