displayPic(data){
var blob=new Blob([data],{ type: 'image/jpeg' });//这个对象用不了,如何让他能在img标签显示这个图片呢
this.blob=URL.createObjectURL(blob);
},
videochange(res) {
this.display = res.detail.value;
var that=this;
if (this.display) {
server=server||new UDPServer(7000,1024*25);
server.listener((data)=>{
that.displayPic(data.msg);
},(error)=>{
console.error(error);
})
setTimeout(()=>{
this.sendudp('video:on');
},500);
} else {
server.stop();
this.blob='../../static/logo.png'
this.sendudp('video:off');
}
},
w***@qq.com
- 发布:2024-08-02 15:21
- 更新:2024-08-02 15:21
- 阅读:624
0 个回复