import Vue from 'vue' import Api from '../api/index' import dayjs from 'dayjs' import './style/index.less' import dayfilter from '@/utils/dayfilter' import {tryToJson} from '../utils/tools' import H265Player from '../components/h265-player/index' H265Player.install(Vue); dayfilter(Vue); const vue=new Vue(); Vue.prototype.$api=Api; Vue.prototype.$bus=vue; Vue.prototype.$apiPath="/jhapi" Vue.prototype.$dt=dayjs; Vue.prototype.$tryToJson=tryToJson Vue.prototype.$toggleFullScreen=(el)=>{ if(document.fullscreenElement==el){ let screen = document.cancelFullScreen || document.webkitCancelFullScreen || document.mozCancelFullScreen || document.exitFullScreen if (typeof screen != "undefined" && screen) { screen.call(document); return; } }else{ let screen = el.requestFullScreen || el.webkitRequestFullScreen || el.mozRequestFullScreen || el.msRequestFullScreen if (typeof screen != "undefined" && screen) { screen.call(el); return; } } } window.__isfull__=false; window.fullscreenInterval=setInterval(()=>{ if(document.fullscreenElement){ if(!window.__isfull__){ vue.$emit("fullscreen",true); window.__isfull__=true; } }else{ if(window.__isfull__){ vue.$emit("fullscreen",false); window.__isfull__=false; } } },500); window.jhcaches={}; /* Api.project.getInfo().then(d=>{ if(d.code==200){ window.__info__=d; } }) */