Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
glsx
/
scrm-wx-merchant-activity
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit 356eb6d5
authored
Aug 25, 2022
by
李伟康
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
提交代码
1 parent
40637079
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
34 additions
and
31 deletions
src/views/crowdfunding/components/LiveBox.vue
vue.config.js
src/views/crowdfunding/components/LiveBox.vue
View file @
356eb6d
...
...
@@ -4,7 +4,11 @@
class=
"mask"
@
click=
"openFullscreen"
>
<div
class=
"status flex"
></div>
<!--
<div
class=
"status flex"
></div>
-->
<img
src=
"https://wimg.588ku.com/gif620/20/04/23/79a7882dfb0c59497976fd8b3bfe60ef.gif"
alt=
""
>
</div>
<div
class=
"fullscreen-btn"
...
...
@@ -52,33 +56,33 @@ export default {
mounted
()
{
let
_this
=
this
wxConfig
.
ready
(()
=>
{
_this
.
player
=
TCPlayer
(
"player-container-id"
,
{
// fileID: "387702305029179223", //点播ID
// appID: "1311227058", //点播APPID
autoplay
:
true
,
//自动播放
loop
:
true
,
// 循环播放
muted
:
true
,
//是否静音
controlBar
:
{
//控制条配置
fullscreenToggle
:
false
//隐藏全屏按钮
},
webrtcConfig
:
{
//webrtcConfig 参数列表
showLog
:
true
//打印webrtc日志
}
})
_this
.
player
.
src
(
'http://play.glsx.com.cn/live/live.m3u8'
)
//直播地址
wx
.
getNetworkType
({
success
:
(
result
)
=>
{
_this
.
player
=
TCPlayer
(
"player-container-id"
,
{
fileID
:
"387702305029179223"
,
//点播ID
appID
:
"1311227058"
,
//点播APPID
// autoplay: true, //自动播放
loop
:
true
,
// 循环播放
muted
:
true
,
//是否静音
controlBar
:
{
//控制条配置
fullscreenToggle
:
false
//隐藏全屏按钮
},
webrtcConfig
:
{
//webrtcConfig 参数列表
showLog
:
true
//打印webrtc日志
}
})
// _this.player.src('http://play.glsx.com.cn/live/live.m3u8') //直播地址
_this
.
player
.
volume
(
0
)
//设置音量 0 - 1
_this
.
player
.
ready
(
function
()
{
//设置播放器初始化完成后的回调
console
.
log
(
'-------------------------'
,
_this
.
player
.
poster
())
_this
.
player
.
play
()
//播放视频
})
_this
.
player
.
on
(
'webrtcevent'
,
function
(
event
)
{
//监听webrtc
console
.
log
(
event
)
})
}
})
_this
.
player
.
on
(
'webrtcevent'
,
function
(
event
)
{
//监听webrtc
console
.
log
(
event
)
})
})
...
...
@@ -86,11 +90,9 @@ export default {
},
methods
:
{
openFullscreen
(
status
=
true
)
{
//打开关闭全屏
// let video = document.getElementById('player-container-id_html5_api
')
let
volume
=
document
.
getElementsByClassName
(
'enable-volume-control'
)[
1
]
let
[
volumePanel
]
=
document
.
getElementsByClassName
(
'vjs-volume-panel
'
)
let
[
volume
]
=
volumePanel
.
getElementsByClassName
(
'vjs-mute-control'
)
volume
.
click
()
console
.
log
(
test
)
this
.
player
.
volume
(
status
?
1
:
0
)
this
.
player
.
play
()
this
.
videoFullscreen
=
status
...
...
@@ -116,6 +118,9 @@ export default {
left
:
0
;
top
:
0
;
z-index
:
2
;
img
{
object-fit
:
contain
;
}
.status
{
position
:
absolute
;
left
:
0
;
...
...
vue.config.js
View file @
356eb6d
...
...
@@ -20,12 +20,10 @@ const IS_PROD = ['production', 'prod'].includes(process.env.NODE_ENV)
const
cdn
=
{
// 开发环境
css
:
[
'//web.sdk.qcloud.com/player/tcplayer/release/v4.
5.2
/tcplayer.min.css'
],
css
:
[
'//web.sdk.qcloud.com/player/tcplayer/release/v4.
2.1
/tcplayer.min.css'
],
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'
'//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.0/tcplayer.v4.5.0.min.js'
]
}
...
...
@@ -145,7 +143,7 @@ module.exports = {
* 添加CDN参数到htmlWebpackPlugin配置中
*/
config
.
plugin
(
'html'
).
tap
(
args
=>
{
args
[
0
].
cdn
=
cdn
args
[
0
].
cdn
=
cdn
return
args
})
...
...
Write
Preview
Markdown
is supported
Attach a file
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to post a comment