ads

Wednesday 17 August 2016

Show YouTube Video In Visualforce Page

Go to youtube and open the video you want to show in Visualforce Page.


Step 1  :-  Open your video you want to show in Visualforce page and click on "Share"

Example :- https://www.youtube.com/watch?v=ATajrvvW2CY





Step 2 :-
Now click on "Embed" and Copy the whole "iframe" tag.

<iframe width="420" height="315" src="https://www.youtube.com/embed/ATajrvvW2CY" frameborder="0" allowfullscreen></iframe>

Note :- Remove allowfullscreen , if  its creating issue while saving Visualforce page . So new "iframe" tag will be ..

<iframe width="420" height="315" src="https://www.youtube.com/embed/ATajrvvW2CY" frameborder="0" ></iframe>





Step 3:- Copy this "iframe" tag and Paste into your Visualforce page like below code..



<apex:page >
 <iframe width="420" height="315" src="https://www.youtube.com/embed/ATajrvvW2CY" frameborder="0" ></iframe>
</apex:page>




Step 4:- Your Video is now Ready to view in Visualforce Page.





No comments:

Post a Comment