Monica视频监控处理程序
xc
2021-04-26 cc93f94f3c503c662e1bb6a46fde991ed3fc7f1f
历史录像 js完善
2 files modified
25 ■■■■■ changed files
src/main/resources/public/monitor/history.html 23 ●●●●● patch | view | raw | blame | history
src/main/resources/public/monitor/live.html 2 ●●● patch | view | raw | blame | history
src/main/resources/public/monitor/history.html
@@ -27,6 +27,9 @@
<script>
    var video_id;
    var stream_path;
    var hourTimestamp = 3600 * 1000;
    var dayTimestamp = hourTimestamp * 24;
    var currentTimer;
@@ -109,33 +112,27 @@
        }
    }
    function play_video(video_url) {
        window.rtsp = video_url;
        window.streamPath = "";
    //播放
    function play_video(video_id) {
        window.video_id = video_id;
        window.stream_path = "";
        $.ajax({
            type: "get",
            url: "../../webapi/media/historical?param=" + video_url+"&startTime="+currentTimer,
            timeout: 5000,
            async: false,
            success: function (result) {
                //$("#iframeSon").attr("src", "../../data/video/public/test.html?url=" + result.jessica);
                var container = document.getElementById("playerContainer");
                jessibuca = new Jessibuca({
                    container, decoder: "../../data/video/public/ff.js", videoBuffer: 1,
                    isResize: false
                });
                jessibuca.onLoad = function () {
                h5lc.onLoad = function () {
                    this.play(result.jessica);
                }
                $("#close_video").attr("onclick", "close_videoDiv(\"" + result.streamPath + "\")");
                window.streamPath = result.streamPath;
            }
        });
    }
    //关闭
    function close_video(streamPath) {
        jessibuca.destroy();
        h5lc.destroy();
        if (streamPath) {
            $.ajax({
                type: "get",
src/main/resources/public/monitor/live.html
@@ -117,7 +117,7 @@
    //关闭
    function close_video(streamPath) {
        jessibuca.destroy();
        h5lc.destroy();
        if (streamPath) {
            $.ajax({
                type: "get",