added support for external video and external images