请问下html5+ 扫描二维码后怎么关闭扫描的窗口
我是用下面的代码调用摄像头扫码的:
if(!scanObj) {
scanObj = new plus.barcode.Barcode("scanContainer", [plus.barcode.QR, plus.barcode.EAN13, plus.barcode.EAN8], {
background: '#0000FF',
frameColor: '#6495ED',
position: 'absolute',
width: '150px',
height: '150px'
});
}
scanObj.onmarked = function(type, code, file) {
plus.nativeUI.toast(code);
scanObj.cancel();
};
这个扫完后,那个扫描窗口一直在界面上,要怎么关闭这个窗口呢?