Is it possible to dynamically show or hide a div depending on the source of a video being played? I have a slideshow of videos running using bigvideo.js and I am looking for a way to toggle the visibility of certain divs based on which video is currently playing. Here's the code snippet I have been experimenting with:
function checkVideoSource() {
setTimeout(checkVideoSource, 100);
if (jQuery('#big-video-vid_html5_api').src('http://localhost:8888/mobilwave/images/video1.mp4'))
jQuery('.demo').css('visibility', 'visible');
else if (!jQuery('#big-video-vid_html5_api').src('http://localhost:8888/mobilwave/images/video2.mp4'))
jQuery('.demo').css('visibility', 'hidden');
}
jQuery(checkVideoSource);