多单位版国产化地质资料管理系统
zhai
2025-12-13 fc0cc9fff4b4cbdc7cbb52b4a96c947530fcbba0
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%
    String path = request.getContextPath();
            String basePath = request.getScheme() + "://" + request.getServerName() + ":" + request.getServerPort()
                    + path + "/";
%>
 
<!DOCTYPE HTML>
<html>
<head>
<base href="<%=basePath%>">
 
<title>文件浏览</title>
<link rel="stylesheet" href="static/plugins/mediaelement/mediaelementplayer.min.css" type="text/css" />
<script type="text/javascript" src="static/plugins/jquery/jquery.min.js"></script>
<script type="text/javascript" src="static/plugins/mediaelement/mediaelement-and-player.min.js"></script>
<style>
html, body {
    height: 100%;
    overflow: hidden;
    margin: 0px;
    padding: 0px;
}
</style>
</head>
<body>
    <div class="players" id="player1-container">
        <div class="media-wrapper">
<%--             <video id="player1" src="general/${attachViewUrl}"> --%>
            <object width="100%" height="240" type="application/x-shockwave-flash" data="static/plugins/mediaelement/mediaelement-flash-video.swf">
                <param name="movie" value="static/plugins/mediaelement/mediaelement-flash-video.swf" />
                <param name="flashvars" value="controls=true&amp;allowScriptAccess=always&amp;file=general/${attachViewUrl}" />
            </object> 
<!--         </video> -->
        </div>
    </div>
    <script>
        if ($('#player1').mediaelementplayer) {
            var mediaElem = $('#player1').mediaelementplayer({
                "alwaysShowControls" : "true",
                "autoplay" : true,
                "loop" : false,
                "stretching" : "fill",
                "success" : function(mediaElement, originalNode, instance) {}
            });
    
            $(window).resize(function() {
                var videoHeight = $("video").height();
                var videoWidth = $("video").width();
                var wheight = $(this).height();
                console.log(videoHeight, wheight)
                if (videoHeight > wheight) {
                    mediaElem.get(0).setSize(null, wheight);
                }
            })
        }
    </script>
</body>
</html>