<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%@ taglib uri="http://tiles.apache.org/tags-tiles" prefix="tiles" %>
<% request.setCharacterEncoding("UTF-8"); %>
<!DOCTYPE html>
<html lang="ko">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="Content-Type" content= "text/html; charset= utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <meta http-equiv="Content-Script-Type" content="text/javascript">
    <meta http-equiv="Content-Style-Type" content="text/css">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="format-detection" content="telephone=no">
    <link rel="favicon" href="/images/favicon.ico">
    <title>평택시 교통정보센터 - ${subTitle}</title>

    <!--Existing CSS-->
    <%--    <link rel="stylesheet" href="https://code.jquery.com/ui/1.12.1/themes/base/jquery-ui.css">--%>
    <%--    <link rel="stylesheet" type="text/css" href="/css_old/responsive.css" />--%>
    <%--    <link rel="stylesheet" type="text/css" href="/css_old/style.css" />--%>
    <!---->

    <!-- Bootstrap CSS -->

    <link href="/common/bootstrap-5.1.3-dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-1BmE4kWBq78iYhFldvKuhfTAU6auU8tT94WrHftjDbrCEXSU1oBoqyl2QvZ6jIW3" crossorigin="anonymous">
    <link rel="stylesheet" type="text/css" href="/common/css/reset.css" />
    <link rel="stylesheet" type="text/css" href="/common/css/layout.css" />
    <link rel="stylesheet" type="text/css" href="/common/css/contents.css" />
    <link rel="stylesheet" type="text/css" href="/common/css/Exsting_style.css">
    <link rel="stylesheet" href="//code.jquery.com/ui/1.13.2/themes/base/jquery-ui.css">
    <script src="https://code.jquery.com/jquery-3.2.1.min.js"></script>
    <script type="text/javascript" src="/js/video.min.js"></script>
    <script type="text/javascript" src="/js/common.js"></script>
    <script src="https://code.jquery.com/jquery-1.12.4.js"></script>
    <script src="https://code.jquery.com/ui/1.12.1/jquery-ui.js"></script>
    <script src="/js/HiVeWebRtcPlayer/webrtcadapter.js"></script>
    <script src="/js/HiVeWebRtcPlayer/HiVeWebRtcPlayer.js"></script>
</head>
<body>
<div class="map_popup_cctv">
    <dl>
        <dt>
            <p class="lctn_nm">${cctv.istl_lctn_nm}</p>
            <p class="fr black restTime">남은 재생시간 : <span id="restTime">30</span>&nbsp;초&nbsp;</p>
            <a href="javascript:cctvClose('${cctv.cctv_mngm_nmbr}')" id="cctvClose" title="CCTV영상닫기"><img src="/images/cctv/xbtn.png" alt="CCTV영상닫기"/></a>
        </dt>
        <dl>
            <p align="center">
                <video id="11" width="300" height="240" autoplay playsinline muted></video>
<%--                <video id="video" class="video-js" preload="auto" width="300" height="240" muted="mute" autoplay></video>--%>
            </p>
        </dl>
    </dl>
</div>
<div id="dialog" class="selector ui-dialog-content ui-widget-content" style="width: auto; min-height: 0px; height: 116px; display:none;">
</div>
</body>
<script type="text/javascript">
    //if (document.location.protocol == 'https:') {
    //    document.location.href = document.location.href.replace('https:', 'http:');
    //}

    let WEB_RTC_SVR_IP = "${cctv.web_rtc_svr_ip}";
    let WEB_RTC_SVR_PORT = "${cctv.web_rtc_svr_port}";
    let WEB_RTC_ID = "${cctv.web_rtc_id}";

    var webrtcPlayer1 = new HiVeWebRtcPlayer("11", WEB_RTC_SVR_IP, WEB_RTC_SVR_PORT, WEB_RTC_ID);
    openCCTV();
</script>
