Trying to display a 'loading' div until my MP4 is done buffering. Seems like it should do the trick, but no go- loading stays up even when done buffering! Any suggestions?
<video id="homeVideo" style="width: 100%; overflow: hidden;" autoplay>
<source src="/media/micro_home.mp4" type="video/mp4">
</video>
<style>#slider_loading {display: visible;}
<div id="slider_loading" class="slider_loading"></div>
<script type="text/javascript">
var video = document.getElementById("homeVideo");
if (video.readyState === 4) {
document.getElementById('homeVideo')style.display = "none";
}
</script>