devicePlayer.vue 52 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141
  1. <template>
  2. <div id="devicePlayer" v-loading="isLoging">
  3. <el-dialog title="视频播放" top="0" :close-on-click-modal="false" :visible.sync="showVideoDialog" @close="close()">
  4. <!-- <LivePlayer v-if="showVideoDialog" ref="videoPlayer" :videoUrl="videoUrl" :error="videoError" :message="videoError" :hasaudio="hasaudio" fluent autoplay live></LivePlayer> -->
  5. <div style="width: 100%; height: 100%">
  6. <el-tabs type="card" :stretch="true" v-model="activePlayer" @tab-click="changePlayer" v-if="Object.keys(this.player).length > 1">
  7. <el-tab-pane label="Jessibuca" name="jessibuca">
  8. <jessibucaPlayer v-if="activePlayer === 'jessibuca'" ref="jessibuca" :visible.sync="showVideoDialog" :videoUrl="videoUrl" :error="videoError" :message="videoError" height="100px" :hasAudio="hasAudio" fluent autoplay live ></jessibucaPlayer>
  9. </el-tab-pane>
  10. <el-tab-pane label="WebRTC" name="webRTC">
  11. <rtc-player v-if="activePlayer === 'webRTC'" ref="webRTC" :visible.sync="showVideoDialog" :videoUrl="videoUrl" :error="videoError" :message="videoError" height="100px" :hasAudio="hasAudio" fluent autoplay live ></rtc-player>
  12. </el-tab-pane>
  13. <el-tab-pane label="h265web">h265web敬请期待</el-tab-pane>
  14. <el-tab-pane label="wsPlayer">wsPlayer 敬请期待</el-tab-pane>
  15. </el-tabs>
  16. <jessibucaPlayer v-if="Object.keys(this.player).length == 1 && this.player.jessibuca" ref="jessibuca" :visible.sync="showVideoDialog" :videoUrl="videoUrl" :error="videoError" :message="videoError" height="100px" :hasAudio="hasAudio" fluent autoplay live ></jessibucaPlayer>
  17. <rtc-player v-if="Object.keys(this.player).length == 1 && this.player.webRTC" ref="jessibuca" :visible.sync="showVideoDialog" :videoUrl="videoUrl" :error="videoError" :message="videoError" height="100px" :hasAudio="hasAudio" fluent autoplay live ></rtc-player>
  18. </div>
  19. <div id="shared" style="text-align: right; margin-top: 1rem;">
  20. <el-tabs v-model="tabActiveName" @tab-click="tabHandleClick" >
  21. <el-tab-pane label="实时视频" name="media">
  22. <div style="margin-bottom: 0.5rem;">
  23. <!-- <el-button type="primary" size="small" @click="playRecord(true, '')">播放</el-button>-->
  24. <!-- <el-button type="primary" size="small" @click="startRecord()">录制</el-button>-->
  25. <!-- <el-button type="primary" size="small" @click="stopRecord()">停止录制</el-button>-->
  26. </div>
  27. <div style="display: flex; margin-bottom: 0.5rem; height: 2.5rem;">
  28. <span style="width: 5rem; line-height: 2.5rem; text-align: right;">播放地址:</span>
  29. <el-input v-model="getPlayerShared.sharedUrl" :disabled="true" >
  30. <template slot="append">
  31. <i class="cpoy-btn el-icon-document-copy" title="点击拷贝" v-clipboard="getPlayerShared.sharedUrl" @success="$message({type:'success', message:'成功拷贝到粘贴板'})"></i>
  32. </template>
  33. </el-input>
  34. </div>
  35. <div style="display: flex; margin-bottom: 0.5rem; height: 2.5rem;">
  36. <span style="width: 5rem; line-height: 2.5rem; text-align: right;">iframe:</span>
  37. <el-input v-model="getPlayerShared.sharedIframe" :disabled="true" >
  38. <template slot="append">
  39. <i class="cpoy-btn el-icon-document-copy" title="点击拷贝" v-clipboard="getPlayerShared.sharedIframe" @success="$message({type:'success', message:'成功拷贝到粘贴板'})"></i>
  40. </template>
  41. </el-input>
  42. </div>
  43. <div style="display: flex; margin-bottom: 0.5rem; height: 2.5rem;">
  44. <span style="width: 5rem; line-height: 2.5rem; text-align: right;">资源地址:</span>
  45. <el-input v-model="getPlayerShared.sharedRtmp" :disabled="true" >
  46. <el-button slot="append" icon="el-icon-document-copy" title="点击拷贝" v-clipboard="getPlayerShared.sharedRtmp" @success="$message({type:'success', message:'成功拷贝到粘贴板'})"></el-button>
  47. <el-dropdown slot="prepend" v-if="streamInfo" trigger="click" @command="copyUrl">
  48. <el-button >
  49. 更多地址<i class="el-icon-arrow-down el-icon--right"></i>
  50. </el-button>
  51. <el-dropdown-menu slot="dropdown" >
  52. <el-dropdown-item :command="streamInfo.flv">
  53. <el-tag >FLV:</el-tag>
  54. <span>{{ streamInfo.flv }}</span>
  55. </el-dropdown-item>
  56. <el-dropdown-item :command="streamInfo.https_flv">
  57. <el-tag >FLV(https):</el-tag>
  58. <span>{{ streamInfo.https_flv }}</span>
  59. </el-dropdown-item>
  60. <el-dropdown-item :command="streamInfo.ws_flv">
  61. <el-tag >FLV(ws):</el-tag>
  62. <span >{{ streamInfo.ws_flv }}</span>
  63. </el-dropdown-item>
  64. <el-dropdown-item :command="streamInfo.wss_flv">
  65. <el-tag >FLV(wss):</el-tag>
  66. <span>{{ streamInfo.wss_flv }}</span>
  67. </el-dropdown-item>
  68. <el-dropdown-item :command="streamInfo.fmp4">
  69. <el-tag >FMP4:</el-tag>
  70. <span>{{ streamInfo.fmp4 }}</span>
  71. </el-dropdown-item>
  72. <el-dropdown-item :command="streamInfo.https_fmp4">
  73. <el-tag >FMP4(https):</el-tag>
  74. <span>{{ streamInfo.https_fmp4 }}</span>
  75. </el-dropdown-item>
  76. <el-dropdown-item :command="streamInfo.ws_fmp4">
  77. <el-tag >FMP4(ws):</el-tag>
  78. <span>{{ streamInfo.ws_fmp4 }}</span>
  79. </el-dropdown-item>
  80. <el-dropdown-item :command="streamInfo.wss_fmp4">
  81. <el-tag >FMP4(wss):</el-tag>
  82. <span>{{ streamInfo.wss_fmp4 }}</span>
  83. </el-dropdown-item>
  84. <el-dropdown-item :command="streamInfo.hls">
  85. <el-tag>HLS:</el-tag>
  86. <span>{{ streamInfo.hls }}</span>
  87. </el-dropdown-item>
  88. <el-dropdown-item :command="streamInfo.https_hls">
  89. <el-tag >HLS(https):</el-tag>
  90. <span>{{ streamInfo.https_hls }}</span>
  91. </el-dropdown-item>
  92. <el-dropdown-item :command="streamInfo.ws_hls">
  93. <el-tag >HLS(ws):</el-tag>
  94. <span>{{ streamInfo.ws_hls }}</span>
  95. </el-dropdown-item>
  96. <el-dropdown-item :command="streamInfo.wss_hls">
  97. <el-tag >HLS(wss):</el-tag>
  98. <span>{{ streamInfo.wss_hls }}</span>
  99. </el-dropdown-item>
  100. <el-dropdown-item :command="streamInfo.ts">
  101. <el-tag>TS:</el-tag>
  102. <span>{{ streamInfo.ts }}</span>
  103. </el-dropdown-item>
  104. <el-dropdown-item :command="streamInfo.https_ts">
  105. <el-tag>TS(https):</el-tag>
  106. <span>{{ streamInfo.https_ts }}</span>
  107. </el-dropdown-item>
  108. <el-dropdown-item :command="streamInfo.ws_ts">
  109. <el-tag>TS(ws):</el-tag>
  110. <span>{{ streamInfo.ws_ts }}</span>
  111. </el-dropdown-item>
  112. <el-dropdown-item :command="streamInfo.wss_ts">
  113. <el-tag>TS(wss):</el-tag>
  114. <span>{{ streamInfo.wss_ts }}</span>
  115. </el-dropdown-item>
  116. <el-dropdown-item :command="streamInfo.rtc">
  117. <el-tag >RTC:</el-tag>
  118. <span>{{ streamInfo.rtc }}</span>
  119. </el-dropdown-item>
  120. <el-dropdown-item :command="streamInfo.rtmp">
  121. <el-tag >RTMP:</el-tag>
  122. <span>{{ streamInfo.rtmp }}</span>
  123. </el-dropdown-item>
  124. <el-dropdown-item :command="streamInfo.rtmps">
  125. <el-tag >RTMPS:</el-tag>
  126. <span>{{ streamInfo.rtmps }}</span>
  127. </el-dropdown-item>
  128. <el-dropdown-item :command="streamInfo.rtsp">
  129. <el-tag >RTSP:</el-tag>
  130. <span>{{ streamInfo.rtsp }}</span>
  131. </el-dropdown-item>
  132. <el-dropdown-item :command="streamInfo.rtsps">
  133. <el-tag >RTSPS:</el-tag>
  134. <span>{{ streamInfo.rtsps }}</span>
  135. </el-dropdown-item>
  136. </el-dropdown-menu>
  137. </el-dropdown>
  138. </el-input>
  139. </div>
  140. </el-tab-pane>
  141. <!--{"code":0,"data":{"paths":["22-29-30.mp4"],"rootPath":"/home/kkkkk/Documents/ZLMediaKit/release/linux/Debug/www/record/hls/kkkkk/2020-05-11/"}}-->
  142. <el-tab-pane label="录像查询" name="record" v-if="showRrecord">
  143. <div style="width: 100%;">
  144. <div style="width: 100%; text-align: left">
  145. <span>录像控制</span>
  146. <el-button-group style="margin-left: 1rem;">
  147. <el-button size="mini" class="iconfont icon-zanting" title="开始" @click="gbPause()"></el-button>
  148. <el-button size="mini" class="iconfont icon-kaishi" title="暂停" @click="gbPlay()"></el-button>
  149. <el-dropdown size="mini" title="播放倍速" style="margin-left: 1px;" @command="gbScale">
  150. <el-button size="mini">
  151. 倍速 <i class="el-icon-arrow-down el-icon--right"></i>
  152. </el-button>
  153. <el-dropdown-menu slot="dropdown">
  154. <el-dropdown-item command="0.25">0.25倍速</el-dropdown-item>
  155. <el-dropdown-item command="0.5">0.5倍速</el-dropdown-item>
  156. <el-dropdown-item command="1.0">1倍速</el-dropdown-item>
  157. <el-dropdown-item command="2.0">2倍速</el-dropdown-item>
  158. <el-dropdown-item command="4.0">4倍速</el-dropdown-item>
  159. </el-dropdown-menu>
  160. </el-dropdown>
  161. </el-button-group>
  162. <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>
  163. </div>
  164. <div style="width: 100%; text-align: left">
  165. <span class="demonstration" style="padding: 12px 36px 12px 0;float: left;">{{showTimeText}}</span>
  166. <el-slider style="width: 80%; float:left;" v-model="sliderTime" @change="gbSeek" :show-tooltip="false"></el-slider>
  167. </div>
  168. </div>
  169. <el-table :data="videoHistory.searchHistoryResult" height="150" v-loading="recordsLoading">
  170. <el-table-column label="名称" prop="name"></el-table-column>
  171. <el-table-column label="文件" prop="filePath"></el-table-column>
  172. <el-table-column label="开始时间" prop="startTime" :formatter="timeFormatter"></el-table-column>
  173. <el-table-column label="结束时间" prop="endTime" :formatter="timeFormatter"></el-table-column>
  174. <el-table-column label="操作">
  175. <template slot-scope="scope">
  176. <el-button-group>
  177. <el-button icon="el-icon-video-play" size="mini" @click="playRecord(scope.row)">播放</el-button>
  178. <el-button icon="el-icon-download" size="mini" @click="downloadRecord(scope.row)">下载</el-button>
  179. </el-button-group>
  180. </template>
  181. </el-table-column>
  182. </el-table>
  183. </el-tab-pane>
  184. <!--遥控界面-->
  185. <el-tab-pane label="云台控制" name="control" v-if="showPtz">
  186. <div style="display: flex; justify-content: left;">
  187. <div class="control-wrapper">
  188. <div class="control-btn control-top" @mousedown="ptzCamera('up')" @mouseup="ptzCamera('stop')">
  189. <i class="el-icon-caret-top"></i>
  190. <div class="control-inner-btn control-inner"></div>
  191. </div>
  192. <div class="control-btn control-left" @mousedown="ptzCamera('left')" @mouseup="ptzCamera('stop')">
  193. <i class="el-icon-caret-left"></i>
  194. <div class="control-inner-btn control-inner"></div>
  195. </div>
  196. <div class="control-btn control-bottom" @mousedown="ptzCamera('down')" @mouseup="ptzCamera('stop')">
  197. <i class="el-icon-caret-bottom"></i>
  198. <div class="control-inner-btn control-inner"></div>
  199. </div>
  200. <div class="control-btn control-right" @mousedown="ptzCamera('right')" @mouseup="ptzCamera('stop')">
  201. <i class="el-icon-caret-right"></i>
  202. <div class="control-inner-btn control-inner"></div>
  203. </div>
  204. <div class="control-round">
  205. <div class="control-round-inner"><i class="fa fa-pause-circle"></i></div>
  206. </div>
  207. <div style="position: absolute; left: 7.25rem; top: 1.25rem" @mousedown="ptzCamera('zoomin')" @mouseup="ptzCamera('stop')"><i class="el-icon-zoom-in control-zoom-btn" style="font-size: 1.875rem;"></i></div>
  208. <div style="position: absolute; left: 7.25rem; top: 3.25rem; font-size: 1.875rem;" @mousedown="ptzCamera('zoomout')" @mouseup="ptzCamera('stop')"><i class="el-icon-zoom-out control-zoom-btn"></i></div>
  209. <div class="contro-speed" style="position: absolute; left: 4px; top: 7rem; width: 9rem;">
  210. <el-slider v-model="controSpeed" :max="255"></el-slider>
  211. </div>
  212. </div>
  213. <div class="control-panel">
  214. <el-button-group>
  215. <el-tag style="position :absolute; left: 0rem; top: 0rem; width: 5rem; text-align: center" size="medium">预置位编号</el-tag>
  216. <el-input-number style="position: absolute; left: 5rem; top: 0rem; width: 6rem" size="mini" v-model="presetPos" controls-position="right" :precision="0" :step="1" :min="1" :max="255"></el-input-number>
  217. <el-button style="position: absolute; left: 11rem; top: 0rem; width: 5rem" size="mini" icon="el-icon-add-location" @click="presetPosition(129, presetPos)">设置</el-button>
  218. <el-button style="position: absolute; left: 27rem; top: 0rem; width: 5rem" size="mini" type="primary" icon="el-icon-place" @click="presetPosition(130, presetPos)">调用</el-button>
  219. <el-button style="position: absolute; left: 16rem; top: 0rem; width: 5rem" size="mini" icon="el-icon-delete-location" @click="presetPosition(131, presetPos)">删除</el-button>
  220. <el-tag style="position :absolute; left: 0rem; top: 2.5rem; width: 5rem; text-align: center" size="medium">巡航速度</el-tag>
  221. <el-input-number style="position: absolute; left: 5rem; top: 2.5rem; width: 6rem" size="mini" v-model="cruisingSpeed" controls-position="right" :precision="0" :min="1" :max="4095"></el-input-number>
  222. <el-button style="position: absolute; left: 11rem; top: 2.5rem; width: 5rem" size="mini" icon="el-icon-loading" @click="setSpeedOrTime(134, cruisingGroup, cruisingSpeed)">设置</el-button>
  223. <el-tag style="position :absolute; left: 16rem; top: 2.5rem; width: 5rem; text-align: center" size="medium">停留时间</el-tag>
  224. <el-input-number style="position: absolute; left: 21rem; top: 2.5rem; width: 6rem" size="mini" v-model="cruisingTime" controls-position="right" :precision="0" :min="1" :max="4095"></el-input-number>
  225. <el-button style="position: absolute; left: 27rem; top: 2.5rem; width: 5rem" size="mini" icon="el-icon-timer" @click="setSpeedOrTime(135, cruisingGroup, cruisingTime)">设置</el-button>
  226. <el-tag style="position :absolute; left: 0rem; top: 4.5rem; width: 5rem; text-align: center" size="medium">巡航组编号</el-tag>
  227. <el-input-number style="position: absolute; left: 5rem; top: 4.5rem; width: 6rem" size="mini" v-model="cruisingGroup" controls-position="right" :precision="0" :min="0" :max="255"></el-input-number>
  228. <el-button style="position: absolute; left: 11rem; top: 4.5rem; width: 5rem" size="mini" icon="el-icon-add-location" @click="setCommand(132, cruisingGroup, presetPos)">添加点</el-button>
  229. <el-button style="position: absolute; left: 16rem; top: 4.5rem; width: 5rem" size="mini" icon="el-icon-delete-location" @click="setCommand(133, cruisingGroup, presetPos)">删除点</el-button>
  230. <el-button style="position: absolute; left: 21rem; top: 4.5rem; width: 5rem" size="mini" icon="el-icon-delete" @click="setCommand(133, cruisingGroup, 0)">删除组</el-button>
  231. <el-button style="position: absolute; left: 27rem; top: 5rem; width: 5rem" size="mini" type="primary" icon="el-icon-video-camera-solid" @click="setCommand(136, cruisingGroup, 0)">巡航</el-button>
  232. <el-tag style="position :absolute; left: 0rem; top: 7rem; width: 5rem; text-align: center" size="medium">扫描速度</el-tag>
  233. <el-input-number style="position: absolute; left: 5rem; top: 7rem; width: 6rem" size="mini" v-model="scanSpeed" controls-position="right" :precision="0" :min="1" :max="4095"></el-input-number>
  234. <el-button style="position: absolute; left: 11rem; top: 7rem; width: 5rem" size="mini" icon="el-icon-loading" @click="setSpeedOrTime(138, scanGroup, scanSpeed)">设置</el-button>
  235. <el-tag style="position :absolute; left: 0rem; top: 9rem; width: 5rem; text-align: center" size="medium">扫描组编号</el-tag>
  236. <el-input-number style="position: absolute; left: 5rem; top: 9rem; width: 6rem" size="mini" v-model="scanGroup" controls-position="right" :precision="0" :step="1" :min="0" :max="255"></el-input-number>
  237. <el-button style="position: absolute; left: 11rem; top: 9rem; width: 5rem" size="mini" icon="el-icon-d-arrow-left" @click="setCommand(137, scanGroup, 1)">左边界</el-button>
  238. <el-button style="position: absolute; left: 16rem; top: 9rem; width: 5rem" size="mini" icon="el-icon-d-arrow-right" @click="setCommand(137, scanGroup, 2)">右边界</el-button>
  239. <el-button style="position: absolute; left: 27rem; top: 7rem; width: 5rem" size="mini" type="primary" icon="el-icon-video-camera-solid" @click="setCommand(137, scanGroup, 0)">扫描</el-button>
  240. <el-button style="position: absolute; left: 27rem; top: 9rem; width: 5rem" size="mini" type="danger" icon="el-icon-switch-button" @click="ptzCamera('stop')">停止</el-button>
  241. </el-button-group>
  242. </div>
  243. </div>
  244. </el-tab-pane>
  245. <el-tab-pane label="编码信息" name="codec" v-loading="tracksLoading">
  246. <p>
  247. 无法播放或者没有声音?&nbsp&nbsp&nbsp试一试&nbsp
  248. <el-button size="mini" type="primary" v-if="!coverPlaying" @click="coverPlay">转码播放</el-button>
  249. <el-button size="mini" type="danger" v-if="coverPlaying" @click="convertStopClick">停止转码</el-button>
  250. </p>
  251. <div class="trank" >
  252. <p v-if="tracksNotLoaded" style="text-align: center;padding-top: 3rem;">暂无数据</p>
  253. <div v-for="(item, index) in tracks" style="width: 50%; float: left" loading>
  254. <span >流 {{index}}</span>
  255. <div class="trankInfo" v-if="item.codec_type == 0">
  256. <p>格式: {{item.codec_id_name}}</p>
  257. <p>类型: 视频</p>
  258. <p>分辨率: {{item.width}} x {{item.height}}</p>
  259. <p>帧率: {{item.fps}}</p>
  260. </div>
  261. <div class="trankInfo" v-if="item.codec_type == 1">
  262. <p>格式: {{item.codec_id_name}}</p>
  263. <p>类型: 音频</p>
  264. <p>采样位数: {{item.sample_bit}}</p>
  265. <p>采样率: {{item.sample_rate}}</p>
  266. </div>
  267. </div>
  268. </div>
  269. </el-tab-pane>
  270. <el-tab-pane label="语音对讲" name="broadcast" >
  271. <div class="trank" style="text-align: center;">
  272. <el-button @click="broadcastStatusClick()" :type="getBroadcastStatus()" :disabled="broadcastStatus === -2" circle icon="el-icon-microphone" style="font-size: 32px; padding: 24px;margin-top: 24px;"/>
  273. <p>
  274. <span v-if="broadcastStatus === -2">正在释放资源</span>
  275. <span v-if="broadcastStatus === -1">点击开始对讲</span>
  276. <span v-if="broadcastStatus === 0">等待接通中...</span>
  277. <span v-if="broadcastStatus === 1">请说话</span>
  278. </p>
  279. </div>
  280. </el-tab-pane>
  281. </el-tabs>
  282. </div>
  283. </el-dialog>
  284. <recordDownload ref="recordDownload"></recordDownload>
  285. </div>
  286. </template>
  287. <script>
  288. import rtcPlayer from '../dialog/rtcPlayer.vue'
  289. // import LivePlayer from '@liveqing/liveplayer'
  290. // import player from '../dialog/easyPlayer.vue'
  291. import jessibucaPlayer from '../common/jessibuca.vue'
  292. import recordDownload from '../dialog/recordDownload.vue'
  293. export default {
  294. name: 'devicePlayer',
  295. props: {},
  296. components: {
  297. jessibucaPlayer, rtcPlayer, recordDownload,
  298. },
  299. computed: {
  300. getPlayerShared: function () {
  301. return {
  302. sharedUrl: window.location.origin + '/#/play/wasm/' + encodeURIComponent(this.videoUrl),
  303. sharedIframe: '<iframe src="' + window.location.origin + '/#/play/wasm/' + encodeURIComponent(this.videoUrl) + '"></iframe>',
  304. sharedRtmp: this.videoUrl
  305. };
  306. }
  307. },
  308. created() {
  309. console.log(this.player)
  310. if (Object.keys(this.player).length === 1) {
  311. this.activePlayer = Object.keys(this.player)[0]
  312. }
  313. },
  314. data() {
  315. return {
  316. video: 'http://lndxyj.iqilu.com/public/upload/2019/10/14/8c001ea0c09cdc59a57829dabc8010fa.mp4',
  317. videoUrl: '',
  318. activePlayer: "jessibuca",
  319. // 如何你只是用一种播放器,直接注释掉不用的部分即可
  320. player: {
  321. jessibuca : ["ws_flv", "wss_flv"],
  322. webRTC: ["rtc", "rtc"],
  323. },
  324. videoHistory: {
  325. date: '',
  326. searchHistoryResult: [] //媒体流历史记录搜索结果
  327. },
  328. showVideoDialog: false,
  329. streamId: '',
  330. app : '',
  331. mediaServerId : '',
  332. convertKey: '',
  333. deviceId: '',
  334. channelId: '',
  335. tabActiveName: 'media',
  336. hasAudio: false,
  337. loadingRecords: false,
  338. recordsLoading: false,
  339. isLoging: false,
  340. controSpeed: 30,
  341. timeVal: 0,
  342. timeMin: 0,
  343. timeMax: 1440,
  344. presetPos: 1,
  345. cruisingSpeed: 100,
  346. cruisingTime: 5,
  347. cruisingGroup: 0,
  348. scanSpeed: 100,
  349. scanGroup: 0,
  350. tracks: [],
  351. coverPlaying:false,
  352. tracksLoading: false,
  353. recordPlay: "",
  354. showPtz: true,
  355. showRrecord: true,
  356. tracksNotLoaded: false,
  357. sliderTime: 0,
  358. seekTime: 0,
  359. recordStartTime: 0,
  360. showTimeText: "00:00:00",
  361. streamInfo: null,
  362. broadcastRtc: null,
  363. broadcastStatus: -1, // -2 正在释放资源 -1 默认状态 0 等待接通 1 接通成功
  364. };
  365. },
  366. methods: {
  367. tabHandleClick: function(tab, event) {
  368. console.log(tab)
  369. var that = this;
  370. that.tracks = [];
  371. that.tracksLoading = true;
  372. that.tracksNotLoaded = false;
  373. if (tab.name === "codec") {
  374. this.$axios({
  375. method: 'get',
  376. url: '/zlm/' +this.mediaServerId+ '/index/api/getMediaInfo?vhost=__defaultVhost__&schema=rtmp&app='+ this.app +'&stream='+ this.streamId
  377. }).then(function (res) {
  378. that.tracksLoading = false;
  379. if (res.data.code == 0 && res.data.online) {
  380. that.tracks = res.data.tracks;
  381. }else{
  382. that.tracksNotLoaded = true;
  383. that.$message({
  384. showClose: true,
  385. message: '获取编码信息失败,',
  386. type: 'warning'
  387. });
  388. }
  389. }).catch(function (e) {});
  390. }
  391. },
  392. changePlayer: function (tab) {
  393. console.log(this.player[tab.name][0])
  394. this.activePlayer = tab.name;
  395. this.videoUrl = this.streamInfo[this.player[tab.name][0]]
  396. console.log(this.videoUrl)
  397. },
  398. openDialog: function (tab, deviceId, channelId, param) {
  399. this.tabActiveName = tab;
  400. this.channelId = channelId;
  401. this.deviceId = deviceId;
  402. this.streamId = "";
  403. this.mediaServerId = "";
  404. this.app = "";
  405. this.videoUrl = ""
  406. if (!!this.$refs[this.activePlayer]) {
  407. this.$refs[this.activePlayer].pause();
  408. }
  409. switch (tab) {
  410. case "media":
  411. this.play(param.streamInfo, param.hasAudio)
  412. break;
  413. case "record":
  414. this.showVideoDialog = true;
  415. this.videoHistory.date = param.date;
  416. this.queryRecords()
  417. break;
  418. case "streamPlay":
  419. this.tabActiveName = "media";
  420. this.showRrecord = false;
  421. this.showPtz = false;
  422. this.play(param.streamInfo, param.hasAudio)
  423. break;
  424. case "control":
  425. break;
  426. }
  427. },
  428. timeAxisSelTime: function (val) {
  429. console.log(val)
  430. },
  431. play: function (streamInfo, hasAudio) {
  432. this.streamInfo = streamInfo;
  433. this.hasAudio = hasAudio;
  434. this.isLoging = false;
  435. // this.videoUrl = streamInfo.rtc;
  436. this.videoUrl = this.getUrlByStreamInfo();
  437. this.streamId = streamInfo.stream;
  438. this.app = streamInfo.app;
  439. this.mediaServerId = streamInfo.mediaServerId;
  440. this.playFromStreamInfo(false, streamInfo)
  441. },
  442. getUrlByStreamInfo(){
  443. if (location.protocol === "https:") {
  444. this.videoUrl = this.streamInfo[this.player[this.activePlayer][1]]
  445. }else {
  446. this.videoUrl = this.streamInfo[this.player[this.activePlayer][0]]
  447. }
  448. return this.videoUrl;
  449. },
  450. coverPlay: function () {
  451. var that = this;
  452. this.coverPlaying = true;
  453. this.$refs[this.activePlayer].pause()
  454. that.$axios({
  455. method: 'post',
  456. url: '/api/gb_record/convert/' + that.streamId
  457. }).then(function (res) {
  458. if (res.data.code == 0) {
  459. that.convertKey = res.data.key;
  460. setTimeout(()=>{
  461. that.isLoging = false;
  462. that.playFromStreamInfo(false, res.data.data);
  463. }, 2000)
  464. } else {
  465. that.isLoging = false;
  466. that.coverPlaying = false;
  467. that.$message({
  468. showClose: true,
  469. message: '转码失败',
  470. type: 'error'
  471. });
  472. }
  473. }).catch(function (e) {
  474. console.log(e)
  475. that.coverPlaying = false;
  476. that.$message({
  477. showClose: true,
  478. message: '播放错误',
  479. type: 'error'
  480. });
  481. });
  482. },
  483. convertStopClick: function() {
  484. this.convertStop(()=>{
  485. this.$refs[this.activePlayer].play(this.videoUrl)
  486. });
  487. },
  488. convertStop: function(callback) {
  489. var that = this;
  490. that.$refs.videoPlayer.pause()
  491. this.$axios({
  492. method: 'post',
  493. url: '/api/play/convertStop/' + this.convertKey
  494. }).then(function (res) {
  495. if (res.data.code == 0) {
  496. console.log(res.data.msg)
  497. }else {
  498. console.error(res.data.msg)
  499. }
  500. if (callback )callback();
  501. }).catch(function (e) {});
  502. that.coverPlaying = false;
  503. that.convertKey = "";
  504. // if (callback )callback();
  505. },
  506. playFromStreamInfo: function (realHasAudio, streamInfo) {
  507. this.showVideoDialog = true;
  508. this.hasaudio = realHasAudio && this.hasaudio;
  509. this.$refs[this.activePlayer].play(this.getUrlByStreamInfo(streamInfo))
  510. },
  511. close: function () {
  512. console.log('关闭视频');
  513. if (!!this.$refs[this.activePlayer]){
  514. this.$refs[this.activePlayer].pause();
  515. }
  516. this.videoUrl = '';
  517. this.coverPlaying = false;
  518. this.showVideoDialog = false;
  519. if (this.convertKey != '') {
  520. this.convertStop();
  521. }
  522. this.convertKey = ''
  523. if (this.recordPlay != '') {
  524. this.stopPlayRecord();
  525. }
  526. this.recordPlay = ''
  527. if (this.broadcastStatus === 1) {
  528. this.stopBroadcast()
  529. }
  530. },
  531. copySharedInfo: function (data) {
  532. console.log('复制内容:' + data);
  533. this.coverPlaying = false;
  534. this.tracks = []
  535. let _this = this;
  536. this.$copyText(data).then(
  537. function (e) {
  538. _this.$message({
  539. showClose: true,
  540. message: '复制成功',
  541. type: 'success'
  542. });
  543. },
  544. function (e) {
  545. _this.$message({
  546. showClose: true,
  547. message: '复制失败,请手动复制',
  548. type: 'error'
  549. });
  550. }
  551. );
  552. },
  553. queryRecords: function () {
  554. if (!this.videoHistory.date) {
  555. return;
  556. }
  557. this.recordsLoading = true;
  558. this.videoHistory.searchHistoryResult = [];
  559. let that = this;
  560. var startTime = this.videoHistory.date + " 00:00:00";
  561. var endTime = this.videoHistory.date + " 23:59:59";
  562. this.$axios({
  563. method: 'get',
  564. url: '/api/gb_record/query/' + this.deviceId + '/' + this.channelId + '?startTime=' + startTime + '&endTime=' + endTime
  565. }).then(function (res) {
  566. console.log(res)
  567. if(res.data.code === 0) {
  568. // 处理时间信息
  569. that.videoHistory.searchHistoryResult = res.data.data.recordList;
  570. that.recordsLoading = false;
  571. }else {
  572. this.$message({
  573. showClose: true,
  574. message: res.data.msg,
  575. type: "error",
  576. });
  577. }
  578. }).catch(function (e) {
  579. console.log(e.message);
  580. // that.videoHistory.searchHistoryResult = falsificationData.recordData;
  581. });
  582. },
  583. onTimeChange: function (video) {
  584. // this.queryRecords()
  585. },
  586. playRecord: function (row) {
  587. let that = this;
  588. let startTime = row.startTime
  589. this.recordStartTime = row.startTime
  590. this.showTimeText = row.startTime.split(" ")[1]
  591. let endtime = row.endTime
  592. this.sliderTime = 0;
  593. this.seekTime = new Date(endtime).getTime() - new Date(startTime).getTime();
  594. console.log(this.seekTime)
  595. if (that.streamId != "") {
  596. that.stopPlayRecord(function () {
  597. that.streamId = "";
  598. that.playRecord(row);
  599. })
  600. } else {
  601. this.$axios({
  602. method: 'get',
  603. url: '/api/playback/start/' + this.deviceId + '/' + this.channelId + '?startTime=' + row.startTime + '&endTime=' +
  604. row.endTime
  605. }).then(function (res) {
  606. that.streamInfo = res.data;
  607. that.app = that.streamInfo.app;
  608. that.streamId = that.streamInfo.stream;
  609. that.mediaServerId = that.streamInfo.mediaServerId;
  610. that.ssrc = that.streamInfo.ssrc;
  611. that.videoUrl = that.getUrlByStreamInfo();
  612. that.recordPlay = true;
  613. });
  614. }
  615. },
  616. stopPlayRecord: function (callback) {
  617. this.$refs[this.activePlayer].pause();
  618. this.videoUrl = '';
  619. this.$axios({
  620. method: 'get',
  621. url: '/api/playback/stop/' + this.deviceId + "/" + this.channelId + "/" + this.streamId
  622. }).then(function (res) {
  623. if (callback) callback()
  624. });
  625. },
  626. downloadRecord: function (row) {
  627. let that = this;
  628. if (that.streamId != "") {
  629. that.stopDownloadRecord(function (res) {
  630. if (res.code == 0) {
  631. that.streamId = "";
  632. that.downloadRecord(row);
  633. }else {
  634. this.$message({
  635. showClose: true,
  636. message: res.data.msg,
  637. type: "error",
  638. });
  639. }
  640. })
  641. } else {
  642. this.$axios({
  643. method: 'get',
  644. url: '/api/gb_record/download/start/' + this.deviceId + '/' + this.channelId + '?startTime=' + row.startTime + '&endTime=' +
  645. row.endTime + '&downloadSpeed=4'
  646. }).then(function (res) {
  647. if (res.data.code == 0) {
  648. let streamInfo = res.data.data;
  649. that.recordPlay = false;
  650. that.$refs.recordDownload.openDialog(that.deviceId, that.channelId, streamInfo.app, streamInfo.stream, streamInfo.mediaServerId);
  651. }else {
  652. that.$message({
  653. showClose: true,
  654. message: res.data.msg,
  655. type: "error",
  656. });
  657. }
  658. });
  659. }
  660. },
  661. stopDownloadRecord: function (callback) {
  662. this.$refs[this.activePlayer].pause();
  663. this.videoUrl = '';
  664. this.$axios({
  665. method: 'get',
  666. url: '/api/gb_record/download/stop/' + this.deviceId + "/" + this.channelId+ "/" + this.streamId
  667. }).then((res)=> {
  668. if (callback) callback(res)
  669. });
  670. },
  671. ptzCamera: function (command) {
  672. console.log('云台控制:' + command);
  673. let that = this;
  674. this.$axios({
  675. method: 'post',
  676. url: '/api/ptz/control/' + this.deviceId + '/' + this.channelId + '?command=' + command + '&horizonSpeed=' + this.controSpeed + '&verticalSpeed=' + this.controSpeed + '&zoomSpeed=' + this.controSpeed
  677. }).then(function (res) {});
  678. },
  679. //////////////////////播放器事件处理//////////////////////////
  680. videoError: function (e) {
  681. console.log("播放器错误:" + JSON.stringify(e));
  682. },
  683. presetPosition: function (cmdCode, presetPos) {
  684. console.log('预置位控制:' + this.presetPos + ' : 0x' + cmdCode.toString(16));
  685. let that = this;
  686. this.$axios({
  687. method: 'post',
  688. url: '/api/ptz/front_end_command/' + this.deviceId + '/' + this.channelId + '?cmdCode=' + cmdCode + '&parameter1=0&parameter2=' + presetPos + '&combindCode2=0'
  689. }).then(function (res) {});
  690. },
  691. setSpeedOrTime: function (cmdCode, groupNum, parameter) {
  692. let that = this;
  693. let parameter2 = parameter % 256;
  694. let combindCode2 = Math.floor(parameter / 256) * 16;
  695. console.log('前端控制:0x' + cmdCode.toString(16) + ' 0x' + groupNum.toString(16) + ' 0x' + parameter2.toString(16) + ' 0x' + combindCode2.toString(16));
  696. this.$axios({
  697. method: 'post',
  698. url: '/api/ptz/front_end_command/' + this.deviceId + '/' + this.channelId + '?cmdCode=' + cmdCode + '&parameter1=' + groupNum + '&parameter2=' + parameter2 + '&combindCode2=' + combindCode2
  699. }).then(function (res) {});
  700. },
  701. setCommand: function (cmdCode, groupNum, parameter) {
  702. let that = this;
  703. console.log('前端控制:0x' + cmdCode.toString(16) + ' 0x' + groupNum.toString(16) + ' 0x' + parameter.toString(16) + ' 0x0');
  704. this.$axios({
  705. method: 'post',
  706. url: '/api/ptz/front_end_command/' + this.deviceId + '/' + this.channelId + '?cmdCode=' + cmdCode + '&parameter1=' + groupNum + '&parameter2=' + parameter + '&combindCode2=0'
  707. }).then(function (res) {});
  708. },
  709. formatTooltip: function (val) {
  710. var h = parseInt(val / 60);
  711. var hStr = h < 10 ? ("0" + h) : h;
  712. var s = val % 60;
  713. var sStr = s < 10 ? ("0" + s) : s;
  714. return h + ":" + sStr;
  715. },
  716. timeFormatter: function (row, column, cellValue, index) {
  717. return cellValue.split(" ")[1];
  718. },
  719. mergeTime: function (timeArray) {
  720. var resultArray = [];
  721. for (let i = 0; i < timeArray.length; i++) {
  722. var startTime = new Date(timeArray[i].startTime);
  723. var endTime = new Date(timeArray[i].endTime);
  724. if (i == 0) {
  725. resultArray[0] = {
  726. startTime: startTime,
  727. endTime: endTime
  728. }
  729. }
  730. for (let j = 0; j < resultArray.length; j++) {
  731. if (startTime > resultArray[j].endTime) { // 合并
  732. if (startTime - resultArray[j].endTime <= 1000) {
  733. resultArray[j].endTime = endTime;
  734. } else {
  735. resultArray[resultArray.length] = {
  736. startTime: startTime,
  737. endTime: endTime
  738. }
  739. }
  740. } else if (resultArray[j].startTime > endTime) { // 合并
  741. if (resultArray[j].startTime - endTime <= 1000) {
  742. resultArray[j].startTime = startTime;
  743. } else {
  744. resultArray[resultArray.length] = {
  745. startTime: startTime,
  746. endTime: endTime
  747. }
  748. }
  749. }
  750. }
  751. }
  752. console.log(resultArray)
  753. return resultArray;
  754. },
  755. copyUrl: function (dropdownItem){
  756. console.log(dropdownItem)
  757. this.$copyText(dropdownItem).then((e)=> {
  758. this.$message.success("成功拷贝到粘贴板");
  759. }, (e)=> {
  760. })
  761. },
  762. gbPlay(){
  763. console.log('前端控制:播放');
  764. this.$axios({
  765. method: 'get',
  766. url: '/api/playback/resume/' + this.streamId
  767. }).then((res)=> {
  768. this.$refs[this.activePlayer].play(this.videoUrl)
  769. });
  770. },
  771. gbPause(){
  772. console.log('前端控制:暂停');
  773. this.$axios({
  774. method: 'get',
  775. url: '/api/playback/pause/' + this.streamId
  776. }).then(function (res) {});
  777. },
  778. gbScale(command){
  779. console.log('前端控制:倍速 ' + command);
  780. this.$axios({
  781. method: 'get',
  782. url: `/api/playback/speed/${this.streamId }/${command}`
  783. }).then(function (res) {});
  784. },
  785. gbSeek(val){
  786. console.log('前端控制:seek ');
  787. console.log(this.seekTime);
  788. console.log(this.sliderTime);
  789. let showTime = new Date(new Date(this.recordStartTime).getTime() + this.seekTime * val / 100)
  790. let hour = showTime.getHours();
  791. let minutes = showTime.getMinutes();
  792. let seconds = showTime.getSeconds();
  793. this.showTimeText = (hour < 10?("0" + hour):hour) + ":" + (minutes<10?("0" + minutes):minutes) + ":" + (seconds<10?("0" + seconds):seconds)
  794. this.$axios({
  795. method: 'get',
  796. url: `/api/playback/seek/${this.streamId }/` + Math.floor(this.seekTime * val / 100000)
  797. }).then( (res)=> {
  798. setTimeout(()=>{
  799. this.$refs[this.activePlayer].play(this.videoUrl)
  800. }, 600)
  801. });
  802. },
  803. getBroadcastStatus() {
  804. if (this.broadcastStatus == -2) {
  805. return "primary"
  806. }
  807. if (this.broadcastStatus == -1) {
  808. return "primary"
  809. }
  810. if (this.broadcastStatus == 0) {
  811. return "warning"
  812. }
  813. if (this.broadcastStatus == 1) {
  814. return "danger"
  815. }
  816. },
  817. broadcastStatusClick() {
  818. if (this.broadcastStatus == -1) {
  819. // 默认状态, 开始
  820. this.broadcastStatus = 0
  821. // 发起语音对讲
  822. this.$axios({
  823. method: 'get',
  824. url: '/api/play/broadcast/' + this.deviceId + '/' + this.channelId + "?timeout=30"
  825. }).then( (res)=> {
  826. if (res.data.code == 0) {
  827. let streamInfo = res.data.data.streamInfo;
  828. this.startBroadcast(streamInfo.rtc)
  829. }else {
  830. this.$message({
  831. showClose: true,
  832. message: res.data.msg,
  833. type: "error",
  834. });
  835. }
  836. });
  837. }else if (this.broadcastStatus === 1) {
  838. this.stopBroadcast()
  839. }
  840. },
  841. startBroadcast(url){
  842. console.log("开始语音对讲: " + url)
  843. this.broadcastRtc = new ZLMRTCClient.Endpoint({
  844. debug: true, // 是否打印日志
  845. zlmsdpUrl: url, //流地址
  846. simulecast: false,
  847. useCamera: false,
  848. audioEnable: true,
  849. videoEnable: false,
  850. recvOnly: false,
  851. })
  852. // webrtcPlayer.on(ZLMRTCClient.Events.WEBRTC_ON_REMOTE_STREAMS,(e)=>{//获取到了远端流,可以播放
  853. // console.error('播放成功',e.streams)
  854. // this.broadcastStatus = 1;
  855. // });
  856. //
  857. // webrtcPlayer.on(ZLMRTCClient.Events.WEBRTC_ON_LOCAL_STREAM,(s)=>{// 获取到了本地流
  858. // this.broadcastStatus = 1;
  859. // // document.getElementById('selfVideo').srcObject=s;
  860. // // this.eventcallbacK("LOCAL STREAM", "获取到了本地流")
  861. // });
  862. this.broadcastRtc.on(ZLMRTCClient.Events.WEBRTC_NOT_SUPPORT,(e)=>{// 获取到了本地流
  863. console.error('不支持webrtc',e)
  864. this.$message({
  865. showClose: true,
  866. message: '不支持webrtc, 无法进行语音对讲',
  867. type: 'error'
  868. });
  869. });
  870. this.broadcastRtc.on(ZLMRTCClient.Events.WEBRTC_ICE_CANDIDATE_ERROR,(e)=>{// ICE 协商出错
  871. console.error('ICE 协商出错')
  872. this.$message({
  873. showClose: true,
  874. message: 'ICE 协商出错',
  875. type: 'error'
  876. });
  877. });
  878. this.broadcastRtc.on(ZLMRTCClient.Events.WEBRTC_OFFER_ANWSER_EXCHANGE_FAILED,(e)=>{// offer anwser 交换失败
  879. console.error('offer anwser 交换失败',e)
  880. this.$message({
  881. showClose: true,
  882. message: 'offer anwser 交换失败' + e,
  883. type: 'error'
  884. });
  885. });
  886. this.broadcastRtc.on(ZLMRTCClient.Events.WEBRTC_ON_CONNECTION_STATE_CHANGE,(e)=>{// offer anwser 交换失败
  887. console.log('状态改变',e)
  888. if (e === "connecting") {
  889. this.broadcastStatus = 0;
  890. }else if (e === "connected") {
  891. this.broadcastStatus = 1;
  892. }else {
  893. this.broadcastStatus = -1;
  894. }
  895. });
  896. this.broadcastRtc.on(ZLMRTCClient.Events.CAPTURE_STREAM_FAILED,(e)=>{// offer anwser 交换失败
  897. console.log('捕获流失败',e)
  898. this.$message({
  899. showClose: true,
  900. message: '捕获流失败' + e,
  901. type: 'error'
  902. });
  903. });
  904. },
  905. stopBroadcast(){
  906. this.broadcastStatus = -2;
  907. this.broadcastRtc = null;
  908. this.$axios({
  909. method: 'get',
  910. url: '/api/play/broadcast/stop/' + this.deviceId + '/' + this.channelId
  911. }).then( (res)=> {
  912. if (res.data.code == 0) {
  913. // this.broadcastStatus = -1;
  914. // this.broadcastRtc.close()
  915. }else {
  916. this.$message({
  917. showClose: true,
  918. message: res.data.msg,
  919. type: "error",
  920. });
  921. }
  922. });
  923. }
  924. }
  925. };
  926. </script>
  927. <style>
  928. .control-wrapper {
  929. position: relative;
  930. width: 6.25rem;
  931. height: 6.25rem;
  932. max-width: 6.25rem;
  933. max-height: 6.25rem;
  934. border-radius: 100%;
  935. margin-top: 1.5rem;
  936. margin-left: 0.5rem;
  937. float: left;
  938. }
  939. .control-panel {
  940. position: relative;
  941. top: 0;
  942. left: 5rem;
  943. height: 11rem;
  944. max-height: 11rem;
  945. }
  946. .control-btn {
  947. display: flex;
  948. justify-content: center;
  949. position: absolute;
  950. width: 44%;
  951. height: 44%;
  952. border-radius: 5px;
  953. border: 1px solid #78aee4;
  954. box-sizing: border-box;
  955. transition: all 0.3s linear;
  956. }
  957. .control-btn:hover {
  958. cursor:pointer
  959. }
  960. .control-btn i {
  961. font-size: 20px;
  962. color: #78aee4;
  963. display: flex;
  964. justify-content: center;
  965. align-items: center;
  966. }
  967. .control-btn i:hover {
  968. cursor:pointer
  969. }
  970. .control-zoom-btn:hover {
  971. cursor:pointer
  972. }
  973. .control-round {
  974. position: absolute;
  975. top: 21%;
  976. left: 21%;
  977. width: 58%;
  978. height: 58%;
  979. background: #fff;
  980. border-radius: 100%;
  981. }
  982. .control-round-inner {
  983. position: absolute;
  984. left: 13%;
  985. top: 13%;
  986. display: flex;
  987. justify-content: center;
  988. align-items: center;
  989. width: 70%;
  990. height: 70%;
  991. font-size: 40px;
  992. color: #78aee4;
  993. border: 1px solid #78aee4;
  994. border-radius: 100%;
  995. transition: all 0.3s linear;
  996. }
  997. .control-inner-btn {
  998. position: absolute;
  999. width: 60%;
  1000. height: 60%;
  1001. background: #fafafa;
  1002. }
  1003. .control-top {
  1004. top: -8%;
  1005. left: 27%;
  1006. transform: rotate(-45deg);
  1007. border-radius: 5px 100% 5px 0;
  1008. }
  1009. .control-top i {
  1010. transform: rotate(45deg);
  1011. border-radius: 5px 100% 5px 0;
  1012. }
  1013. .control-top .control-inner {
  1014. left: -1px;
  1015. bottom: 0;
  1016. border-top: 1px solid #78aee4;
  1017. border-right: 1px solid #78aee4;
  1018. border-radius: 0 100% 0 0;
  1019. }
  1020. .control-top .fa {
  1021. transform: rotate(45deg) translateY(-7px);
  1022. }
  1023. .control-left {
  1024. top: 27%;
  1025. left: -8%;
  1026. transform: rotate(45deg);
  1027. border-radius: 5px 0 5px 100%;
  1028. }
  1029. .control-left i {
  1030. transform: rotate(-45deg);
  1031. }
  1032. .control-left .control-inner {
  1033. right: -1px;
  1034. top: -1px;
  1035. border-bottom: 1px solid #78aee4;
  1036. border-left: 1px solid #78aee4;
  1037. border-radius: 0 0 0 100%;
  1038. }
  1039. .control-left .fa {
  1040. transform: rotate(-45deg) translateX(-7px);
  1041. }
  1042. .control-right {
  1043. top: 27%;
  1044. right: -8%;
  1045. transform: rotate(45deg);
  1046. border-radius: 5px 100% 5px 0;
  1047. }
  1048. .control-right i {
  1049. transform: rotate(-45deg);
  1050. }
  1051. .control-right .control-inner {
  1052. left: -1px;
  1053. bottom: -1px;
  1054. border-top: 1px solid #78aee4;
  1055. border-right: 1px solid #78aee4;
  1056. border-radius: 0 100% 0 0;
  1057. }
  1058. .control-right .fa {
  1059. transform: rotate(-45deg) translateX(7px);
  1060. }
  1061. .control-bottom {
  1062. left: 27%;
  1063. bottom: -8%;
  1064. transform: rotate(45deg);
  1065. border-radius: 0 5px 100% 5px;
  1066. }
  1067. .control-bottom i {
  1068. transform: rotate(-45deg);
  1069. }
  1070. .control-bottom .control-inner {
  1071. top: -1px;
  1072. left: -1px;
  1073. border-bottom: 1px solid #78aee4;
  1074. border-right: 1px solid #78aee4;
  1075. border-radius: 0 0 100% 0;
  1076. }
  1077. .control-bottom .fa {
  1078. transform: rotate(-45deg) translateY(7px);
  1079. }
  1080. .trank {
  1081. width: 80%;
  1082. height: 180px;
  1083. text-align: left;
  1084. padding: 0 10%;
  1085. overflow: auto;
  1086. }
  1087. .trankInfo {
  1088. width: 80%;
  1089. padding: 0 10%;
  1090. }
  1091. </style>