Commit ce9fdeb7 authored by 毛线's avatar 毛线

no message

parent 1c907ca7
......@@ -2,7 +2,7 @@
<div>
<Background/>
<div :class="{is_mobile: is_mobile, 'hide-header': hideHeader, }" class="player">
<div ref="livePlay" :style="playStyle" class="live-play">
<div ref="livePlay" class="live-play">
<div class="asset-number">EGM:{{ device ? device.assetNumber : '' }}</div>
<img src="https://kuawai.s3.ap-east-1.amazonaws.com/resource/assets/Textures/second/pic_02.png" alt="" class="bg">
<img src="https://kuawai.s3.ap-east-1.amazonaws.com/resource/assets/Textures/second/ic_object.png" alt="" class="top-icon">
......@@ -45,7 +45,6 @@ export default {
player: '',
isPlay: false, // 直播是否在播放
deviceButtonPanel: {},
playStyle: {},
}
},
computed: {
......@@ -85,16 +84,6 @@ export default {
console.log('watch device', { ...this.device })
this.init().play()
},
is_mobile() {
this.$nextTick(() => {
this.init().playStyle()
})
},
hideHeader() {
this.$nextTick(() => {
this.init().playStyle()
})
},
},
mounted() {
this.network().getData()
......@@ -103,7 +92,6 @@ export default {
if (this.device) {
this.init().play()
}
this.init().playStyle()
},
methods: {
...mapMutations([
......@@ -120,31 +108,6 @@ export default {
this.$refs.webrtc.initVideo(webrtc)
this.isPlay = true
},
// 计算屏幕内边距
playStyle: () => {
const { is_mobile, hideHeader } = this
const imgWidth = 560 // 图片原本宽度
const pt = 18
const px = 18
const pb = 12
const width = this.$refs?.livePlay?.offsetWidth || 0
let spt = pt
let spb = pb
let spx = px
let padding = '16px 11px 8px'
if (is_mobile || hideHeader) {
spt = pt * width / imgWidth
spb = pb * width / imgWidth
spx = px * width / imgWidth
}
padding = `${spt}px ${spx}px ${spb}px`
console.log('padding', padding)
const style = {
padding,
}
this.playStyle = style
},
}
},
network() {
......@@ -302,7 +265,8 @@ export default {
&.is_mobile {
.live-play {
width: 620px;
height: 438px;
height: 428px;
padding: 30px 18px 12px;
}
.right-player {
/* display: none; */
......@@ -314,8 +278,9 @@ export default {
&.hide-header {
left: 168px;
.live-play {
width: 700px;
width: 720px;
height: 500px;
padding: 34px 24px 14px;
}
.right-player {
display: none;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment