| | |
| | | <template> |
| | | <div class="video-player"> |
| | | <canvas id="area-canvas" ref="areaCanvas" :width="canvasWidth" :height="canvasHeight"></canvas> |
| | | <canvas v-show="showArea" id="area-canvas" ref="areaCanvas" :width="canvasWidth" :height="canvasHeight"></canvas> |
| | | <video ref="videoPlayer" :poster="poster" preload="auto" muted></video> |
| | | <div class="controls"> |
| | | <!-- 全屏 --> |
| | |
| | | isGb: { |
| | | type: Boolean, |
| | | default: false |
| | | }, |
| | | showArea: { |
| | | type: Boolean, |
| | | default: true |
| | | } |
| | | }, |
| | | |
| | |
| | | :rtspUrl="videoItem.rtsp" |
| | | :isRunning="videoItem.isRunning" |
| | | :isGb="videoItem.cameraType === 1" |
| | | :showArea="showArea" |
| | | v-if="videoItem !== '' && videoItem !== undefined && videoItem !== null && TreeDataPool.treeActiveName==='camera'" |
| | | ></camera-player> |
| | | |
| | |
| | | videoItem: { |
| | | type: [Object, String], |
| | | default: null |
| | | } |
| | | }, |
| | | showArea: Boolean, |
| | | }, |
| | | data() { |
| | | return { |
| | |
| | | :class="guid === 3 ? 'iconfont icongongge2 activegongge':'iconfont icongongge2'" |
| | | @click="setGuid(3)" |
| | | ></span> |
| | | <el-tooltip |
| | | <span v-if="TreeDataPool.selectedNode.id" class="area-trigger" @click="toggleShowArea">{{showArea?'隐藏区域':'查看区域'}}</span> |
| | | <!-- <el-tooltip |
| | | v-show="true" |
| | | :content="`${track ? '关闭追踪': '开启追踪'}`" |
| | | placement="bottom" |
| | |
| | | :class="track ? 'iconfont iconintruder-alarm activegongge':'iconfont iconintruder-alarm'" |
| | | @click="handleTrack" |
| | | ></span> |
| | | </el-tooltip> |
| | | </el-tooltip> --> |
| | | </div> |
| | | <div class="fixedRatioBox"> |
| | | <div |
| | |
| | | :videoGuid="guid" |
| | | :videoIndex="index" |
| | | :videoItem="item" |
| | | :showArea="showArea" |
| | | :class="[ |
| | | TreeDataPool.activeVideoIndex === index ? 'activeItem' : '', |
| | | guid === 1 ? 'onlyActiveItem' : '' |
| | |
| | | traceTimer: null, |
| | | tracePubUrl: `${location.protocol === "https" ? "wss" : "ws"}://${location.host}/track`, |
| | | websocket: null, |
| | | visibilityState: true |
| | | visibilityState: true, |
| | | showArea: true, |
| | | }; |
| | | }, |
| | | created() { |
| | |
| | | sessionStorage.guid = this.guid; |
| | | sessionStorage.activeIndex = this.TreeDataPool.activeVideoIndex; |
| | | this.getActiveIndex(); |
| | | }, |
| | | toggleShowArea(){ |
| | | this.showArea = !this.showArea; |
| | | } |
| | | }, |
| | | destroyed() { |
| | |
| | | padding-left: 12px; |
| | | cursor: pointer; |
| | | } |
| | | .area-trigger{ |
| | | font-size: 16px; |
| | | } |
| | | } |
| | | .fixedRatioBox{ |
| | | padding-top: 56.3%; |