参考:flv-h265 - npmHTML5 FLV Player. Latest version: 1.7.0, last published: 6 months ago. Start using flv-h265 in your project by running `npm i flv-h265`. There are no other projects in the npm registry using flv-h265.https://www.npmjs.com/package/flv-h265 本地安装也可以:
npm i -S flv.js
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title> flvjs Demo</title>
</head>
<body>
<video id="videoElement" class="video-js" controls muted autoplay>
</video>
<script src="https://cdn.bootcdn.net/ajax/libs/flv.js/1.6.2/flv.js"></script>
<script>
if (flvjs.isSupported()) {
var videoElement = document.getElementById('videoElement');
var flvPlayer = flvjs.createPlayer({
type: 'flv',
url: 'https://rivermap-file.oss-cn-hangzhou.aliyuncs.com/video/flv/test.flv'
});
flvPlayer.attachMediaElement(videoElement);
flvPlayer.load();
flvPlayer.play();
}
</script>
</body>
</html>