@ -1,27 +0,0 @@
|
||||
package cn.keking.service.impl;
|
||||
|
||||
import cn.keking.model.FileAttribute;
|
||||
import cn.keking.service.FilePreview;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.ui.Model;
|
||||
|
||||
/**
|
||||
* @author : kl
|
||||
* create : 2020-12-27 2:50 下午
|
||||
* flv文件预览处理实现
|
||||
**/
|
||||
@Service
|
||||
public class FlvFilePreviewImpl implements FilePreview {
|
||||
|
||||
private final MediaFilePreviewImpl mediaFilePreview;
|
||||
|
||||
public FlvFilePreviewImpl(MediaFilePreviewImpl mediaFilePreview) {
|
||||
this.mediaFilePreview = mediaFilePreview;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String filePreviewHandle(String url, Model model, FileAttribute fileAttribute) {
|
||||
mediaFilePreview.filePreviewHandle(url,model,fileAttribute);
|
||||
return FLV_FILE_PREVIEW_PAGE;
|
||||
}
|
||||
}
|
After Width: | Height: | Size: 3.2 KiB |
After Width: | Height: | Size: 3.4 KiB |
After Width: | Height: | Size: 11 KiB |
After Width: | Height: | Size: 11 KiB |
After Width: | Height: | Size: 9.9 KiB |
After Width: | Height: | Size: 11 KiB |
After Width: | Height: | Size: 11 KiB |
After Width: | Height: | Size: 11 KiB |
After Width: | Height: | Size: 4.1 KiB |
After Width: | Height: | Size: 2.4 KiB |
Before Width: | Height: | Size: 3.7 KiB |
@ -1,40 +0,0 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<title>多媒体文件预览</title>
|
||||
<#include "*/commonHeader.ftl">
|
||||
<script src="js/flv.min.js" type="text/javascript"></script>
|
||||
</head>
|
||||
<style>
|
||||
body {
|
||||
background-color: #404040;
|
||||
}
|
||||
.m {
|
||||
width: 1024px;
|
||||
margin: 0 auto;
|
||||
}
|
||||
</style>
|
||||
<body>
|
||||
<div class="m">
|
||||
<video width="1024" id="videoElement"></video>
|
||||
</div>
|
||||
<script>
|
||||
if (flvjs.isSupported()) {
|
||||
var videoElement = document.getElementById('videoElement');
|
||||
var flvPlayer = flvjs.createPlayer({
|
||||
type: 'flv',
|
||||
url: '${mediaUrl}'
|
||||
});
|
||||
flvPlayer.attachMediaElement(videoElement);
|
||||
flvPlayer.load();
|
||||
flvPlayer.play();
|
||||
}
|
||||
/*初始化水印*/
|
||||
window.onload = function() {
|
||||
initWaterMark();
|
||||
}
|
||||
</script>
|
||||
</body>
|
||||
|
||||
</html>
|