视频拉流
This commit is contained in:
parent
60cbbb5c1b
commit
be740def8d
BIN
target/classes/com/gc/easy/flv/config/FlvConfig.class
Normal file
BIN
target/classes/com/gc/easy/flv/config/FlvConfig.class
Normal file
Binary file not shown.
BIN
target/classes/com/gc/easy/flv/controller/FLVController.class
Normal file
BIN
target/classes/com/gc/easy/flv/controller/FLVController.class
Normal file
Binary file not shown.
Binary file not shown.
BIN
target/classes/com/gc/easy/flv/factories/Converter.class
Normal file
BIN
target/classes/com/gc/easy/flv/factories/Converter.class
Normal file
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
target/classes/com/gc/easy/flv/factories/state/OutputImage.class
Normal file
BIN
target/classes/com/gc/easy/flv/factories/state/OutputImage.class
Normal file
Binary file not shown.
BIN
target/classes/com/gc/easy/flv/service/IFLVService.class
Normal file
BIN
target/classes/com/gc/easy/flv/service/IFLVService.class
Normal file
Binary file not shown.
BIN
target/classes/com/gc/easy/flv/service/IOpenFLVService.class
Normal file
BIN
target/classes/com/gc/easy/flv/service/IOpenFLVService.class
Normal file
Binary file not shown.
BIN
target/classes/com/gc/easy/flv/service/impl/FLVService.class
Normal file
BIN
target/classes/com/gc/easy/flv/service/impl/FLVService.class
Normal file
Binary file not shown.
BIN
target/classes/com/gc/easy/flv/service/impl/OpenFLVService.class
Normal file
BIN
target/classes/com/gc/easy/flv/service/impl/OpenFLVService.class
Normal file
Binary file not shown.
BIN
target/classes/com/gc/easy/flv/util/FlvUtil$1.class
Normal file
BIN
target/classes/com/gc/easy/flv/util/FlvUtil$1.class
Normal file
Binary file not shown.
BIN
target/classes/com/gc/easy/flv/util/FlvUtil.class
Normal file
BIN
target/classes/com/gc/easy/flv/util/FlvUtil.class
Normal file
Binary file not shown.
37
target/classes/templates/video.html
Normal file
37
target/classes/templates/video.html
Normal file
@ -0,0 +1,37 @@
|
||||
<!DOCTYPE html>
|
||||
<html xmlns:th="http://www.thymeleaf.org">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<title>FLV Video Player</title>
|
||||
|
||||
<!-- 引入flv.js库 -->
|
||||
<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/flv.js/1.5.0/flv.min.js"></script>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
|
||||
<video id="videoPlayer" th:style="'width:500px; height:500px;'" controls></video>
|
||||
|
||||
<script th:inline="javascript">
|
||||
(function () {
|
||||
var videoPath = /*[[${videoPath}]]*/ '';
|
||||
|
||||
if (flvjs.isSupported()) {
|
||||
var videoElement = document.getElementById('videoPlayer');
|
||||
var flvPlayer = flvjs.createPlayer({
|
||||
type: 'flv',
|
||||
url: 'http://localhost:8000' + videoPath
|
||||
});
|
||||
|
||||
flvPlayer.attachMediaElement(videoElement);
|
||||
flvPlayer.load();
|
||||
|
||||
// 播放视频
|
||||
videoElement.play();
|
||||
} else {
|
||||
console.error('FLV not supported');
|
||||
}
|
||||
})();
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
Loading…
Reference in New Issue
Block a user