jquery - Firefox showing issue with video.duration in html5 -
i trying build custom video player.
<video preload="metadata" id="videoplayer" style="width: 640px; height: 360px;"> </video> <script type="text/javascript"> var v = ""; var myvideo = ""; $(document).ready(function() { v = $("#videoplayer"); myvideo = v.get(0); $(".playlist").click(function() { v.attr("src","http://www.jplayer.org/video/webm/big_buck_bunny_trailer.webm"); myvideo.play(); }); myvideo.addeventlistener('loadedmetadata', function() { // in chrome working fine , shows duration 00-00-33 // in firox showing infinity. console.log(myvideo.duration); }); }); <script>
in chrome video playing , shows duration 33.02 . in fireox showing infinity. not able implement seek-bar. think missing
the duration of audio/video nan (not number) , timeline slider disabled in firefox / firefox keeps loading, not play audio/video.
make sure server sets content-length , content-range properties in response-header.
Comments
Post a Comment