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 95c3773f
authored
Aug 01, 2022
by
李伟康
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
修复BUG
1 parent
b2596f3f
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
10 deletions
src/utils/audio.js
src/views/crowdfunding/index.vue
src/utils/audio.js
View file @
95c3773
...
...
@@ -8,10 +8,11 @@ export function Audio (url, callBack) {
if
(
this
.
isPlayingBGM
||
off
)
{
this
.
sourceNode
.
stop
()
this
.
isPlayingBGM
=
false
console
.
log
(
'暂停——————————————'
,
this
.
sourceNode
)
}
else
this
.
_playSourceNode
()
}
}
this
.
stopVideo
=
function
()
{
this
.
stopVideo
=
function
()
{
if
(
typeof
this
.
sourceNode
==
'object'
)
{
if
(
this
.
isPlayingBGM
)
{
this
.
sourceNode
.
stop
()
...
...
@@ -28,6 +29,7 @@ export function Audio (url, callBack) {
_sourceNode
.
connect
(
audioContext
.
destination
)
_sourceNode
.
start
(
0
)
this
.
sourceNode
=
_sourceNode
console
.
log
(
'播放——————————————'
,
this
.
sourceNode
)
this
.
isPlayingBGM
=
true
}
let
loadAndAutoPlay
=
(
audioUrl
)
=>
{
...
...
src/views/crowdfunding/index.vue
View file @
95c3773
...
...
@@ -345,6 +345,13 @@ export default {
return
`${days
}
天${hours
}
:${minutes
}
:${second
}
`
}
this
.
detail
.
activityVideos
[
index
].
duration
=
date_format
(
srcElement
.
duration
)
srcElement
.
controls
=
false
srcElement
.
addEventListener
(
'webkitendfullscreen'
,
()
=>
{
let
{
audioFlag
}
=
this
if
(
audioFlag
)
this
.
audioAutoPlay
()
srcElement
.
pause
()
// video.removeEventListener('webkitendfullscreen')
}
)
}
,
authLocation
(
data
)
{
if
(
data
.
distance
)
this
.
openLocation
()
...
...
@@ -386,22 +393,14 @@ export default {
window
.
$AUDIO
.
toggleBGM
()
}
,
playVideo
(
index
)
{
let
_this
=
this
,
{
audioFlag
}
=
this
let
{
audioFlag
}
=
this
this
.
currentVideoIndex
=
index
let
video
=
this
.
$refs
[
`video-${index
}
`
][
0
]
video
.
controls
=
false
video
.
addEventListener
(
'webkitendfullscreen'
,
()
=>
{
if
(
audioFlag
)
this
.
audioAutoPlay
()
video
.
pause
()
// video.removeEventListener('webkitendfullscreen')
}
)
if
(
audioFlag
)
this
.
audioAutoPlay
(
true
)
setTimeout
(()
=>
{
video
.
play
()
if
(
video
.
webkitRequestFullScreen
)
video
.
webkitRequestFullScreen
()
}
,
500
)
}
,
openLocation
()
{
let
{
sponsorName
,
activityAddressDetailName
,
activityAddressLat
,
activityAddressLng
}
=
this
.
detail
...
...
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