I have a custom object "Article" which can have an image or a youtube video or an audio. Because of mixed nature of these contents how can I display based on some condition
image(<img src="../img" />
),
embed video (<iframe> src=".//video" </iframe>
)
and audio(<audio> <source src="/audio.mp3</source></audio>
) contents using data repeater.
For Example:
<div class="article" media="image">
<img src="images/sample/sample1.jpg" />
</div>
<div class="article" media="video">
<iframe> src="http://www.youtube.com/watch?v=sOQLVm0-8Yg" </iframe>
</div>
<div class="article" media="audio">
<audio controls> <source src="../vidoe.mp3" </source> </audio>
</div>