HTML5 Video / End of a Video Poster

后端 未结 10 711
感动是毒
感动是毒 2020-11-28 12:09

With the above; within the HTML

10条回答
  •  暗喜
    暗喜 (楼主)
    2020-11-28 12:38

    I had the same objective, and found a solution by using jQuery to reset the source of the video to itself on ended. Now I get my animated gif poster before and after play. Here is a simple javascript play function and the jQuery code.

    function play()
        {
        movie_ID.play(); 
    
        $(document).ready(function(){
             $("#movie_ID").bind("ended", function() {
            $('#movie_ID').attr('src', 'movie_ID.src');
                });
             });   
         }  
    

提交回复
热议问题