[SalesForce] How to play video from Salesforce file in lightning component

There are few videos in files (Lightning files) of my slesforce org. Is there a way i can play/preview them in an iframe inside a lightning component?

Best Answer

I normally use this approach for expose video files in my lightning components:

<video width="100%">
    <source src="{!'../sfc/servlet.shepherd/document/download/' + file.Id}" type="video/mp4" />
Your browser dont support video tag
</video>

You need acces to the file in order to see the file.

Related Topic