Commit a482527a by 李伟康

提交代码

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