|
|
@@ -67,7 +67,7 @@
|
|
|
<div style="border-radius: 5px; overflow: hidden;" v-if="!isAudit">
|
|
|
<img :src="require('@/assets/images/videoIsAudit.png')" style="width: 100%; height: 45vh;">
|
|
|
</div>
|
|
|
- <div style="border-radius: 5px; overflow: hidden;" v-else-if="status != 2">
|
|
|
+ <div style="border-radius: 5px; overflow: hidden;" v-else-if="status != 2 && status != 4">
|
|
|
<img :src="require('@/assets/images/videoNotStart.png')" style="width: 100%; height: 45vh;">
|
|
|
</div>
|
|
|
<div style="border-radius: 5px; overflow: hidden;" v-else-if="liveType == 1">
|
|
|
@@ -105,6 +105,19 @@
|
|
|
已播放:<span id="elapsedTime">00:00:00</span>
|
|
|
</div>
|
|
|
</div>
|
|
|
+ <div style="border-radius: 5px; overflow: hidden;" v-else-if="liveType == 3">
|
|
|
+ <video
|
|
|
+ controls
|
|
|
+ ref="liveReplay"
|
|
|
+ loop
|
|
|
+ autoplay
|
|
|
+ width="100%"
|
|
|
+ playsinline
|
|
|
+ style="display: block; background: #000; height: 40vh;"
|
|
|
+ >
|
|
|
+ <source :src="videoUrl" type="video/mp4">
|
|
|
+ </video>
|
|
|
+ </div>
|
|
|
<div style="border-radius: 5px; overflow: hidden;" v-else>
|
|
|
<img :src="require('@/assets/images/videoNotStart.png')" style="width: 100%; height: 45vh;">
|
|
|
</div>
|
|
|
@@ -257,6 +270,9 @@ export default {
|
|
|
activeName: "talk",
|
|
|
},
|
|
|
livingUrl:"",
|
|
|
+ videoUrl: "",
|
|
|
+ status: 0,
|
|
|
+ loadMsgMaxPage: 2,
|
|
|
liveVideo: {},
|
|
|
liveWsUrl: process.env.VUE_APP_LIVE_WS_URL + '/app/webSocket',
|
|
|
userParams:{
|
|
|
@@ -515,25 +531,30 @@ export default {
|
|
|
}
|
|
|
this.isAudit = true
|
|
|
this.status = res.data.status
|
|
|
- if (res.data.status != 2) {
|
|
|
- this.$message.error("当前直播间未直播");
|
|
|
- this.loading = false
|
|
|
- return
|
|
|
- }
|
|
|
- if (res.data.liveType == 1) {
|
|
|
- this.livingUrl = res.data.flvHlsUrl
|
|
|
- this.livingUrl = this.livingUrl.replace("flv","m3u8")
|
|
|
- this.$nextTick(() => {
|
|
|
- this.initPlayer()
|
|
|
- })
|
|
|
- } else {
|
|
|
- this.liveType = 2
|
|
|
+ if(res.data.status == 4){
|
|
|
+ this.liveType = 3
|
|
|
this.videoUrl = res.data.videoUrl;
|
|
|
- this.$nextTick(() => {
|
|
|
- const video = this.$refs.videoPlayer;
|
|
|
- video.play()
|
|
|
- this.initVideoPlayer(res.data.startTime)
|
|
|
- })
|
|
|
+ }else {
|
|
|
+ if (res.data.status != 2) {
|
|
|
+ this.$message.error("当前直播间未直播");
|
|
|
+ this.loading = false
|
|
|
+ return
|
|
|
+ }
|
|
|
+ if (res.data.liveType == 1) {
|
|
|
+ this.livingUrl = res.data.flvHlsUrl
|
|
|
+ this.livingUrl = this.livingUrl.replace("flv","m3u8")
|
|
|
+ this.$nextTick(() => {
|
|
|
+ this.initPlayer()
|
|
|
+ })
|
|
|
+ } else {
|
|
|
+ this.liveType = 2
|
|
|
+ this.videoUrl = res.data.videoUrl;
|
|
|
+ this.$nextTick(() => {
|
|
|
+ const video = this.$refs.videoPlayer;
|
|
|
+ video.play()
|
|
|
+ this.initVideoPlayer(res.data.startTime)
|
|
|
+ })
|
|
|
+ }
|
|
|
}
|
|
|
this.loading = false
|
|
|
} else {
|