changing source on html5 video tag

前端 未结 16 2126
既然无缘
既然无缘 2020-11-22 08:31

i\'m trying to build a video player, that works everywhere. so far i\'d be going with:

16条回答
  •  广开言路
    2020-11-22 09:25

    I solved this with this simple method

    function changeSource(url) {
       var video = document.getElementById('video');
       video.src = url;
       video.play();
    }
    

提交回复
热议问题