Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
thyjones
Helper I
Helper I

Embedded Youtube Video in Dashboard - auto play

Hi All,

 

I have embedded a youtube video in a tile for a dashboard. This works fine but i was aiming for the video to autoplay.

 

Is there any way to do this without clicking it? I've even tried adding the addtional youtube code for auto play, but this makes no difference.

 

Thanks

 

1 ACCEPTED SOLUTION

Hi Eyelyn9,

 

Thanks for that, that worked, but I also went a step further and adapted your code and tried with youtube.

 

I got it working, so I can embed youtube videos the same way, the turning point was a difference in url structure:

 

<iframe width="420" height="345" src="https://www.youtube.com/watch?v=whatever?autoplay=1"></iframe>

Does not work, but the below:<iframe width="420" height="345" src="https://www.youtube.com/embed/whatever?autoplay=1"></iframe>

 

does work, the difference was watch vs embed in the url structure.

 

Hope this may help someone.

 

View solution in original post

7 REPLIES 7
romankris
New Member

Since April 2018, Google made some changes to the Autoplay Policy. You not only need to add the autoplay=1 as a query param, but also add allow='autoplay' as an iframe's attribute

So while embed youtube video, you will have to do something like this:

<iframe src="https://www.youtube.com/embed/VIDEO_ID?autoplay=1" allow='autoplay'></iframe>

 

v-eqin-msft
Community Support
Community Support

Sorry, the video content is black on my side until now.Could you describe the steps in detail so that I will have a try again.

 

By the way, could you please mark my apply uploaded at the beginning as the solution as well if it helps you a little? Thanks in advance!

 

Best Regards,
Eyelyn Qin

v-eqin-msft
Community Support
Community Support

Hi @thyjones ,

 

I tested again with your code, but it seems not work...

<iframe width="420" height="345" src="https://www.youtube.com/embed/XXv13mkjV2Y?autoplay=1"></iframe>

3.24.3.Embed.PNG

Could you tell me where I made a mistake?🤔

 

Best Regards,
Eyelyn Qin

Hi,

 

On my Dashboard, the following code works fine for me:

 

<iframe width="420" height="345" src="https://www.youtube.com/embed/XXv13mkjV2Y?autoplay=1">
</iframe>

 

If it doesn't work, just do a refresh of the page as sometimes mine needed that to load the code.

 

Does that work?

v-eqin-msft
Community Support
Community Support

Hi @thyjones ,

 

According to my test, at this stage we have not been able to successfully embed YouTube hosted videos.

3.24.4.Could not add youtube.gif

 

But as a workaround,you could use create a video content from Vimeo via htmlViewer visual in Power BI Desktop

The necessary code is ?autoplay=1 and allow="autoplay"

 

Here is the example code:

 

<iframe src="https://player.vimeo.com/video/76979871?autoplay=1" width="640" height="360" frameborder="0" allow="autoplay; fullscreen" allowfullscreen></iframe>

 

3.24.Embed Video.PNG

Then publish the report to service ,pin the visual to dashboard, the video could auto play.

3.24.4AutoPlay.gif

 

 

Refer to :

How to Create, Host and Embed Videos in Power BI &mdash; DiscoverEI

Autoplaying and looping embedded videos &ndash; Vimeo Help Center

 

Best Regards,
Eyelyn Qin
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Hi Eyelyn9,

 

Thanks for that, that worked, but I also went a step further and adapted your code and tried with youtube.

 

I got it working, so I can embed youtube videos the same way, the turning point was a difference in url structure:

 

<iframe width="420" height="345" src="https://www.youtube.com/watch?v=whatever?autoplay=1"></iframe>

Does not work, but the below:<iframe width="420" height="345" src="https://www.youtube.com/embed/whatever?autoplay=1"></iframe>

 

does work, the difference was watch vs embed in the url structure.

 

Hope this may help someone.

 

collinq
Super User
Super User

HI @thyjones ,

 

At this time, there is no way to get it to autoplay.  However, this sounds like a great idea to create (or find).  If you create one, let us know and we can vote for it.  Ideas (powerbi.com)




Did I answer your question? Mark my post as a solution!

Proud to be a Datanaut!
Private message me for consulting or training needs.




Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.

Top Solution Authors