Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
Toggle navigation
This project
Loading...
Sign in
蒋秀川
/
miniProject
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 fb94e5bf
authored
Sep 27, 2023
by
Tianqing Liu
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
feat: 增加节流控制
1 parent
3ecf4e47
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
3 deletions
h5/src/components/vionPlayer/index.vue
h5/src/components/vionPlayer/index.vue
View file @
fb94e5b
...
...
@@ -2,13 +2,12 @@
<div
ref=
"container"
:data-player-type=
"this.playerType"
:class=
"containerClassName"
@
wheel=
"handleWheel"
>
</div>
</
template
>
<
script
>
import
{
merge
}
from
'lodash'
;
import
{
merge
,
throttle
}
from
'lodash'
;
// checkSupportMSEHevc checkSupportSIMD, checkSupportWCSHevc
import
{
getWatermarkCanvasImg
}
from
'./utils'
;
import
{
getPlayerConfig
,
getRotateConfig
,
getMirrorRotate
,
getPlaybackConfig
}
from
'./config'
;
...
...
@@ -143,6 +142,7 @@ export default {
});
// 电子放大
this
.
$refs
.
container
.
addEventListener
(
'wheel'
,
throttle
(
this
.
handleWheel
,
200
));
},
setForward
(
rate
)
{
this
.
_jessibuca
.
forward
(
rate
);
...
...
@@ -180,7 +180,6 @@ export default {
},
handleWheel
(
event
)
{
console
.
log
(
'handleWheel'
,
event
);
// TODO: 增加防抖动
event
.
stopPropagation
();
const
direction
=
event
.
deltaY
<
0
;
this
.
zoom
(
direction
);
...
...
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