Commit a482527a by 李伟康

提交代码

1 parent 18242c44
......@@ -4,6 +4,7 @@ const pages = {
name: 'index',
meta: {
keepAlive: true,
noAuth: true,
backgroundColor: '#F7F7F7'
},
},
......
......@@ -8,7 +8,7 @@
</div>
<div
class="fullscreen-btn"
@click="videoFullscreen = false"
@click="openFullscreen(false)"
>
<img src="https://img02.glsx.com.cn/weapp/resource/scrm-mobile/crowdfunding/fullscreen.png">
</div>
......@@ -52,38 +52,47 @@ export default {
mounted () {
let _this = this
wxConfig.ready(() => {
_this.player = TCPlayer("player-container-id", {
// fileID: "387702304976042167",
// appID: "1311227058",
autoplay: true,
loop: true,
controlBar: {
fullscreenToggle: false
},
webrtcConfig: {
showLog: true
}
})
_this.player.src('http://play.glsx.com.cn/live/live.m3u8')
_this.player.ready(function () {
wx.getNetworkType({
success: (result) => {
_this.player.volume(0)
wx.getNetworkType({
success: (result) => {
_this.player = TCPlayer("player-container-id", {
fileID: "387702305029179223",
appID: "1311227058",
autoplay: true,
loop: true,
// muted: true,
controlBar: {
fullscreenToggle: false
},
webrtcConfig: {
showLog: true
}
})
// _this.player.src('http://play.glsx.com.cn/live/live.m3u8')
_this.player.volume(0)
_this.player.ready(function () {
_this.player.play()
}
})
})
_this.player.on('webrtcevent', function (event) {
console.log(event)
})
_this.player.on('webrtcevent', function (event) {
console.log(event)
})
}
})
})
},
methods: {
openFullscreen () {
this.player.volume(1)
this.videoFullscreen = true
openFullscreen (status = true) {
let video = document.getElementById('player-container-id_html5_api')
// video.setAttribute('muted', false)
console.log(video)
this.player.volume(status ? 1 : 0)
this.player.play()
this.videoFullscreen = status
}
}
}
......@@ -123,7 +132,7 @@ export default {
width: 100%;
height: 100%;
video {
object-fit: cover !important;
// object-fit: cover !important;
}
}
.fullscreen-btn {
......
......@@ -305,7 +305,7 @@ export default {
]
wxConfig.init(jsApiList).then(() => {
wxConfig.ready(() => {
this.getActivityDetail()
// this.getActivityDetail()
})
})
window.addEventListener('scroll', _this.debounce(() => {
......@@ -365,8 +365,8 @@ export default {
data.s_time = new Date(this.iosTimeFormat(data.startTime)).format('yyyy年M月d日')
data.e_time = new Date(this.iosTimeFormat(data.endTime)).format('yyyy年M月d日')
document.title = data.activityName
this.getActivityGroup()
this.getOrderList()
// this.getActivityGroup()
// this.getOrderList()
let [redirectUrl] = window.location.href.split('?')
if (data.activityVideos && data.activityVideos.length) {
/**安卓退出全屏 */
......
......@@ -20,10 +20,12 @@ const IS_PROD = ['production', 'prod'].includes(process.env.NODE_ENV)
const cdn = {
// 开发环境
css: ['https://web.sdk.qcloud.com/player/tcplayer/release/v4.2.1/tcplayer.min.css'],
css: ['//web.sdk.qcloud.com/player/tcplayer/release/v4.5.2/tcplayer.min.css'],
js: [
'https://web.sdk.qcloud.com/player/tcplayer/release/v4.2.1/libs/hls.min.0.13.2m.js',
'https://web.sdk.qcloud.com/player/tcplayer/release/v4.5.0/tcplayer.v4.5.0.min.js'
'//web.sdk.qcloud.com/player/tcplayer/release/v4.5.1/libs/TXLivePlayer-1.2.0.min.js',
'//web.sdk.qcloud.com/player/tcplayer/release/v4.5.2/libs/hls.min.0.13.2m.js',
'//web.sdk.qcloud.com/player/tcplayer/release/v4.5.2/libs/flv.min.1.6.2.js',
'//web.sdk.qcloud.com/player/tcplayer/release/v4.5.2/tcplayer.v4.5.2.min.js'
]
}
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!