Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in
Toggle navigation
P
poc-fe
Project
Project
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
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
poc
poc-fe
Commits
68e6c948
Commit
68e6c948
authored
Mar 05, 2025
by
nick zheng
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'beta' into 'master'
fix: 移动端对话播放之前静默播放音频 See merge request
!168
parents
1b1322fd
d97ecd47
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
19 additions
and
0 deletions
+19
-0
share-application-mobile.vue
src/views/share/share-application-mobile.vue
+19
-0
No files found.
src/views/share/share-application-mobile.vue
View file @
68e6c948
...
...
@@ -83,6 +83,7 @@ onMounted(async () => {
if
(
userStore
.
isLogin
)
{
await
handleCreateDialogues
()
await
handleGetAutoPlayByAgentId
()
await
handleInitSoundPlay
()
}
fullScreenLoading
.
value
=
false
return
...
...
@@ -296,6 +297,24 @@ function handleAudioPause(isClearMessageList = false) {
footerInputRef
.
value
?.
blockMessageResponse
()
}
}
// 静默播放
function
handleInitSoundPlay
()
{
const
sound
=
new
Howl
({
src
:
[
'https://gsst-modellink-prod.gz.bcebos.com/data/20250305/1741155741444.wav'
],
html5
:
!
validBrowser
(),
volume
:
0
,
preload
:
true
,
onload
:
()
=>
{
sound
.
play
()
setTimeout
(()
=>
sound
.
stop
(),
100
)
},
onplay
:
()
=>
{
sound
.
stop
()
sound
.
unload
()
},
})
}
</
script
>
<
template
>
...
...
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