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.
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
Solved! Go to 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.
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>
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
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>
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?
Hi @thyjones ,
According to my test, at this stage we have not been able to successfully embed YouTube hosted videos.
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>
Then publish the report to service ,pin the visual to dashboard, the video could auto play.
Refer to :
How to Create, Host and Embed Videos in Power BI — DiscoverEI
Autoplaying and looping embedded videos – 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.
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)
Proud to be a Datanaut!
Private message me for consulting or training needs.
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.