Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
L
live-management-web
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
haojie
live-management-web
Commits
0e8b3413
Commit
0e8b3413
authored
Sep 14, 2023
by
haojie
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
音频直播,未完成
parent
c9ec9cdc
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
38 additions
and
39 deletions
+38
-39
src/constants/token.ts
+7
-0
src/pages/home/components/myDigtalPeople.vue
+4
-2
src/pages/onlyAudioLive/index.vue
+22
-37
src/pages/onlyAudioLive/useScript.ts
+0
-0
src/router/tool.ts
+5
-0
No files found.
src/constants/token.ts
View file @
0e8b3413
...
...
@@ -74,6 +74,13 @@ export const getRoutes = () => {
component
:
()
=>
import
(
'@/pages/OnlyVideoLive/indexV2.vue'
),
meta
:
{
title
:
'snowhome'
,
header
:
false
,
navbar
:
false
},
},
// 只有音频的页面
{
path
:
routerConfig
.
onlyAudioLive
.
path
,
name
:
routerConfig
.
onlyAudioLive
.
name
,
component
:
()
=>
import
(
'@/pages/onlyAudioLive/index.vue'
),
meta
:
{
title
:
'snowhome'
,
header
:
false
,
navbar
:
false
},
},
// 只有人工回复的页面
{
path
:
routerConfig
.
interactiveResponse
.
path
,
...
...
src/pages/home/components/myDigtalPeople.vue
View file @
0e8b3413
...
...
@@ -201,10 +201,12 @@ const startLive = (item: any) => {
// 音频直播页
if
(
isDev
())
{
router
.
push
({
path
:
routerConfig
.
only
Vide
oLive
.
path
,
name
:
routerConfig
.
only
Vide
oLive
.
name
,
path
:
routerConfig
.
only
Audi
oLive
.
path
,
name
:
routerConfig
.
only
Audi
oLive
.
name
,
query
:
params
,
});
}
else
{
callPyjsInWindow
(
'openAudioLivePage'
,
params
);
}
}
}
...
...
src/pages/onlyAudioLive/index.vue
View file @
0e8b3413
<
template
>
<div
class=
"custom-start-only-video-page"
>
<div
class=
"start-only-video-live"
>
<AddVideoPlay
v-model:currentPlayMainIndex=
"currentPlayMainIndex"
v-model:showActionVideo=
"showActionVideo"
v-model:firstVideoIsMain=
"firstVideoIsMain"
v-model:endVideoIsMain=
"endVideoIsMain"
:loading=
"loading"
:playId=
"addVideoId"
:liveDetail=
"liveDetail"
:video2=
"addVideo"
:actionVideo=
"actionVideo"
:mainVideoList=
"mainVideoList"
:currentMainVideoIndex=
"currentMainVideoIndex"
:playInfo=
"playInfo"
:realVideoList=
"realVideoList"
@
playEnd=
"playEnd"
@
actionPlayChange=
"actionPlayChange"
@
initActionVideo=
"initActionVideo"
@
currentTime=
"currentTimeChange"
@
mainVideoListChange=
"mainVideoListChange"
></AddVideoPlay>
</div>
<div
class=
"only-audio-page"
>
<template
v-for=
"(item, index) in mainVideoList"
:key=
"item.name"
>
<audio
:src=
"item.url"
@
canplay=
"onCanplay(index)"
:ref=
"(ref:HTMLAudioElement) => (item.ref = ref)"
@
ended=
"onPlayEnd(index)"
></audio>
</
template
>
</div>
</template>
<
script
lang=
"ts"
setup
>
import
AddVideoPlay
from
'@/components/AddVideoPlay.
vue'
;
import
{
ref
}
from
'
vue'
;
import
useScript
from
'./useScript'
;
const
{
currentPlayMainIndex
,
loading
,
addVideoId
,
liveDetail
,
addVideo
,
...
...
@@ -47,26 +32,26 @@ const {
currentTimeChange
,
mainVideoListChange
,
initActionVideo
,
audioCanplay
,
onPlayEnd
,
}
=
useScript
();
const
isFirst
=
ref
(
true
);
const
onCanplay
=
async
(
index
:
number
)
=>
{
if
(
isFirst
.
value
)
{
audioCanplay
();
isFirst
.
value
=
false
;
}
};
</
script
>
<
style
lang=
"less"
>
@import
'@/style/variables.less'
;
.
custom-start-only-vide
o-page
{
.
only-audi
o-page
{
display
:
flex
;
width
:
100%
!important
;
padding
:
0
!important
;
overflow
:
hidden
;
&
>
*
{
width
:
100%
;
background
:
#303030
;
height
:
100%
;
}
.start-only-video-live
{
display
:
flex
;
justify-content
:
center
;
align-items
:
center
;
box-sizing
:
border-box
;
}
}
</
style
>
src/pages/onlyAudioLive/useScript.ts
View file @
0e8b3413
This diff is collapsed.
Click to expand it.
src/router/tool.ts
View file @
0e8b3413
...
...
@@ -27,6 +27,11 @@ export default {
path
:
'/startLiveOnlyVideo'
,
name
:
'startLiveOnlyVideo'
,
},
// 音频直播
onlyAudioLive
:
{
path
:
'/startLiveOnlyAudio'
,
name
:
'startLiveOnlyAudio'
,
},
// 只有人工回复的页面
interactiveResponse
:
{
path
:
'/interactiveResponse'
,
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
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 comment