|  |  | 
 |  |  |                 </el-tab-pane> | 
 |  |  |                 <!--{"code":0,"data":{"paths":["22-29-30.mp4"],"rootPath":"/home/kkkkk/Documents/ZLMediaKit/release/linux/Debug/www/record/hls/kkkkk/2020-05-11/"}}--> | 
 |  |  |                 <el-tab-pane label="录像查询" name="record" v-if="showRrecord"> | 
 |  |  |                     <el-date-picker size="mini" v-model="videoHistory.date" type="date" value-format="yyyy-MM-dd" placeholder="日期" @change="queryRecords()"></el-date-picker> | 
 |  |  |                     <div style="width: 100%;"> | 
 |  |  |                       <div style="width: 100%; text-align: left"> | 
 |  |  |                         <span>录像控制</span> | 
 |  |  |                         <el-button-group style="margin-left: 1rem;"> | 
 |  |  |                           <el-button size="mini" class="iconfont icon-zanting" title="开始" @click="gbPause()"></el-button> | 
 |  |  |                           <el-button size="mini" class="iconfont icon-kaishi" title="暂停" @click="gbPlay()"></el-button> | 
 |  |  |                           <el-dropdown size="mini" title="播放倍速" style="margin-left: 1px;" @command="gbScale"> | 
 |  |  |                             <el-button size="mini"> | 
 |  |  |                               倍速 <i class="el-icon-arrow-down el-icon--right"></i> | 
 |  |  |                             </el-button> | 
 |  |  |                             <el-dropdown-menu  slot="dropdown"> | 
 |  |  |                               <el-dropdown-item command="0.25">0.25倍速</el-dropdown-item> | 
 |  |  |                               <el-dropdown-item command="0.5">0.5倍速</el-dropdown-item> | 
 |  |  |                               <el-dropdown-item command="1.0">1倍速</el-dropdown-item> | 
 |  |  |                               <el-dropdown-item command="2.0">2倍速</el-dropdown-item> | 
 |  |  |                               <el-dropdown-item command="4.0">4倍速</el-dropdown-item> | 
 |  |  |                             </el-dropdown-menu> | 
 |  |  |                           </el-dropdown> | 
 |  |  |                         </el-button-group> | 
 |  |  |                         <el-date-picker style="float: right;" size="mini" v-model="videoHistory.date" type="date" value-format="yyyy-MM-dd" placeholder="日期" @change="queryRecords()"></el-date-picker> | 
 |  |  |                       </div> | 
 |  |  |                       <div style="width: 100%; text-align: left"> | 
 |  |  |                         <span class="demonstration" style="padding: 12px 36px 12px 0;float: left;">{{showTimeText}}</span> | 
 |  |  |                         <el-slider style="width: 80%; float:left;" v-model="sliderTime" @change="gbSeek" :show-tooltip="false"></el-slider> | 
 |  |  |                       </div> | 
 |  |  |                     </div> | 
 |  |  |  | 
 |  |  |  | 
 |  |  |                     <el-table :data="videoHistory.searchHistoryResult" height="150" v-loading="recordsLoading"> | 
 |  |  |                         <el-table-column label="名称" prop="name"></el-table-column> | 
 |  |  |                         <el-table-column label="文件" prop="filePath"></el-table-column> | 
 |  |  | 
 |  |  |             showPtz: true, | 
 |  |  |             showRrecord: true, | 
 |  |  |             tracksNotLoaded: false, | 
 |  |  |             sliderTime: 0, | 
 |  |  |             seekTime: 0, | 
 |  |  |             recordStartTime: 0, | 
 |  |  |             showTimeText: "00:00:00", | 
 |  |  |         }; | 
 |  |  |     }, | 
 |  |  |     methods: { | 
 |  |  | 
 |  |  |             // return `http://${baseZlmApi}/${streamInfo.app}/${streamInfo.streamId}.flv`; | 
 |  |  |             if (location.protocol === "https:") { | 
 |  |  |               if (streamInfo.wss_flv === null) { | 
 |  |  |                 this.$message({ | 
 |  |  |                   showClose: true, | 
 |  |  |                   message: '媒体服务器未配置ssl端口', | 
 |  |  |                   type: 'error' | 
 |  |  |                 }); | 
 |  |  |                 console.error("媒体服务器未配置ssl端口, 使用http端口") | 
 |  |  |                 // this.$message({ | 
 |  |  |                 //   showClose: true, | 
 |  |  |                 //   message: '媒体服务器未配置ssl端口, ', | 
 |  |  |                 //   type: 'error' | 
 |  |  |                 // }); | 
 |  |  |                 return streamInfo.ws_flv | 
 |  |  |               }else { | 
 |  |  |                 return streamInfo.wss_flv; | 
 |  |  |               } | 
 |  |  | 
 |  |  |         }, | 
 |  |  |         playRecord: function (row) { | 
 |  |  |             let that = this; | 
 |  |  |  | 
 |  |  |             let startTime = row.startTime | 
 |  |  |             this.recordStartTime = row.startTime | 
 |  |  |             this.showTimeText =  row.startTime.split(" ")[1] | 
 |  |  |             let endtime = row.endTime | 
 |  |  |             this.sliderTime = 0; | 
 |  |  |             this.seekTime = new Date(endtime).getTime() - new Date(startTime).getTime(); | 
 |  |  |             console.log(this.seekTime) | 
 |  |  |             if (that.streamId != "") { | 
 |  |  |                 that.stopPlayRecord(function () { | 
 |  |  |                     that.streamId = "", | 
 |  |  | 
 |  |  |             } | 
 |  |  |             console.log(resultArray) | 
 |  |  |             return resultArray; | 
 |  |  |         }, | 
 |  |  |         gbPlay(){ | 
 |  |  |           console.log('前端控制:播放'); | 
 |  |  |           this.$axios({ | 
 |  |  |             method: 'get', | 
 |  |  |             url: '/api/playback/resume/' + this.streamId | 
 |  |  |           }).then((res)=> { | 
 |  |  |             this.$refs.videoPlayer.play(this.videoUrl) | 
 |  |  |           }); | 
 |  |  |         }, | 
 |  |  |         gbPause(){ | 
 |  |  |           console.log('前端控制:暂停'); | 
 |  |  |           this.$axios({ | 
 |  |  |             method: 'get', | 
 |  |  |             url: '/api/playback/pause/' + this.streamId | 
 |  |  |           }).then(function (res) {}); | 
 |  |  |         }, | 
 |  |  |         gbScale(command){ | 
 |  |  |           console.log('前端控制:倍速 ' + command); | 
 |  |  |           this.$axios({ | 
 |  |  |             method: 'get', | 
 |  |  |             url: `/api/playback/speed/${this.streamId }/${command}` | 
 |  |  |           }).then(function (res) {}); | 
 |  |  |         }, | 
 |  |  |         gbSeek(val){ | 
 |  |  |           console.log('前端控制:seek '); | 
 |  |  |           console.log(this.seekTime); | 
 |  |  |           console.log(this.sliderTime); | 
 |  |  |           let showTime = new Date(new Date(this.recordStartTime).getTime() + this.seekTime * val / 100) | 
 |  |  |           let hour = showTime.getHours(); | 
 |  |  |           let minutes = showTime.getMinutes(); | 
 |  |  |           let seconds = showTime.getSeconds(); | 
 |  |  |           this.showTimeText = (hour < 10?("0" + hour):hour) + ":" + (minutes<10?("0" + minutes):minutes) + ":" + (seconds<10?("0" + seconds):seconds) | 
 |  |  |           this.$axios({ | 
 |  |  |             method: 'get', | 
 |  |  |             url: `/api/playback/seek/${this.streamId }/` + Math.floor(this.seekTime * val / 100000) | 
 |  |  |           }).then(function (res) {}); | 
 |  |  |         } | 
 |  |  |  | 
 |  |  |     } | 
 |  |  | }; | 
 |  |  | </script> |