1
13693261870
2024-04-03 187e04a096e89908ed54f9243926bd5532ce072e
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
<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8" />
    <title>视频播放</title>
    <style>
        html, body {
            margin: 0;
            padding: 0;
            width: 100%;
            height: 100%;
        }
    </style>
    <script>
        function getParams(url) {
            var regex = /[?&]([^=#]+)=([^&#]*)/g;
            var params = {};
            var match;
            while (match = regex.exec(url)) {
                params[decodeURIComponent(match[1])] = decodeURIComponent(match[2]);
            }
            return params;
        }
 
        function getQueryString(name) {
            let reg = new RegExp("(^|&)" + name + "=([^&]*)(&|$)", "i");
            let r = window.location.search.substr(1).match(reg);
            if (r != null) {
                return unescape(r[2]);
            };
            return null;
        }
 
        window.onload = function () {
            var name = getQueryString("name");
            var video = document.getElementById("video");
            if (!name || !video) return;
 
            video.src = "mp4/" + name;
            video.play();
        }
    </script>
</head>
<body>
    <video id="video" controls="controls">
        <source src="" type="video/mp4">
    </video>
</body>
</html>