Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
U
uniapp_vedio
Project
Project
Details
Activity
Releases
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
android
uniapp_vedio
Commits
6137e34b
Commit
6137e34b
authored
Jun 07, 2024
by
jyx
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修复不能暂停视频 bug
parent
5e4b770e
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
17 additions
and
45 deletions
+17
-45
recommendVideo.vue
vedio/components/home/recommendVideo.vue
+15
-26
kefu-popup.vue
vedio/components/kefu-popup/kefu-popup.vue
+1
-3
ttVideoDetail.vue
vedio/pagesC/ttvideo/ttVideoDetail.vue
+1
-16
No files found.
vedio/components/home/recommendVideo.vue
View file @
6137e34b
...
...
@@ -4,16 +4,10 @@
<swiper-item
v-for=
"(list, index) in displaySwiperList"
:key=
"index"
>
<view
v-if=
"Math.abs(displayIndex-index)==0"
style=
"height: 100%;"
@
click=
"tapVideoHover()"
>
<!--
<video
v-if=
"Math.abs(displayIndex-index)==0"
:id=
"''+list.vedioId"
:controls=
"controls"
:autoplay=
"true"
:isplay=
"true"
play-btn-position=
"center"
:loop=
"!isplay"
@
ended=
"ended"
@
controlstoggle=
"controlstoggle"
:show-fullscreen-btn=
"false"
:poster=
"list.coverImage"
:show-loading=
"true"
@
click=
"tapVideoHover()"
:enable-progress-gesture=
"false"
class=
"tsvideo"
:src=
"list.recommendUrl"
object-fit=
"cover"
/>
-->
<tt-video-player
v-if=
"Math.abs(displayIndex-index)==0"
:id=
"list.vedioId"
<tt-video-player
v-if=
"Math.abs(displayIndex-index)==0"
:id=
"'remmend'+list.vedioId"
:album-id=
"list.douyinAlbumId"
:episode-id=
"list.douyinEpisodeId"
:cloud-type=
"1"
version=
"1"
object-fit=
"contain"
:controls=
"controls"
:poster=
"data.coverImage"
:loop=
"!isplay"
:autoplay=
"
tru
e"
:enable-progress-gesture=
"false"
:show-loading=
"true"
@
play=
"startPlay"
:autoplay=
"
fals
e"
:enable-progress-gesture=
"false"
:show-loading=
"true"
@
play=
"startPlay"
:show-fullscreen-btn=
"false"
@
controlstoggle=
"controlstoggle"
@
ended=
"ended"
/>
</view>
<view
v-if=
"!isqp"
class=
"userInfo flex"
>
...
...
@@ -133,16 +127,16 @@
this
.
isFirstLoad
=
false
this
.
queryList
()
}
else
{
tt
.
createVideoContext
(
''
+
this
.
originList
[
originIndex
].
vedioIndex
,
this
).
play
();
// this.videoContext?.play()
if
(
this
.
videoContext
)
{
this
.
videoContext
.
play
()
}
}
},
stop
()
{
// audo.pause()
// this.videoContext?
.pause()
tt
.
createVideoContext
(
''
+
this
.
originList
[
originIndex
].
vedioIndex
,
this
).
pause
();
if
(
this
.
videoContext
)
{
this
.
videoContext
.
pause
()
this
.
videoContext
.
stop
()
}
},
queryList
()
{
// 推荐
...
...
@@ -228,20 +222,15 @@
this
.
oid
=
this
.
originList
.
length
-
1
}
console
.
log
(
'++++++++++++上一条播放数据 Index:'
,
this
.
oid
)
// audo.pause()
// this.videoContext = uni.createVideoContext("" + this.originList[this.oid].vedioId, this)
// this.videoContext.pause()
// this.videoContext.stop()
tt
.
createVideoContext
(
''
+
this
.
originList
[
this
.
oid
].
vedioIndex
,
this
).
pause
();
if
(
this
.
videoContext
)
{
this
.
videoContext
.
pause
()
this
.
videoContext
.
stop
()
}
setTimeout
(()
=>
{
console
.
log
(
'qqqqqq:'
,
this
.
originList
[
originIndex
].
vedioId
)
// this.videoContext = uni.createVideoContext("" + this.originList[originIndex].vedioId, this)
// this.videoContext.play()
tt
.
createVideoContext
(
''
+
this
.
originList
[
originIndex
].
vedioIndex
,
this
).
play
();
this
.
videoContext
=
tt
.
createVideoContext
(
'remmend'
+
this
.
originList
[
originIndex
].
vedioId
)
this
.
videoContext
.
play
()
},
500
)
var
pCount
=
this
.
originList
.
length
-
this
.
playCount
if
(
originIndex
==
pCount
)
{
...
...
vedio/components/kefu-popup/kefu-popup.vue
View file @
6137e34b
...
...
@@ -65,9 +65,7 @@
handler
:
function
(
newVal
,
oldVal
)
{
if
(
newVal
)
{
this
.
handleShow
();
}
else
{
this
.
$refs
.
kefuPop
.
close
(
'bottom'
);
}
}
},
immediate
:
true
}
...
...
vedio/pagesC/ttvideo/ttVideoDetail.vue
View file @
6137e34b
...
...
@@ -12,12 +12,6 @@
:show-fullscreen-btn=
"false"
@
controlstoggle=
"controlstoggle"
@
timeupdate=
"timeUpdate"
@
ended=
"ended"
/>
<!--
<video
v-if=
"!canUseTTPlayer && Math.abs(displayIndex-index)==0"
:id=
"list.vedioIndex"
@
ended=
"ended"
:controls=
"controls"
:loop=
"!isplay"
:enable-progress-gesture=
"false"
:show-loading=
"true"
:show-fullscreen-btn=
"false"
@
controlstoggle=
"controlstoggle"
:poster=
"data.coverImage"
@
timeupdate=
"timeupdate"
:autoplay=
"!list.lock"
:src=
"list.vedioUrl"
class=
"tsvideo"
play-btn-position=
"center"
object-fit=
"contain"
/>
-->
<view
v-if=
"originList[originIndex].lock || !list.vedioUrl"
class=
"videoHover tsimg"
@
click
.
stop=
"tapVideoHover(index,list.pays)"
:style=
"'width: '+ windowWidth +'px; height:'+100+'%;'"
>
...
...
@@ -180,15 +174,6 @@
});
},
// 分享
// onShareAppMessage() {
// let result = {
// title: this.data.title,
// imageUrl: this.data.coverImage,
// path: `/pageC/ttvideo/ttVideoDetail?bookId=${this.bookData.id}`
// }
// return result;
// },
methods
:
{
startPlay
()
{
if
(
tt
.
canIUse
(
'preloadResourceVideo'
))
{
...
...
@@ -249,7 +234,7 @@
govip
()
{
navigateTo
(
`/pagesA/vipPay/vipPay`
)
},
time
u
pdate
(
event
)
{},
time
U
pdate
(
event
)
{},
selectThisVideo
(
index
)
{
if
(
this
.
originIndex
==
index
)
{
return
...
...
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