一、HTML代码如下:
<div id="player"></div>
二、JavaScript代码如下:
<script src="http://cdn.jsdelivr.net/npm/xgplayer/browser/index.js" charset="utf-8"></script> <script src="http://cdn.jsdelivr.net/npm/xgplayer-flv.js/browser/index.js" charset="utf-8"></script> <script type="text/javascript"> new window.FlvJsPlayer({ id: 'player', isLive: false, playsinline: true, url: '/test/test.flv', autoplay: true, height: window.innerHeight, width: window.innerWidth }); </script>