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
650d8ce0
Commit
650d8ce0
authored
Aug 22, 2023
by
haojie
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
video偶尔会闪屏的问题
parent
28a22dd5
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
30 additions
and
7 deletions
+30
-7
src/components/AddVideoPlay.vue
+13
-4
src/pages/OnlyVideoLive/useScript.ts
+17
-3
No files found.
src/components/AddVideoPlay.vue
View file @
650d8ce0
...
@@ -22,7 +22,7 @@
...
@@ -22,7 +22,7 @@
class=
"video-default"
class=
"video-default"
:src=
"video2"
:src=
"video2"
@
ended=
"secondVideoEnded"
@
ended=
"secondVideoEnded"
@
canplay=
"canplay2"
@
canplay
through
=
"canplay2"
></video>
></video>
<!-- 动作 -->
<!-- 动作 -->
<video
<video
...
@@ -31,7 +31,7 @@
...
@@ -31,7 +31,7 @@
class=
"video-default"
class=
"video-default"
:src=
"actionVideo"
:src=
"actionVideo"
@
ended=
"actionVideoEnded"
@
ended=
"actionVideoEnded"
@
canplay=
"actionCanplay"
@
canplay
through
=
"actionCanplay"
></video>
></video>
<!-- 结束动作 -->
<!-- 结束动作 -->
<video
<video
...
@@ -39,6 +39,7 @@
...
@@ -39,6 +39,7 @@
ref=
"videoEndAction"
ref=
"videoEndAction"
class=
"video-default"
class=
"video-default"
:src=
"actionEndVideo"
:src=
"actionEndVideo"
@
canplaythrough=
"actionEndCanplay"
@
ended=
"actionEndVideoEnded"
@
ended=
"actionEndVideoEnded"
></video>
></video>
<ConfirmDialog
<ConfirmDialog
...
@@ -227,7 +228,7 @@ const confirm = () => {
...
@@ -227,7 +228,7 @@ const confirm = () => {
findLastAction
();
findLastAction
();
if
(
isDev
())
{
if
(
isDev
())
{
// 测试将视频进度改为160
// 测试将视频进度改为160
//
videoFirst.value[currentPlayMainIndex.value].currentTime = 170;
videoFirst
.
value
[
currentPlayMainIndex
.
value
].
currentTime
=
170
;
}
}
};
};
...
@@ -273,7 +274,6 @@ const findLastAction = () => {
...
@@ -273,7 +274,6 @@ const findLastAction = () => {
if
(
!
endVideoIsMain
&&
typeof
currentPlayMainIndex
.
value
===
'number'
)
{
if
(
!
endVideoIsMain
&&
typeof
currentPlayMainIndex
.
value
===
'number'
)
{
const
actionUrl
=
realVideoList
[
mainVideoList
[
currentPlayMainIndex
.
value
].
videoIndex
].
actionUrl
;
const
actionUrl
=
realVideoList
[
mainVideoList
[
currentPlayMainIndex
.
value
].
videoIndex
].
actionUrl
;
actionEndVideo
.
value
=
actionUrl
[
actionUrl
.
length
-
1
].
url
;
actionEndVideo
.
value
=
actionUrl
[
actionUrl
.
length
-
1
].
url
;
console
.
log
(
actionEndVideo
.
value
,
'找到结束动作视频了'
);
}
}
};
};
...
@@ -435,6 +435,10 @@ const actionCanplay = () => {
...
@@ -435,6 +435,10 @@ const actionCanplay = () => {
}
}
};
};
const
actionEndCanplay
=
()
=>
{
console
.
log
(
'结束动作可以播放'
);
};
const
secondPlay
=
()
=>
{
const
secondPlay
=
()
=>
{
mainVideoPlayChange
(
false
);
mainVideoPlayChange
(
false
);
videoSecond
.
value
?.
play
();
videoSecond
.
value
?.
play
();
...
@@ -534,6 +538,7 @@ watch(
...
@@ -534,6 +538,7 @@ watch(
);
);
const
updateTime
=
()
=>
{
const
updateTime
=
()
=>
{
try
{
let
row
=
videoFirst
.
value
[
currentPlayMainIndex
.
value
];
let
row
=
videoFirst
.
value
[
currentPlayMainIndex
.
value
];
// 获取当前下标的total
// 获取当前下标的total
const
{
mainVideoList
}
=
props
;
const
{
mainVideoList
}
=
props
;
...
@@ -544,6 +549,10 @@ const updateTime = () => {
...
@@ -544,6 +549,10 @@ const updateTime = () => {
// 提交当前进度
// 提交当前进度
emit
(
'currentTime'
,
currentPlayMainIndex
.
value
,
row
.
currentTime
);
emit
(
'currentTime'
,
currentPlayMainIndex
.
value
,
row
.
currentTime
);
}
}
}
catch
(
e
)
{
console
.
log
(
'updateTime'
);
console
.
log
(
e
);
}
};
};
// 减小正在播放的视频音量
// 减小正在播放的视频音量
const
lowerVideoVolume
=
()
=>
{
const
lowerVideoVolume
=
()
=>
{
...
...
src/pages/OnlyVideoLive/useScript.ts
View file @
650d8ce0
...
@@ -278,6 +278,7 @@ export default function () {
...
@@ -278,6 +278,7 @@ export default function () {
// 当前播放进度变化
// 当前播放进度变化
const
currentTimeChange
=
(
index
:
number
,
value
:
number
)
=>
{
const
currentTimeChange
=
(
index
:
number
,
value
:
number
)
=>
{
try
{
// console.log(value, '当前主视频进度');
// console.log(value, '当前主视频进度');
let
row
=
mainVideoList
.
value
[
index
];
let
row
=
mainVideoList
.
value
[
index
];
// 剩余多少没有播放
// 剩余多少没有播放
...
@@ -289,6 +290,7 @@ export default function () {
...
@@ -289,6 +290,7 @@ export default function () {
if
(
if
(
currentEsidueTime
<
esidueTime
&&
currentEsidueTime
<
esidueTime
&&
currentVideoRow
.
confuse
===
CONFUSE_STATUS
.
CONFUSE_STATUS_WAIT
&&
currentVideoRow
.
confuse
===
CONFUSE_STATUS
.
CONFUSE_STATUS_WAIT
&&
liveDetail
.
value
.
type_content
&&
liveDetail
.
value
.
type_content
.
length
&&
liveDetail
.
value
.
type_content
.
length
&&
typeof
liveDetail
.
value
.
phonetic_timbres_id
===
'number'
&&
typeof
liveDetail
.
value
.
phonetic_timbres_id
===
'number'
&&
typeof
liveDetail
.
value
.
tone_id
===
'number'
&&
typeof
liveDetail
.
value
.
tone_id
===
'number'
&&
...
@@ -307,6 +309,9 @@ export default function () {
...
@@ -307,6 +309,9 @@ export default function () {
if
(
currentEsidueTime
<
20
&&
typeof
currentPlayMainIndex
.
value
===
'number'
)
{
if
(
currentEsidueTime
<
20
&&
typeof
currentPlayMainIndex
.
value
===
'number'
)
{
findOneVideoInit
();
findOneVideoInit
();
}
}
}
catch
(
e
)
{
console
.
log
(
e
);
}
};
};
// 互动视频播放结束
// 互动视频播放结束
...
@@ -580,13 +585,18 @@ export default function () {
...
@@ -580,13 +585,18 @@ export default function () {
// {
// {
// url: 'http://yunyi-live.oss-cn-hangzhou.aliyuncs.com/upload/2/2023-08-217a51d89c-1a9f-476b-950c-f81d0423b816.mp4',
// url: 'http://yunyi-live.oss-cn-hangzhou.aliyuncs.com/upload/2/2023-08-217a51d89c-1a9f-476b-950c-f81d0423b816.mp4',
// type: 3,
// type: 3,
// play_time: 1
5
,
// play_time: 1
0
,
// },
// },
// 动作视频
// 动作视频
// {
// url: 'http://yunyi-live.oss-cn-hangzhou.aliyuncs.com/upload/2/2023-08-2192d4a904-c78a-4a87-9728-d93bb40cad77.mp4',
// type: 3,
// play_time: 172,
// },
{
{
url
:
'http://yunyi-live.oss-cn-hangzhou.aliyuncs.com/upload/2/2023-08-21
92d4a904-c78a-4a87-9728-d93bb40cad77
.mp4'
,
url
:
'http://yunyi-live.oss-cn-hangzhou.aliyuncs.com/upload/2/2023-08-21
7a51d89c-1a9f-476b-950c-f81d0423b816
.mp4'
,
type
:
3
,
type
:
3
,
play_time
:
30
,
play_time
:
172
,
},
},
{
{
url
:
url
,
url
:
url
,
...
@@ -803,6 +813,10 @@ export default function () {
...
@@ -803,6 +813,10 @@ export default function () {
StartIntervalMainVideo
();
StartIntervalMainVideo
();
}
}
}
else
{
}
else
{
writeLog
({
name
:
'mergeCallback 回调格式错误'
,
value
:
params
,
});
console
.
log
(
'回调格式错误'
);
console
.
log
(
'回调格式错误'
);
console
.
log
(
params
);
console
.
log
(
params
);
}
}
...
...
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