插件源码地址:GitCode - 开发者的代码家园https://gitcode.com/mirrors/nanguantong/flv-h265.js/overview
1. 下载代码 运行以下命令
npm i
npm run build
npm run build 后生成 flv.min.js 文件,引入使用
2. 调用
js 文件:
let flvjs = require('./flv-h265.min.js');if (flvjs.isSupported()) {var videoElement = document.getElementById('videoElement');var flvPlayer = flvjs.createPlayer({type: 'flv',url: 'http://example.com/flv/video.flv'});flvPlayer.attachMediaElement(videoElement);flvPlayer.load();flvPlayer.play();}