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 3a9f9ae1
authored
Sep 26, 2023
by
Tianqing Liu
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
feat: 放大缩小功能
1 parent
9d1a2b40
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
19 additions
and
0 deletions
h5/src/components/vionPlayer/index.vue
h5/src/views/player/vionPlayerDemo.vue
h5/src/components/vionPlayer/index.vue
View file @
3a9f9ae
...
...
@@ -90,6 +90,7 @@ export default {
console
.
log
(
'init-options'
,
options
);
this
.
_jessibuca
=
new
window
.
JessibucaPro
(
options
);
console
.
log
(
'_jessibuca'
,
this
.
_jessibuca
);
this
.
registerEvent
(
this
.
_jessibuca
);
...
...
@@ -135,6 +136,8 @@ export default {
console
.
log
(
'playbackSeek'
,
data
);
// jessibuca.setPlaybackStartTime(data.ts);
});
// 电子放大
},
setForward
(
rate
)
{
this
.
_jessibuca
.
forward
(
rate
);
...
...
@@ -160,6 +163,16 @@ export default {
// 传入参数 优先级 大于属性
return
status
||
this
.
isPlayback
;
},
// true 放大,false 缩小
zoom
(
direction
=
true
)
{
// temp1.player.zoom.expandPrecision()
const
targetPlayer
=
this
.
_jessibuca
.
player
;
// zooming 表示处于电子放大状态
if
(
targetPlayer
&&
targetPlayer
.
zooming
&&
targetPlayer
.
zoom
)
{
if
(
direction
)
targetPlayer
.
zoom
.
expandPrecision
();
else
targetPlayer
.
zoom
.
narrowPrecision
();
}
},
// 暴露方法
play
(
url
,
isPlayback
=
false
)
{
...
...
h5/src/views/player/vionPlayerDemo.vue
View file @
3a9f9ae
...
...
@@ -23,6 +23,8 @@
<button
@
click=
"handleRotate"
>
旋转
</button>
<button
@
click=
"handleScreenshot"
>
抓拍
</button>
<button
@
click=
"handleScreenshot2"
>
抓拍(原)
</button>
<button
@
click=
"handleZoom(true)"
>
放大
</button>
<button
@
click=
"handleZoom(false)"
>
缩小
</button>
<div
class=
"record"
>
<input
type=
"text"
v-model=
"recordUrl"
>
<button
@
click=
"handleRecord"
>
录像
</button>
...
...
@@ -99,6 +101,9 @@ export default {
console
.
log
(
'handleRotate'
);
this
.
$refs
.
vionPlayer
.
rotate
();
},
handleZoom
(
direction
)
{
this
.
$refs
.
vionPlayer
.
zoom
(
direction
);
},
handlePtz
(
arrow
)
{
console
.
log
(
'handlePtz'
,
arrow
);
...
...
@@ -144,6 +149,7 @@ export default {
>
button
{
margin-left
:
2px
;
}
}
}
::v-deep
(
.el-dialog__body
)
{
...
...
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