ajax放大缩小,vue接入实时视频,并可以控制缩放与上下左右

效果图:

1、在大屏上的效果:

页面嵌入实时视频,可通过点击下面的按钮实现,摄像头拉进,缩小,上下左右等旋转动作

6300e627fdac

image.png

2、双击视频时候全屏的放大效果:

6300e627fdac

image.png

步骤:

一、在要嵌入监控的vue页面中,用iframe引入:

6300e627fdac

image.png

vedio的目录结构:整个demo文件都要导入项目中,可以看到在ysyDemo下面还有几个js文件和一些样式,

我们需要修改的就是,在vedio里面接入视频地址,修改按钮样式就行

6300e627fdac

image.png

二、vedio.html代码如下:

球机示例模板

.layui-text-bottom {

height: 25px;

}

.layui-text-bottom button {

height: 100%;

width: 67px;

line-height: 10px

}

.content {

position: relative;

overflow: hidden;

}

.front {

width: 100%;

height: 100%;

position: absolute;

background-color: transparent;

top: 0px;

left: 0;

cursor: pointer;

}

.btns {

position: absolute !important;

right: 0;

bottom: 2px;

width: 100%;

height: 20px;

/* overflow: hidden; */

background: rgb(1, 26, 32, 0.3);

}

.btns button {

padding: 0;

border: none;

height: 17px;

width: 11px;

position: absolute;

background-color: transparent;

}

/* 右 */

.btns button:nth-of-type(4) {

left: 94px;

top: 4px;

width: 16px;

height: 16px;

background: url('./videoCtrl/jiantou-right.png') 0 0 no-repeat / 100% 100%;

}

/* 左 */

.btns button:nth-of-type(3) {

left: 80px;

top: 4px;

width: 16px;

height: 16px;

background: url('./videoCtrl/jiantou-left.png') 0 0 no-repeat / 100% 100%;

}

/* 下 */

.btns button:nth-of-type(2) {

left: 67px;

top: 4px;

width: 16px;

height: 16px;

background:

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值