|
|
@@ -7,7 +7,8 @@
|
|
|
<h3 v-html="video.title" />
|
|
|
</div>
|
|
|
<div class="text item">
|
|
|
- <live-player :video-prop="video" />
|
|
|
+<!-- <live-player :video-prop="video" />-->
|
|
|
+ <div id="dplayer" ref="dplayer" style="height: 480px;" />
|
|
|
</div>
|
|
|
</el-card>
|
|
|
</el-row>
|
|
|
@@ -83,7 +84,7 @@
|
|
|
import flvjs from 'flv.js'
|
|
|
import DPlayer from 'dplayer'
|
|
|
import LivePlayer from 'components/LivePlayer'
|
|
|
-import { getCamList, getCamRecordDay, getCamRecordList } from '@/api/cam'
|
|
|
+import { getCamDetail, getCamList, getCamRecordDay, getCamRecordList } from '@/api/cam'
|
|
|
|
|
|
export default {
|
|
|
name: 'LivePage',
|
|
|
@@ -130,6 +131,7 @@ export default {
|
|
|
showRecordList: false,
|
|
|
camList: [],
|
|
|
cam: null,
|
|
|
+ camDetail: null,
|
|
|
form: {},
|
|
|
recordList: []
|
|
|
}
|
|
|
@@ -158,6 +160,20 @@ export default {
|
|
|
}
|
|
|
},
|
|
|
created() {
|
|
|
+ const camId = this.$route.params.camId
|
|
|
+ if (camId === undefined || camId === null) {
|
|
|
+ return
|
|
|
+ }
|
|
|
+
|
|
|
+ getCamDetail(camId).then(resp => {
|
|
|
+ if (resp.code === 0) {
|
|
|
+ const camDetail = resp.data
|
|
|
+ console.log(camDetail)
|
|
|
+ const url = camDetail.url
|
|
|
+ this.initFlvPlayer(camId, null, url)
|
|
|
+ }
|
|
|
+ })
|
|
|
+
|
|
|
getCamList().then(resp => {
|
|
|
if (resp.code === 0) {
|
|
|
this.camList = resp.data
|