const fileType = { "pptx": "fa-file-powerpoint-o", "ppt": "fa-file-powerpoint-o", "docx": "fa-file-word-o", "doc": "fa-file-word-o", "xls": "fa-file-excel-o", "xlsx": "fa-file-excel-o", "pdf": "fa-file-pdf-o", "zip": "fa-file-archive-o", "rar": "fa-file-archive-o", "png": "fa-file-image-o", } $(document).ready(function () { getVideoInfo(); getVideoFile(); $('#video').bind('contextmenu', function () { return false; }); setListHeight(); }); $(window).resize(function () { setListHeight(); }); $(".sidebar-toggle").click(function () { setTimeout(function () { setListHeight(); }, 10); }); function getVideoInfo() { $.ajax({ url: "./script/php/video/getInfo.php", type: "POST", data: { id: id, }, dataType: "json" }).done(function (result) { getDescription(result[0].description); getVideoList(result[0].dir_name); }).error(function (error) { console.log(error); }); } function getVideoList(dir) { $.ajax({ url: "./script/php/video/getList.php", type: "POST", data: { dir: dir, }, dataType: "json" }).done(function (result) { let videos = result["Video_Table"]; let files = result["File_Table"]; $("#video-list").empty(); for (j = 0; j < videos.length; j++) { if (videos[j].file_path.includes(".m3u8")) { if (videos[j].id == id) $("#video-list").append("