How to dynamically load media files (videos/photos)