xbx #133
@ -7,6 +7,15 @@
|
|||||||
<meta name="viewport" content="width=device-width,initial-scale=1.0">
|
<meta name="viewport" content="width=device-width,initial-scale=1.0">
|
||||||
<link rel="icon" href="<%= BASE_URL %>favicon.ico">
|
<link rel="icon" href="<%= BASE_URL %>favicon.ico">
|
||||||
<title><%= htmlWebpackPlugin.options.title %></title>
|
<title><%= htmlWebpackPlugin.options.title %></title>
|
||||||
|
<link href="http://imgcache.qq.com/open/qcloud/video/tcplayer/tcplayer.css" rel="stylesheet">
|
||||||
|
<!-- 如需在IE8、9浏览器中初始化播放器,浏览器需支持Flash并在页面中引入 -->
|
||||||
|
<!--[if lt IE 9]>
|
||||||
|
<script src="//imgcache.qq.com/open/qcloud/video/tcplayer/ie8/videojs-ie8.js"></script>
|
||||||
|
<![endif]-->
|
||||||
|
<!-- 如果需要在 Chrome Firefox 等现代浏览器中通过H5播放hls,需要引入 hls.js -->
|
||||||
|
<script src="http://imgcache.qq.com/open/qcloud/video/tcplayer/lib/hls.min.0.8.8.js"></script>
|
||||||
|
<!-- 引入播放器 js 文件 -->
|
||||||
|
<script src="http://imgcache.qq.com/open/qcloud/video/tcplayer/tcplayer.min.js"></script>
|
||||||
<script>
|
<script>
|
||||||
//designWidth:设计稿的实际宽度值,需要根据实际设置
|
//designWidth:设计稿的实际宽度值,需要根据实际设置
|
||||||
//maxWidth:制作稿的最大宽度值,需要根据实际设置
|
//maxWidth:制作稿的最大宽度值,需要根据实际设置
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="video">
|
<div class="video">
|
||||||
<video :controls="true" :src="info.livestatus == 0 ? info.fileurl : info.vodurl"></video>
|
<video :id=" 'a' + time" style="width:100%;height:100%"></video>
|
||||||
<div class="liveinfo">
|
<div class="liveinfo">
|
||||||
<div class="left">
|
<div class="left">
|
||||||
<div>
|
<div>
|
||||||
@ -38,11 +38,14 @@
|
|||||||
height: 563px;
|
height: 563px;
|
||||||
border-radius: 18px;
|
border-radius: 18px;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
> video {
|
> video {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
height: 505px;
|
height: 505px;
|
||||||
}
|
}
|
||||||
.liveinfo{
|
.liveinfo{
|
||||||
|
flex-shrink: 0;
|
||||||
display: flex;
|
display: flex;
|
||||||
justify-content: space-between;
|
justify-content: space-between;
|
||||||
height: 58px;
|
height: 58px;
|
||||||
@ -87,7 +90,8 @@
|
|||||||
import { livestart } from '@/api';
|
import { livestart } from '@/api';
|
||||||
import router from '@/router';
|
import router from '@/router';
|
||||||
import { useI18n } from '@/utils/i18n';
|
import { useI18n } from '@/utils/i18n';
|
||||||
import { defineComponent, ref } from "vue";
|
import { defineComponent, onUpdated, ref } from "vue";
|
||||||
|
import { onBeforeRouteLeave } from 'vue-router';
|
||||||
|
|
||||||
export default defineComponent({
|
export default defineComponent({
|
||||||
props:{
|
props:{
|
||||||
@ -110,12 +114,30 @@ export default defineComponent({
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
const time = ref(new Date().getTime())
|
||||||
|
let play: any;
|
||||||
|
onUpdated(()=>{
|
||||||
|
// console.log(props.url)
|
||||||
|
if(props.info){
|
||||||
|
play = window.TCPlayer('a' + time.value, {
|
||||||
|
fileID: (props.info.livestatus == 0 ? props.info.fileid : props.info.vodid),
|
||||||
|
appID: '1303872925'
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
})
|
||||||
|
onBeforeRouteLeave((to, from, next) => {
|
||||||
|
console.log(121)
|
||||||
|
play.dispose()
|
||||||
|
next()
|
||||||
|
})
|
||||||
// const liveinfo = ref(props.liveinfo)
|
// const liveinfo = ref(props.liveinfo)
|
||||||
return {
|
return {
|
||||||
bianji,
|
bianji,
|
||||||
kaishi,
|
kaishi,
|
||||||
lan
|
lan,
|
||||||
|
time
|
||||||
}
|
}
|
||||||
},
|
}
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
@ -1,7 +1,7 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="video">
|
<div class="video">
|
||||||
|
|
||||||
<video :src="url" :controls="true"></video>
|
<video style="width:100%; height:100%;" :id="'a' + url" ></video>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
@ -19,7 +19,9 @@
|
|||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
<script lang="ts">
|
<script lang="ts">
|
||||||
import { defineComponent } from 'vue';
|
import router from '@/router';
|
||||||
|
import { defineComponent, onMounted, onUpdated } from 'vue';
|
||||||
|
import { onBeforeRouteLeave, useRouter } from 'vue-router';
|
||||||
|
|
||||||
export default defineComponent({
|
export default defineComponent({
|
||||||
props:{
|
props:{
|
||||||
@ -27,8 +29,22 @@ export default defineComponent({
|
|||||||
type:String
|
type:String
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
setup(){
|
setup(props, ctx){
|
||||||
console.log(1)
|
console.log(1)
|
||||||
|
let play: any;
|
||||||
|
onUpdated(()=>{
|
||||||
|
console.log(props.url)
|
||||||
|
play = window.TCPlayer('a' + props.url, {
|
||||||
|
fileID: props.url,
|
||||||
|
appID: '1303872925'
|
||||||
|
});
|
||||||
|
})
|
||||||
|
onBeforeRouteLeave((to, from, next) => {
|
||||||
|
console.log(121)
|
||||||
|
play.dispose()
|
||||||
|
next()
|
||||||
|
})
|
||||||
|
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
</script>
|
</script>
|
2
src/import-png.d.ts
vendored
2
src/import-png.d.ts
vendored
@ -19,3 +19,5 @@ declare module 'tim-js-sdk'{
|
|||||||
}
|
}
|
||||||
|
|
||||||
declare var FB: any;
|
declare var FB: any;
|
||||||
|
|
||||||
|
declare var TCPlayer: any;
|
@ -1,7 +1,7 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="videoinfo">
|
<div class="videoinfo">
|
||||||
<div class="info">
|
<div class="info">
|
||||||
<VideoPlay :url="result.fileurl"></VideoPlay>
|
<VideoPlay :url="result.fileid"></VideoPlay>
|
||||||
<VideoCont :videoid="result.videoid" :yuanyin="result.statusdesc" :date="result.createdAt" :watch="result.watch" :share="result.share" :status="result.status"></VideoCont>
|
<VideoCont :videoid="result.videoid" :yuanyin="result.statusdesc" :date="result.createdAt" :watch="result.watch" :share="result.share" :status="result.status"></VideoCont>
|
||||||
</div>
|
</div>
|
||||||
<VideoReview :videoinfo="result.score" class="review" v-if="result.status == 1"></VideoReview>
|
<VideoReview :videoinfo="result.score" class="review" v-if="result.status == 1"></VideoReview>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user