devicePlayer.vue 26 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579
  1. <template>
  2. <div id="devicePlayer">
  3. <el-dialog title="视频播放" top="0" :close-on-click-modal="false" :visible.sync="showVideoDialog" :destroy-on-close="true" @close="close()">
  4. <LivePlayer v-if="showVideoDialog" ref="videoPlayer" :videoUrl="videoUrl" :error="videoError" :hasaudio="hasaudio" fluent autoplay live></LivePlayer>
  5. <div id="shared" style="text-align: right; margin-top: 1rem;">
  6. <el-tabs v-model="tabActiveName">
  7. <el-tab-pane label="实时视频" name="media">
  8. <div style="margin-bottom: 0.5rem;">
  9. <!-- <el-button type="primary" size="small" @click="playRecord(true, '')">播放</el-button>-->
  10. <!-- <el-button type="primary" size="small" @click="startRecord()">录制</el-button>-->
  11. <!-- <el-button type="primary" size="small" @click="stopRecord()">停止录制</el-button>-->
  12. </div>
  13. <div style="display: flex; margin-bottom: 0.5rem; height: 2.5rem;">
  14. <span style="width: 5rem; line-height: 2.5rem; text-align: right;">播放地址:</span>
  15. <el-input v-model="getPlayerShared.sharedUrl" :disabled="true" v-on:click.native="copySharedInfo(getPlayerShared.sharedUrl)"></el-input>
  16. </div>
  17. <div style="display: flex; margin-bottom: 0.5rem; height: 2.5rem;">
  18. <span style="width: 5rem; line-height: 2.5rem; text-align: right;">iframe:</span>
  19. <el-input v-model="getPlayerShared.sharedIframe" :disabled="true" v-on:click.native="copySharedInfo(getPlayerShared.sharedIframe)"></el-input>
  20. </div>
  21. <div style="display: flex; margin-bottom: 0.5rem; height: 2.5rem;">
  22. <span style="width: 5rem; line-height: 2.5rem; text-align: right;">资源地址:</span>
  23. <el-input v-model="getPlayerShared.sharedRtmp" :disabled="true" v-on:click.native="copySharedInfo(getPlayerShared.sharedRtmp)"></el-input>
  24. </div>
  25. </el-tab-pane>
  26. <!--{"code":0,"data":{"paths":["22-29-30.mp4"],"rootPath":"/home/kkkkk/Documents/ZLMediaKit/release/linux/Debug/www/record/hls/kkkkk/2020-05-11/"}}-->
  27. <el-tab-pane label="录像查询" name="record">
  28. <el-date-picker size="mini" v-model="videoHistory.date" type="date" value-format="yyyy-MM-dd" placeholder="日期" @change="queryRecords()"></el-date-picker>
  29. <!-- <el-slider style="margin: 0 1rem 1rem 1rem;"-->
  30. <!-- v-model="timeVal"-->
  31. <!-- :min="timeMin"-->
  32. <!-- :max="timeMax"-->
  33. <!-- :step="5"-->
  34. <!-- :marks="getTimeMakrs()"-->
  35. <!-- :format-tooltip="formatTooltip">-->
  36. <!-- </el-slider>-->
  37. <!-- <range-slider :min="timeMin"-->
  38. <!-- :max="timeMax"-->
  39. <!-- :step="5"></range-slider>-->
  40. <!-- <el-date-picker v-model="videoHistory.endTime" type="datetime" value-format="yyyy-MM-dd HH:mm:ss" placeholder="结束时间"-->
  41. <!-- @change="recordList()"></el-date-picker>-->
  42. <el-table :data="videoHistory.searchHistoryResult" height="150" v-loading="recordsLoading">
  43. <el-table-column label="名称" prop="name"></el-table-column>
  44. <el-table-column label="文件" prop="filePath"></el-table-column>
  45. <el-table-column label="开始时间" prop="startTime" :formatter="timeFormatter"></el-table-column>
  46. <el-table-column label="结束时间" prop="endTime" :formatter="timeFormatter"></el-table-column>
  47. <el-table-column label="操作">
  48. <template slot-scope="scope">
  49. <el-button icon="el-icon-video-play" size="mini" @click="playRecord(scope.row)">播放</el-button>
  50. </template>
  51. </el-table-column>
  52. </el-table>
  53. </el-tab-pane>
  54. <!--遥控界面-->
  55. <el-tab-pane label="云台控制" name="control">
  56. <div style="display: flex; justify-content: left;">
  57. <div class="control-wrapper">
  58. <div class="control-btn control-top" @mousedown="ptzCamera(0, 2, 0)" @mouseup="ptzCamera(0, 0, 0)">
  59. <i class="el-icon-caret-top"></i>
  60. <div class="control-inner-btn control-inner"></div>
  61. </div>
  62. <div class="control-btn control-left" @mousedown="ptzCamera(2, 0, 0)" @mouseup="ptzCamera(0, 0, 0)">
  63. <i class="el-icon-caret-left"></i>
  64. <div class="control-inner-btn control-inner"></div>
  65. </div>
  66. <div class="control-btn control-bottom" @mousedown="ptzCamera(0, 1, 0)" @mouseup="ptzCamera(0, 0, 0)">
  67. <i class="el-icon-caret-bottom"></i>
  68. <div class="control-inner-btn control-inner"></div>
  69. </div>
  70. <div class="control-btn control-right" @mousedown="ptzCamera(1, 0, 0)" @mouseup="ptzCamera(0, 0, 0)">
  71. <i class="el-icon-caret-right"></i>
  72. <div class="control-inner-btn control-inner"></div>
  73. </div>
  74. <div class="control-round">
  75. <div class="control-round-inner"><i class="fa fa-pause-circle"></i></div>
  76. </div>
  77. <div style="position: absolute; left: 7.25rem; top: 1.25rem" @mousedown="ptzCamera(0, 0, 1)" @mouseup="ptzCamera(0, 0, 0)"><i class="el-icon-zoom-in" style="font-size: 1.875rem;"></i></div>
  78. <div style="position: absolute; left: 7.25rem; top: 3.25rem; font-size: 1.875rem;" @mousedown="ptzCamera(0, 0, 2)" @mouseup="ptzCamera(0, 0, 0)"><i class="el-icon-zoom-out"></i></div>
  79. </div>
  80. <div class="control-panel">
  81. <el-button-group>
  82. <el-tag style="position :absolute; left: 0rem; top: 0rem; width: 5rem; text-align: center" size="medium" type="info">预置位编号</el-tag>
  83. <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>
  84. <el-button style="position: absolute; left: 11rem; top: 0rem; width: 5rem" size="mini" icon="el-icon-add-location" @click="presetPosition(129, presetPos)">设置</el-button>
  85. <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>
  86. <el-button style="position: absolute; left: 16rem; top: 0rem; width: 5rem" size="mini" icon="el-icon-delete-location" @click="presetPosition(131, presetPos)">删除</el-button>
  87. <el-tag style="position :absolute; left: 0rem; top: 2.5rem; width: 5rem; text-align: center" size="medium" type="info">巡航速度</el-tag>
  88. <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>
  89. <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>
  90. <el-tag style="position :absolute; left: 16rem; top: 2.5rem; width: 5rem; text-align: center" size="medium" type="info">停留时间</el-tag>
  91. <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>
  92. <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>
  93. <el-tag style="position :absolute; left: 0rem; top: 4.5rem; width: 5rem; text-align: center" size="medium" type="info">巡航组编号</el-tag>
  94. <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>
  95. <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>
  96. <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>
  97. <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>
  98. <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>
  99. <el-tag style="position :absolute; left: 0rem; top: 7rem; width: 5rem; text-align: center" size="medium" type="info">扫描速度</el-tag>
  100. <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>
  101. <el-button style="position: absolute; left: 11rem; top: 7rem; width: 5rem" size="mini" icon="el-icon-loading" @click="setSpeedOrTime(138, scanGroup, scanSpeed)">设置</el-button>
  102. <el-tag style="position :absolute; left: 0rem; top: 9rem; width: 5rem; text-align: center" size="medium" type="info">扫描组编号</el-tag>
  103. <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>
  104. <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>
  105. <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>
  106. <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>
  107. <el-button style="position: absolute; left: 27rem; top: 9rem; width: 5rem" size="mini" type="danger" icon="el-icon-switch-button" @click="ptzCamera(0, 0, 0)">停止</el-button>
  108. </el-button-group>
  109. </div>
  110. </div>
  111. </el-tab-pane>
  112. </el-tabs>
  113. </div>
  114. </el-dialog>
  115. </div>
  116. </template>
  117. <script>
  118. import LivePlayer from '@liveqing/liveplayer'
  119. export default {
  120. name: 'devicePlayer',
  121. props: {},
  122. components: {
  123. LivePlayer
  124. },
  125. computed: {
  126. getPlayerShared: function () {
  127. return {
  128. sharedUrl: window.location.host + '/' + this.videoUrl,
  129. sharedIframe: '<iframe src="' + window.location.host + '/' + this.videoUrl + '"></iframe>',
  130. sharedRtmp: this.videoUrl
  131. };
  132. }
  133. },
  134. created() {},
  135. data() {
  136. return {
  137. video: 'http://lndxyj.iqilu.com/public/upload/2019/10/14/8c001ea0c09cdc59a57829dabc8010fa.mp4',
  138. videoUrl: '',
  139. videoHistory: {
  140. date: '',
  141. searchHistoryResult: [] //媒体流历史记录搜索结果
  142. },
  143. timeMakrs: {
  144. // 0 : "0:00",
  145. // // 60 : "1:00",
  146. // 120 : "2:00",
  147. // // 180 : "3:00",
  148. // 240 : "4:00",
  149. // // 300 : "5:00",
  150. // 360 : "6:00",
  151. // // 420 : "7:00",
  152. // 480 : "8:00",
  153. // 540 : "9:00",
  154. 600: "10:00",
  155. // 660 : "11:00",
  156. 720: "12:00",
  157. // 780 : "13:00",
  158. 840: "14:00",
  159. // 900 : "15:00",
  160. 960: "16:00",
  161. // 1020 : "17:00",
  162. 1080: "18:00",
  163. // 1140 : "19:00",
  164. // 1200 : "20:00",
  165. // // 1260 : "21:00",
  166. // 1320 : "22:00",
  167. // // 1380 : "23:00",
  168. // 1440 : "24:00"
  169. },
  170. showVideoDialog: false,
  171. ssrc: '',
  172. deviceId: '',
  173. channelId: '',
  174. tabActiveName: 'media',
  175. hasaudio: false,
  176. loadingRecords: false,
  177. recordsLoading: false,
  178. timeVal: 0,
  179. timeMin: 0,
  180. timeMax: 1440,
  181. presetPos: 1,
  182. cruisingSpeed: 100,
  183. cruisingTime: 5,
  184. cruisingGroup: 0,
  185. scanSpeed: 100,
  186. scanGroup: 0,
  187. };
  188. },
  189. methods: {
  190. openDialog: function (tab, deviceId, channelId, param) {
  191. this.tabActiveName = tab;
  192. this.channelId = channelId;
  193. this.deviceId = deviceId;
  194. this.ssrc = "";
  195. this.videoUrl = ""
  196. if (!!this.$refs.videoPlayer) {
  197. this.$refs.videoPlayer.pause();
  198. }
  199. switch (tab) {
  200. case "media":
  201. this.play(param.streamInfo, param.hasAudio)
  202. break;
  203. case "record":
  204. this.showVideoDialog = true;
  205. this.videoHistory.date = param.date;
  206. this.queryRecords()
  207. break;
  208. case "control":
  209. break;
  210. }
  211. },
  212. timeAxisSelTime: function (val) {
  213. console.log(val)
  214. },
  215. getTimeMakrs() {
  216. return this.timeMakrs;
  217. },
  218. play: function (streamInfo, hasAudio) {
  219. this.hasaudio = hasAudio;
  220. // 根据媒体流信息二次判断
  221. var realHasAudio = false;
  222. if (!!streamInfo.tracks && streamInfo.tracks.length > 0 && hasAudio) {
  223. for (let i = 0; i < streamInfo.tracks.length; i++) {
  224. if (streamInfo.tracks[i].codec_type == 1 && streamInfo.tracks[i].codec_id_name == "CodecAAC") { // 判断为AAC音频
  225. realHasAudio = true;
  226. }
  227. }
  228. }
  229. this.hasaudio = realHasAudio && this.hasaudio;
  230. this.ssrc = streamInfo.ssrc;
  231. // this.$refs.videoPlayer.hasaudio = hasAudio;
  232. // this.videoUrl = streamInfo.flv + "?" + new Date().getTime();
  233. this.videoUrl = streamInfo.ws_flv;
  234. this.showVideoDialog = true;
  235. console.log(this.ssrc);
  236. },
  237. close: function () {
  238. console.log('关闭视频');
  239. this.$refs.videoPlayer.pause();
  240. this.videoUrl = '';
  241. this.showVideoDialog = false;
  242. },
  243. copySharedInfo: function (data) {
  244. console.log('复制内容:' + data);
  245. let _this = this;
  246. this.$copyText(data).then(
  247. function (e) {
  248. _this.$message({
  249. showClose: true,
  250. message: '复制成功',
  251. type: 'success'
  252. });
  253. },
  254. function (e) {
  255. _this.$message({
  256. showClose: true,
  257. message: '复制失败,请手动复制',
  258. type: 'error'
  259. });
  260. }
  261. );
  262. },
  263. queryRecords: function () {
  264. if (!this.videoHistory.date) {
  265. return;
  266. }
  267. this.recordsLoading = true;
  268. this.videoHistory.searchHistoryResult = [];
  269. let that = this;
  270. var startTime = this.videoHistory.date + " 00:00:00";
  271. var endTime = this.videoHistory.date + " 23:59:59";
  272. this.$axios({
  273. method: 'get',
  274. url: '/api/record/' + this.deviceId + '/' + this.channelId + '?startTime=' + startTime + '&endTime=' + endTime
  275. }).then(function (res) {
  276. // 处理时间信息
  277. that.videoHistory.searchHistoryResult = res.data.recordList;
  278. that.recordsLoading = false;
  279. }).catch(function (e) {
  280. console.log(e.message);
  281. // that.videoHistory.searchHistoryResult = falsificationData.recordData;
  282. });
  283. },
  284. onTimeChange: function (video) {
  285. // this.queryRecords()
  286. },
  287. playRecord: function (row) {
  288. let that = this;
  289. if (that.ssrc != "") {
  290. that.stopPlayRecord(function () {
  291. that.ssrc = "",
  292. that.playRecord(row);
  293. })
  294. } else {
  295. this.$axios({
  296. method: 'get',
  297. url: '/api/playback/' + this.deviceId + '/' + this.channelId + '?startTime=' + row.startTime + '&endTime=' +
  298. row.endTime
  299. }).then(function (res) {
  300. var streamInfo = res.data;
  301. that.ssrc = streamInfo.ssrc;
  302. that.videoUrl = streamInfo.ws_flv;
  303. });
  304. }
  305. },
  306. stopPlayRecord: function (callback) {
  307. this.$refs.videoPlayer.pause();
  308. this.videoUrl = '';
  309. this.$axios({
  310. method: 'get',
  311. url: '/api/playback/' + this.ssrc + '/stop'
  312. }).then(function (res) {
  313. if (callback) callback()
  314. });
  315. },
  316. ptzCamera: function (leftRight, upDown, zoom) {
  317. console.log('云台控制:' + leftRight + ' : ' + upDown + " : " + zoom);
  318. let that = this;
  319. this.$axios({
  320. method: 'post',
  321. // url: '/api/ptz/' + this.deviceId + '/' + this.channelId + '?leftRight=' + leftRight + '&upDown=' + upDown +
  322. // '&inOut=' + zoom + '&moveSpeed=50&zoomSpeed=50'
  323. url: '/api/ptz/' + this.deviceId + '/' + this.channelId + '?cmdCode=' + (zoom * 16 + upDown * 4 + leftRight) + '&horizonSpeed=30&verticalSpeed=30&zoomSpeed=' + (2 * 16)
  324. }).then(function (res) {});
  325. },
  326. //////////////////////播放器事件处理//////////////////////////
  327. videoError: function (e) {
  328. console.log("播放器错误:" + JSON.stringify(e));
  329. },
  330. presetPosition: function (cmdCode, presetPos) {
  331. console.log('预置位控制:' + this.presetPos + ' : 0x' + cmdCode.toString(16));
  332. let that = this;
  333. this.$axios({
  334. method: 'post',
  335. url: '/api/frontEndCommand/' + this.deviceId + '/' + this.channelId + '?cmdCode=' + cmdCode + '&parameter1=0&parameter2=' + presetPos + '&combindCode2=0'
  336. }).then(function (res) {});
  337. },
  338. setSpeedOrTime: function (cmdCode, groupNum, parameter) {
  339. let that = this;
  340. let parameter2 = parameter % 256;
  341. let combindCode2 = Math.floor(parameter / 256) * 16;
  342. console.log('前端控制:0x' + cmdCode.toString(16) + ' 0x' + groupNum.toString(16) + ' 0x' + parameter2.toString(16) + ' 0x' + combindCode2.toString(16));
  343. this.$axios({
  344. method: 'post',
  345. url: '/api/frontEndCommand/' + this.deviceId + '/' + this.channelId + '?cmdCode=' + cmdCode + '&parameter1=' + groupNum + '&parameter2=' + parameter2 + '&combindCode2=' + combindCode2
  346. }).then(function (res) {});
  347. },
  348. setCommand: function (cmdCode, groupNum, parameter) {
  349. let that = this;
  350. console.log('前端控制:0x' + cmdCode.toString(16) + ' 0x' + groupNum.toString(16) + ' 0x' + parameter.toString(16) + ' 0x0');
  351. this.$axios({
  352. method: 'post',
  353. url: '/api/frontEndCommand/' + this.deviceId + '/' + this.channelId + '?cmdCode=' + cmdCode + '&parameter1=' + groupNum + '&parameter2=' + parameter + '&combindCode2=0'
  354. }).then(function (res) {});
  355. },
  356. formatTooltip: function (val) {
  357. var h = parseInt(val / 60);
  358. var hStr = h < 10 ? ("0" + h) : h;
  359. var s = val % 60;
  360. var sStr = s < 10 ? ("0" + s) : s;
  361. return h + ":" + sStr;
  362. },
  363. timeFormatter: function (row, column, cellValue, index) {
  364. return cellValue.split(" ")[1];
  365. },
  366. mergeTime: function (timeArray) {
  367. var resultArray = [];
  368. for (let i = 0; i < timeArray.length; i++) {
  369. var startTime = new Date(timeArray[i].startTime);
  370. var endTime = new Date(timeArray[i].endTime);
  371. if (i == 0) {
  372. resultArray[0] = {
  373. startTime: startTime,
  374. endTime: endTime
  375. }
  376. }
  377. for (let j = 0; j < resultArray.length; j++) {
  378. if (startTime > resultArray[j].endTime) { // 合并
  379. if (startTime - resultArray[j].endTime <= 1000) {
  380. resultArray[j].endTime = endTime;
  381. } else {
  382. resultArray[resultArray.length] = {
  383. startTime: startTime,
  384. endTime: endTime
  385. }
  386. }
  387. } else if (resultArray[j].startTime > endTime) { // 合并
  388. if (resultArray[j].startTime - endTime <= 1000) {
  389. resultArray[j].startTime = startTime;
  390. } else {
  391. resultArray[resultArray.length] = {
  392. startTime: startTime,
  393. endTime: endTime
  394. }
  395. }
  396. }
  397. }
  398. }
  399. console.log(resultArray)
  400. return resultArray;
  401. }
  402. }
  403. };
  404. </script>
  405. <style>
  406. .control-wrapper {
  407. position: relative;
  408. width: 6.25rem;
  409. height: 6.25rem;
  410. max-width: 6.25rem;
  411. max-height: 6.25rem;
  412. border-radius: 100%;
  413. margin-top: 2.5rem;
  414. margin-left: 0.5rem;
  415. float: left;
  416. }
  417. .control-panel {
  418. position: relative;
  419. top: 0;
  420. left: 5rem;
  421. height: 11rem;
  422. max-height: 11rem;
  423. }
  424. .control-btn {
  425. display: flex;
  426. justify-content: center;
  427. position: absolute;
  428. width: 44%;
  429. height: 44%;
  430. border-radius: 5px;
  431. border: 1px solid #78aee4;
  432. box-sizing: border-box;
  433. transition: all 0.3s linear;
  434. }
  435. .control-btn i {
  436. font-size: 20px;
  437. color: #78aee4;
  438. display: flex;
  439. justify-content: center;
  440. align-items: center;
  441. }
  442. .control-round {
  443. position: absolute;
  444. top: 21%;
  445. left: 21%;
  446. width: 58%;
  447. height: 58%;
  448. background: #fff;
  449. border-radius: 100%;
  450. }
  451. .control-round-inner {
  452. position: absolute;
  453. left: 13%;
  454. top: 13%;
  455. display: flex;
  456. justify-content: center;
  457. align-items: center;
  458. width: 70%;
  459. height: 70%;
  460. font-size: 40px;
  461. color: #78aee4;
  462. border: 1px solid #78aee4;
  463. border-radius: 100%;
  464. transition: all 0.3s linear;
  465. }
  466. .control-inner-btn {
  467. position: absolute;
  468. width: 60%;
  469. height: 60%;
  470. background: #fafafa;
  471. }
  472. .control-top {
  473. top: -8%;
  474. left: 27%;
  475. transform: rotate(-45deg);
  476. border-radius: 5px 100% 5px 0;
  477. }
  478. .control-top i {
  479. transform: rotate(45deg);
  480. border-radius: 5px 100% 5px 0;
  481. }
  482. .control-top .control-inner {
  483. left: -1px;
  484. bottom: 0;
  485. border-top: 1px solid #78aee4;
  486. border-right: 1px solid #78aee4;
  487. border-radius: 0 100% 0 0;
  488. }
  489. .control-top .fa {
  490. transform: rotate(45deg) translateY(-7px);
  491. }
  492. .control-left {
  493. top: 27%;
  494. left: -8%;
  495. transform: rotate(45deg);
  496. border-radius: 5px 0 5px 100%;
  497. }
  498. .control-left i {
  499. transform: rotate(-45deg);
  500. }
  501. .control-left .control-inner {
  502. right: -1px;
  503. top: -1px;
  504. border-bottom: 1px solid #78aee4;
  505. border-left: 1px solid #78aee4;
  506. border-radius: 0 0 0 100%;
  507. }
  508. .control-left .fa {
  509. transform: rotate(-45deg) translateX(-7px);
  510. }
  511. .control-right {
  512. top: 27%;
  513. right: -8%;
  514. transform: rotate(45deg);
  515. border-radius: 5px 100% 5px 0;
  516. }
  517. .control-right i {
  518. transform: rotate(-45deg);
  519. }
  520. .control-right .control-inner {
  521. left: -1px;
  522. bottom: -1px;
  523. border-top: 1px solid #78aee4;
  524. border-right: 1px solid #78aee4;
  525. border-radius: 0 100% 0 0;
  526. }
  527. .control-right .fa {
  528. transform: rotate(-45deg) translateX(7px);
  529. }
  530. .control-bottom {
  531. left: 27%;
  532. bottom: -8%;
  533. transform: rotate(45deg);
  534. border-radius: 0 5px 100% 5px;
  535. }
  536. .control-bottom i {
  537. transform: rotate(-45deg);
  538. }
  539. .control-bottom .control-inner {
  540. top: -1px;
  541. left: -1px;
  542. border-bottom: 1px solid #78aee4;
  543. border-right: 1px solid #78aee4;
  544. border-radius: 0 0 100% 0;
  545. }
  546. .control-bottom .fa {
  547. transform: rotate(-45deg) translateY(7px);
  548. }
  549. </style>