| | |
| | | <script setup> |
| | | import {computed, onMounted, onUnmounted, ref, watch} from "vue"; |
| | | import hkModule from "@/views/video/components/js/hkVideo/hkModule"; |
| | | import FlexLayout from "@/components/FlexLayout.vue"; |
| | | const props = defineProps({ |
| | | companyVideoData: { |
| | | type: Object, |
| | | default() { |
| | | return [ |
| | | { |
| | | ip: "192.168.10.5", |
| | | port: 80, |
| | | username: "admin", |
| | | password: "a123456789" |
| | | }, |
| | | { |
| | | ip: "192.168.10.6", |
| | | port: 80, |
| | | username: "admin", |
| | | password: "a123456789" |
| | | }, |
| | | { |
| | | ip: "192.168.10.4", |
| | | port: 80, |
| | | username: "admin", |
| | | password: "a123456789" |
| | | }, |
| | | { |
| | | ip: "192.168.10.3", |
| | | port: 80, |
| | | username: "admin", |
| | | password: "a123456789" |
| | | } |
| | | ]; |
| | | return []; |
| | | }, |
| | | }, |
| | | }); |
| | |
| | | videoInitPlugin, clickLogin |
| | | } = hkModule(); |
| | | |
| | | onMounted(()=>{ |
| | | const clickLogins = ()=>{ |
| | | for(let i=0; i<props.companyVideoData.length; i++) { |
| | | let item = props.companyVideoData[i]; |
| | | WebVideoCtrl.I_Logout(item.ip+"_"+item.port); |
| | | setTimeout(()=>{ |
| | | clickLogin(item, i); |
| | | }, 1000); |
| | | } |
| | | } |
| | | |
| | | onMounted(()=>{ |
| | | videoInitPlugin(()=>{ |
| | | for(let i=0; i<props.companyVideoData.length; i++) { |
| | | let item = props.companyVideoData[i]; |
| | | setTimeout(()=>{ |
| | | clickLogin(item, i); |
| | | }, 1000); |
| | | } |
| | | clickLogins(); |
| | | }); |
| | | }); |
| | | |
| | | onUnmounted(()=>{ |
| | | for(let i=0; i<props.companyVideoData.length; i++) { |
| | | let item = props.companyVideoData[i]; |
| | | WebVideoCtrl.I_Logout(item.ip+"_"+item.port); |
| | | WebVideoCtrl.I_Logout(item.ip); |
| | | } |
| | | WebVideoCtrl.I_GetPluginOBJECT().JS_DestroyPlugin(); |
| | | }); |
| | | </script> |
| | | |
| | | <template> |
| | | <div class="video-player"> |
| | | <div id="divPlugin" class="divPlugin" ref="divPlugin"></div> |
| | | </div> |
| | | <div class="video-player"> |
| | | <div id="divPlugin" class="divPlugin" ref="divPlugin"></div> |
| | | </div> |
| | | </template> |
| | | |
| | | <style scoped> |