Commit 1ea83d15 by 李伟康

提交代码

1 parent 2ed6c8c6
......@@ -3,7 +3,9 @@
<div
class="mask"
@click="videoFullscreen = true"
></div>
>
<div class="status flex"></div>
</div>
<div
class="fullscreen-btn"
@click="videoFullscreen = false"
......@@ -32,6 +34,7 @@
<script type='text/ecmascript-6'>
import { KfModal } from './index'
import { wxConfig } from '@/api'
export default {
components: { KfModal },
......@@ -47,18 +50,26 @@ export default {
}
},
mounted () {
this.player = TCPlayer("player-container-id", {
fileID: "387702304976042167",
appID: "1311227058",
autoplay: true,
loop: true,
controlBar: {
fullscreenToggle: false,
volumePanel: false,
playbackRateMenuButton: false
}
let _this = this
wxConfig.ready(() => {
wx.getNetworkType({
success: (result) => {
_this.player = TCPlayer("player-container-id", {
// fileID: "387702304976042167",
// appID: "1311227058",
autoplay: true,
loop: true,
controlBar: {
fullscreenToggle: false,
}
})
_this.player.src('http://play.glsx.com.cn/live/live.m3u8')
// _this.player.play()
}
})
})
// this.player.src('webrtc://play.glsx.com.cn/live/live')
},
methods: {
}
......@@ -68,12 +79,13 @@ export default {
<style scoped lang='scss'>
.live-box {
position: fixed;
top: 10%;
right: 10%;
top: 187px;
right: 8px;
z-index: 7;
width: 150px;
height: 300px;
width: 82px;
height: 144px;
border-radius: 4px;
border: 2px solid #f95d35;
.mask {
width: 100%;
height: 100%;
......@@ -81,6 +93,17 @@ export default {
left: 0;
top: 0;
z-index: 2;
.status {
position: absolute;
left: 0;
bottom: 0;
width: 100%;
height: 18px;
background: linear-gradient(291deg, #f6542b 0%, #ff6c47 100%), linear-gradient(270deg, rgba(255, 57, 0, 0) 0%, #ff3900 33%, #fd466f 100%);
font-size: 12px;
font-weight: 500;
color: #ffffff;
}
}
#player-container-id {
......@@ -105,12 +128,18 @@ export default {
height: 40px;
z-index: 2;
}
/deep/.vjs-control-bar {
opacity: 0;
}
}
.videoFullscreen {
width: 100vw;
height: 100vh;
left: 0;
top: 0;
right: 0;
bottom: 0;
border: none;
.mask {
display: none;
}
......@@ -118,5 +147,8 @@ export default {
.poster-btn {
display: block;
}
/deep/.vjs-control-bar {
opacity: 1 !important;
}
}
</style>
\ No newline at end of file
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!