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 a8473955
authored
Feb 14, 2023
by
李伟康
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
视频直播
1 parent
7c657734
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
23 additions
and
6 deletions
src/components/Action.vue
src/components/LiveBox.vue
src/views/crowdfunding/index/index.vue
src/components/Action.vue
View file @
a847395
...
@@ -331,7 +331,7 @@ export default {
...
@@ -331,7 +331,7 @@ export default {
})
})
else
this
.
to
(
path
,
{
orderInfo
})
else
this
.
to
(
path
,
{
orderInfo
})
}
}
if
(
videoFullscreen
)
{
if
(
videoFullscreen
&&
orderInfo
.
liveBroadcastRoomId
)
{
console
.
log
(
'直播间下单'
,
orderInfo
)
console
.
log
(
'直播间下单'
,
orderInfo
)
const
res
=
await
shopmallApi
.
liveRoomReport
({
const
res
=
await
shopmallApi
.
liveRoomReport
({
bizDataCode
:
orderInfo
.
orderCode
,
bizDataCode
:
orderInfo
.
orderCode
,
...
...
src/components/LiveBox.vue
View file @
a847395
...
@@ -47,8 +47,8 @@
...
@@ -47,8 +47,8 @@
<div
v-show=
"videoFullscreen"
>
<div
v-show=
"videoFullscreen"
>
<!-- IM -->
<!-- IM -->
<im
v-if=
"LiveProps[liveDetail.status].isLive"
:liveDetail=
"liveDetail"
:isAction=
"isAction"
:detail=
"detail"
class=
"Im"
></im>
<im
v-if=
"LiveProps[liveDetail.status].isLive
&& !mediaLive
"
:liveDetail=
"liveDetail"
:isAction=
"isAction"
:detail=
"detail"
class=
"Im"
></im>
<action
:videoFullscreen=
"true"
class=
"BgAction"
v-show=
"isAction &&
!LiveProps[liveDetail.status].isLive
"
></action>
<action
:videoFullscreen=
"true"
class=
"BgAction"
v-show=
"isAction &&
(!LiveProps[liveDetail.status].isLive|| mediaLive)
"
></action>
</div>
</div>
</div>
</div>
</div>
</div>
...
@@ -118,7 +118,8 @@ export default {
...
@@ -118,7 +118,8 @@ export default {
liveBroadcastRecordingFileList
:
[]
liveBroadcastRecordingFileList
:
[]
}
}
}
}
}
},
mediaLive
:
Boolean
},
},
mounted
()
{
mounted
()
{
this
.
createPlayerCover
()
this
.
createPlayerCover
()
...
@@ -140,7 +141,7 @@ export default {
...
@@ -140,7 +141,7 @@ export default {
this
.
player
.
ready
(()
=>
{
// 设置播放器初始化完成后的回调
this
.
player
.
ready
(()
=>
{
// 设置播放器初始化完成后的回调
this
.
fixHls
()
this
.
fixHls
()
const
_this
=
this
const
_this
=
this
const
src
=
this
.
LiveProps
[
this
.
liveDetail
.
status
].
isLive
?
this
.
liveDetail
.
pullWebRtcUrl
:
(
this
.
liveDetail
.
liveBroadcastRecordingFileList
||
[])[
this
.
fileIdx
]?.
videoUrl
const
src
=
_this
.
mediaLive
?
this
.
liveDetail
.
liveBroadcastMediaUrl
:
this
.
LiveProps
[
this
.
liveDetail
.
status
].
isLive
?
this
.
liveDetail
.
pullWebRtcUrl
:
(
this
.
liveDetail
.
liveBroadcastRecordingFileList
||
[])[
this
.
fileIdx
]?.
videoUrl
this
.
player
.
src
(
src
)
this
.
player
.
src
(
src
)
this
.
player
.
poster
()
this
.
player
.
poster
()
this
.
player
.
play
()
// 播放视频
this
.
player
.
play
()
// 播放视频
...
...
src/views/crowdfunding/index/index.vue
View file @
a847395
...
@@ -17,11 +17,12 @@
...
@@ -17,11 +17,12 @@
活动重新配置中,请稍后重试
活动重新配置中,请稍后重试
</div>
</div>
<div
v-else
>
<div
v-else
>
<template
v-if=
"
detail.liveBroadcastRoomId
&& liveDetail && liveDetail.status != 0"
>
<template
v-if=
"
(detail.liveBroadcastRoomId || detail.liveBroadcastMediaUrl)
&& liveDetail && liveDetail.status != 0"
>
<live-box
<live-box
ref=
"liveBox"
ref=
"liveBox"
:detail=
"detail"
:detail=
"detail"
:liveDetail=
"liveDetail"
:liveDetail=
"liveDetail"
:mediaLive=
"detail.liveBroadcastMediaUrl?true:false"
@
handleLiveFull=
"handleLiveFull"
@
handleLiveFull=
"handleLiveFull"
></live-box>
></live-box>
</
template
>
</
template
>
...
@@ -461,6 +462,21 @@ export default {
...
@@ -461,6 +462,21 @@ export default {
if
(
this
.
detail
.
liveBroadcastRoomId
)
{
if
(
this
.
detail
.
liveBroadcastRoomId
)
{
this
.
getLiveDetail
(
id
)
this
.
getLiveDetail
(
id
)
}
}
if
(
data
.
liveBroadcastMediaUrl
)
{
// this.setData({
// mediaLiveObject: {
// liveBroadcastMediaUrl: data.liveBroadcastMediaUrl,
// liveBroadcastRoomCover: data.liveBroadcastRoomCover,
// liveBroadcastStateFlag: data.liveBroadcastStateFlag //1直播中,2直播回放
// }
// })
this
.
liveDetail
=
{
status
:
data
.
liveBroadcastStateFlag
,
//1直播中,2直播回放
liveBroadcastMediaUrl
:
data
.
liveBroadcastMediaUrl
,
liveBroadcastRecordingFileList
:
[
data
.
liveBroadcastMediaUrl
]
}
}
})
})
},
},
getLiveDetail
(
id
)
{
getLiveDetail
(
id
)
{
...
...
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