It would be helpful to be able to use the multimedia player to view videos from YouTube URLs.
I have my gallery on Screen 1 that’s linked to product pages on Screen 2. On Screen 2, we want to have videos specific to each product, which Screen 2 will adapt to reflect the product selected from the gallery on Screen 1.
The YouTube links for each product are in my Excel doc but they don't work with the media player, so I'm stuck with the same video on every different Screen 2 product page.
Solved! Go to Solution.
If you imported the excel table (e.g., a table called MyData) that had a column with YouTube links (e.g., called VideoUrl), then you can reference the data by using the table directly. For example, you can set the Media property of a Video control to First(MyData).VideoUrl (no quotes required), if you want it to show the video of the first element in the table.
Or if you have the data in your table in a gallery (e.g., called Gallery1), and want to show the video of the selected item in the gallery, you would set the Media property of the video control to Gallery1.Selected.VideoUrl (again, no quotes required).
Hi
I think if you use SelectedItem.YouTubeURL it should work. If you press a item from gallary, and are sent over to page2, launch SelectedItem.NameOfTheDataField should pick the right video to launch...
That approach launches video links on the internet, but is there a way to do it so that they play on the screen within the app?
If you want to play a YouTube video within the app, you can use the Video control (which you can find in the <Media> tab or <Insert> tab in the ribbon), and then set its Media property to the YouTube URL. Let's go with an example to see how this could be done.
Imagine that you have the following excel table.
Now, in the first screen, you would have a gallery. In my example, I have a custom vertical gallery, with three text boxes and one right-arrow shape. The text boxes are bound to show the text from the excel table, and the right arrow has an OnSelect property set to the second screen (Navigate(Screen2, Fade))
In the second screen, I added a Video control as mentioned in the beginning of this answer (and some additional controls with more information). Now, when you select the item in the gallery, it will navigate to the second page, and since the selected gallery item is bound to the video control, anytime you choose a different item in the gallery, a new video will be displayed in your app.
How do you set the media property to YouTube URL?
Additionally, I don’t understand how you have the selected gallery item bound to the video control. Wasn’t the only command on the gallery item that it navigates to screen 2?
Hi,
You can refer to the following links, if you click the arrow icon, it navigates to a details screen.
https://powerapps.microsoft.com/en-us/tutorials/add-gallery/
You can set the Media property of the video control to URL. You can choose the Video control and select the Media and type the URL in ¡°SmapleVideo¡±.
How to use Video control:
https://powerapps.microsoft.com/en-us/tutorials/control-audio-video/
Thanks,
Dean Wang
Instead of "SampleVideo" what should the video control be? Usually, you put YouTube links in "quotation marks" so I'm not sure how to make the control pull from the Excel table to play video links.
If you imported the excel table (e.g., a table called MyData) that had a column with YouTube links (e.g., called VideoUrl), then you can reference the data by using the table directly. For example, you can set the Media property of a Video control to First(MyData).VideoUrl (no quotes required), if you want it to show the video of the first element in the table.
Or if you have the data in your table in a gallery (e.g., called Gallery1), and want to show the video of the selected item in the gallery, you would set the Media property of the video control to Gallery1.Selected.VideoUrl (again, no quotes required).
@CarlosFigueira I'm trying something similar i.e. I want to show Videos using the Video control. The URL is a column is CDS. I tried the above method, it works fine on a Windows PC, but the Video control, nor the Video show in IOS. I tested it on a new iPhone 7 with current version of IOS 10.
Any suggestions? I desperately need this to work in IOS.
To recap, Each record in the CDS has several Columns, mostly text, only some records will have a column "VideoURL". So as a User scrolls through the Gallery and selects the Video, the Video should play in the Video Control situated on the same screen. I've set the media control to ThisItem.VideoURL.
I've tried inserting the URL in quotes, I've tried without quotes (only works in Windows), no success.
I've got this to work in my app which is great, but not all of my data has a video, how do I set it so it plays the video if there is one, but leaves the area blank if there isn't one?
I've worked it out, setting the background to white does the trick - ignore this question, thanks.
User | Count |
---|---|
251 | |
102 | |
94 | |
48 | |
37 |