Commit 3ecf4e47 by Tianqing Liu

feat: 鼠标滚轮控制电子放大

1 parent 3a9f9ae1
<template> <template>
<div ref="container" :data-player-type="this.playerType" :class="containerClassName" ></div> <div ref="container"
:data-player-type="this.playerType"
:class="containerClassName"
@wheel="handleWheel"
>
</div>
</template> </template>
<script> <script>
...@@ -173,6 +178,13 @@ export default { ...@@ -173,6 +178,13 @@ export default {
else targetPlayer.zoom.narrowPrecision(); else targetPlayer.zoom.narrowPrecision();
} }
}, },
handleWheel(event) {
console.log('handleWheel', event);
// TODO: 增加防抖动
event.stopPropagation();
const direction = event.deltaY < 0;
this.zoom(direction);
},
// 暴露方法 // 暴露方法
play(url, isPlayback = false) { play(url, isPlayback = false) {
...@@ -277,6 +289,10 @@ export default { ...@@ -277,6 +289,10 @@ export default {
::v-deep(.jessibuca-control-progress-simple) { ::v-deep(.jessibuca-control-progress-simple) {
display: none; display: none;
} }
// 电子放大
::v-deep(.jessibuca-zoom-controls) {
display: none !important;
}
// 云台控制 // 云台控制
&[data-player-type="playback"] { &[data-player-type="playback"] {
::v-deep(.jessibuca-ptz) { ::v-deep(.jessibuca-ptz) {
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!