Thursday, August 7, 2014

How to play video in visualforce from attachment

So we have developed many data driven pages but when it comes to multimedia then many of us didn't worked on it much. We are thing "Ok its just a video or a image I will display it by getting its path" but the problem arise when its(the MIME file) is an attachment. Attachments are stored in database unlikely if compared from static resource which has a direct access URL. So how can I display a multimedia file if its type is BLOB.

The answer is here, we can use <object> tag or we can have <video> tag of HTML5.
for <object> tag, here the {!crwAtt.id} is Attachment object.
hor <video> tag, remember to add "docType="html-5.0"" to page.

1 comment:

  1. Slot machine casino bonus codes and promos
    Casino bonus codes and promos. 하남 출장샵 Find the best slot machines online, 서귀포 출장샵 and 전주 출장안마 get casino bonus 하남 출장마사지 codes and 고양 출장마사지 promos today! Join us today for FREE and win big!

    ReplyDelete