function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Naresh123Naresh123 

How to Embed the Youtube videos in salesforce VF pages?

Hi All,

          I am new to VF development,Can anyone help me out to create the vf page where we can able to play the youtube videos using the links from custom object field.

 

 

 

Thanks alot in advance

 

Naresh

Best Answer chosen by Admin (Salesforce Developers) 
Chamil MadusankaChamil Madusanka

Use <apex:iframe> for embedding.

 

<apex:iframe width="420" height="315" src="http://www.youtube.com/embed/Qd8OtvSgal8"/>

 For youTube use their embedd URL instead of buffering URL.

 

If a reply to a post answers your question or resolves your problem, please mark it as the solution to the post so that others may benefit.

All Answers

Chamil MadusankaChamil Madusanka

Use <apex:iframe> for embedding.

 

<apex:iframe width="420" height="315" src="http://www.youtube.com/embed/Qd8OtvSgal8"/>

 For youTube use their embedd URL instead of buffering URL.

 

If a reply to a post answers your question or resolves your problem, please mark it as the solution to the post so that others may benefit.

This was selected as the best answer
ranjith kumarranjith kumar

Simple but useful....Could you tell me how to insert flash image...

Chamil MadusankaChamil Madusanka
 <apex:flash play="true" loop="true" src="http://www.tizag.com/pics/example.swf"  height="300" width="50%" />

 If a reply to a post answers your question or resolves your problem, please mark it as the solution to the post so that others may benefit.

Naresh123Naresh123

Hi Chamil,

                   Thanks a lot for spending your valuable time to give reply.Its working fine now.

ranjith kumarranjith kumar

Here to embed flash image you have source a url..How to embed alreay developed flash from our system..How to attach them in static resources,,what is the url to mention in source attribute

Chamil MadusankaChamil Madusanka

 upload the SWF as a static resource and you can use that swf as follows.

 

<apex:flash play="true" loop="true" src="{!$Resource.FlashSWF}"  height="300" width="50%" />

 Refer for Static Resource : http://www.salesforce.com/us/developer/docs/pages/Content/pages_resources.htm

 

If a reply to a post answers your question or resolves your problem, please mark it as the solution to the post so that others may benefit

bnicolasbnicolas

Can I also Embed videos uploaded to SFDC library this way?  Or is there a better option?

szad khnszad khn
youtube video download (https://indiakabest.in/youtube-se-video-download-kaise-kare/)  youtube par viedo download  KAIOSE KARE