Reputation: 503
Below on my HTML code that is how i loaded pdf and image documents and it seem to work. But I cant seem to load ang play a video? it does not work, is there a directive for that ? do i need a player for that ? Any idea would really be a help. I know this is not about code debugging guys but i do hope you understand. Also I already have a feature to upload and call the video , the problem is I dont know the feature how to have a preview or a player for it. Thank you.
<div class="col-md-12 top10">
<img ng-class="{'hidden' : main.record.preview.type != 'image'}"
style="width: 100%" class="img"
src="{$ main.record.preview.preview $}">
<object ng-class="{'hidden' : main.record.preview.type != 'pdf'}"
ng-show="(main.record.preview.preview != undefined || main.record.preview.preview != '') && main.record.preview.type == 'pdf"
data="{$ main.record.preview.preview | trusted $}" style="width: 100%;height: 800px"
data="{$ main.record.preview.preview | trusted $}" type="application/pdf">
<embed src="{$ main.record.preview.preview | trusted $}" type="application/pdf" />
</object>
<div ng-show="main.record.preview.type == 'others'"
class="col-md-12 text-center text-default no-preview">
<p><i class="far fa-times-circle"></i> No Preview Available</p>
</div>
Upvotes: 1
Views: 3277
Reputation: 15041
<video>
tag should get this going... something along the lines below...
<div ng-show="main.record.preview.type == 'video'" class="col-md-12 text-center text-default no-preview">
<video controls>
<source src="yourVideoLink.mp4" type="video/mp4">
<p><i class="far fa-times-circle"></i> No Preview Available</p>
</video>
</div>
Upvotes: 2