Added code to allow videos and images to be displayed