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
Shruti NigamShruti Nigam 

how to include video in vf page?

Hi all,

I had saved video in attachment obect and i want to display that video in vf page anyone know how to do it ?
Rounak SharmaRounak Sharma
Hello shruti,

You can try the following ways
<iframe width="560" height="315" src="http//myvideo.provider.com/embed/{!$CurrentPage.parameters.VideoID}" frameborder="0" allowfullscreen="true"> </iframe>
or
<apex:iframe width="854" height="510" src="https://www.youtube.com/embed/SGPvYQ1o2x4" frameborder="0"/>

Please let me know if it helps you.
Thanks
Khan AnasKhan Anas (Salesforce Developers) 
Hi Shruti,

Greetings to you!

Please refer to the below links which might help you further with the above requirement.

https://salesforce.stackexchange.com/questions/191213/store-video-in-salesforce-and-display-on-visualforce

https://salesforce.stackexchange.com/questions/95551/play-video-stored-as-static-resources

I hope it helps you.

Kindly let me know if it helps you and close your query by marking it as solved so that it can help others in the future. It will help to keep this community clean.

Thanks and Regards,
Khan Anas
Team NubesEliteTeam NubesElite
Hi Shruti,
If the Videos are relatively few in number and not changing frequently and less than 25MB, then static resources is probably the best solution.
Otherwise, you may want to even look at something like Amazon s3 for storing the raw video.
For the VF page, you can use Youtube or Vimo for hostiong your video.
Just use below code for Embedding youtube video into visualforce page.
<apex:page >
<apex:iframe width="854" height="510" src="https://www.youtube.com/embed/SGPvYQ1o2x4" frameborder="0"/>
</apex:page>

Thank You
www.nubeselite.com

Developement | Training | Consulting

Please Mark this assolution if your problem resolved.