Commit 1ea83d15 by 李伟康

提交代码

1 parent 2ed6c8c6
...@@ -3,7 +3,9 @@ ...@@ -3,7 +3,9 @@
<div <div
class="mask" class="mask"
@click="videoFullscreen = true" @click="videoFullscreen = true"
></div> >
<div class="status flex"></div>
</div>
<div <div
class="fullscreen-btn" class="fullscreen-btn"
@click="videoFullscreen = false" @click="videoFullscreen = false"
...@@ -32,6 +34,7 @@ ...@@ -32,6 +34,7 @@
<script type='text/ecmascript-6'> <script type='text/ecmascript-6'>
import { KfModal } from './index' import { KfModal } from './index'
import { wxConfig } from '@/api'
export default { export default {
components: { KfModal }, components: { KfModal },
...@@ -47,18 +50,26 @@ export default { ...@@ -47,18 +50,26 @@ export default {
} }
}, },
mounted () { mounted () {
this.player = TCPlayer("player-container-id", { let _this = this
fileID: "387702304976042167", wxConfig.ready(() => {
appID: "1311227058", wx.getNetworkType({
autoplay: true, success: (result) => {
loop: true, _this.player = TCPlayer("player-container-id", {
controlBar: { // fileID: "387702304976042167",
fullscreenToggle: false, // appID: "1311227058",
volumePanel: false, autoplay: true,
playbackRateMenuButton: false 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: { methods: {
} }
...@@ -68,12 +79,13 @@ export default { ...@@ -68,12 +79,13 @@ export default {
<style scoped lang='scss'> <style scoped lang='scss'>
.live-box { .live-box {
position: fixed; position: fixed;
top: 10%; top: 187px;
right: 10%; right: 8px;
z-index: 7; z-index: 7;
width: 150px; width: 82px;
height: 300px; height: 144px;
border-radius: 4px;
border: 2px solid #f95d35;
.mask { .mask {
width: 100%; width: 100%;
height: 100%; height: 100%;
...@@ -81,6 +93,17 @@ export default { ...@@ -81,6 +93,17 @@ export default {
left: 0; left: 0;
top: 0; top: 0;
z-index: 2; 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 { #player-container-id {
...@@ -105,12 +128,18 @@ export default { ...@@ -105,12 +128,18 @@ export default {
height: 40px; height: 40px;
z-index: 2; z-index: 2;
} }
/deep/.vjs-control-bar {
opacity: 0;
}
} }
.videoFullscreen { .videoFullscreen {
width: 100vw; width: 100vw;
height: 100vh; height: 100vh;
left: 0; left: 0;
top: 0; top: 0;
right: 0;
bottom: 0;
border: none;
.mask { .mask {
display: none; display: none;
} }
...@@ -118,5 +147,8 @@ export default { ...@@ -118,5 +147,8 @@ export default {
.poster-btn { .poster-btn {
display: block; display: block;
} }
/deep/.vjs-control-bar {
opacity: 1 !important;
}
} }
</style> </style>
\ No newline at end of file \ 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!