chenkailing
7 years ago
12 changed files with 97 additions and 22 deletions
@ -0,0 +1,27 @@
|
||||
package cn.keking.service.impl; |
||||
|
||||
import cn.keking.service.FilePreview; |
||||
import cn.keking.utils.FileUtils; |
||||
import org.springframework.beans.factory.annotation.Autowired; |
||||
import org.springframework.stereotype.Service; |
||||
import org.springframework.ui.Model; |
||||
/** |
||||
* @author : kl |
||||
* @authorboke : kailing.pub |
||||
* @create : 2018-03-25 上午11:58 |
||||
* @description: |
||||
**/ |
||||
@Service |
||||
public class MediaFilePreviewImpl implements FilePreview { |
||||
|
||||
@Autowired |
||||
FileUtils fileUtils; |
||||
|
||||
@Override |
||||
public String filePreviewHandle(String url, Model model) { |
||||
model.addAttribute("mediaUrl", url); |
||||
return "media"; |
||||
} |
||||
|
||||
|
||||
} |
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
After Width: | Height: | Size: 3.7 KiB |
@ -0,0 +1,24 @@
|
||||
<!DOCTYPE html> |
||||
<html lang="en"> |
||||
<head> |
||||
<meta charset="utf-8"> |
||||
<title>多媒体文件预览</title> |
||||
<link rel="stylesheet" href="plyr/plyr.css"> |
||||
</head> |
||||
<style> |
||||
body{background-color: #262626} |
||||
.m{ margin-left: auto; margin-right: auto; width:640px; margin-top: 100px; } |
||||
</style> |
||||
<body> |
||||
<div class="m"> |
||||
<video controls> |
||||
<source src="${mediaUrl}"> |
||||
</video> |
||||
</div> |
||||
<script src="plyr/plyr.js"></script> |
||||
<script> |
||||
plyr.setup(); |
||||
</script> |
||||
</body> |
||||
|
||||
</html> |
Loading…
Reference in new issue