我想在我的应用程序中显示理光SC相机的实时预览。但是,我无法在设备上获取视频流。我能够做一些基本的事情,例如将Api设置为v2并拍照。我是个新手,因此不是从事流和期货工作的专家。
/**
* Drag Resize Bottom Right Corner
**/
drag_br: function( e ) {
var self = this;
self.layoutRect( {
x: self._startPos.x,
y: self._startPos.y,
w: self._startPos.w + ( e.clientX - self._startPos.clientX ),
h: self._startPos.h + ( e.clientY - self._startPos.clientY )
});
self._repaint();
},
/**
* Drag Resize Top Right Corner
**/
drag_tr: function( e ) {
var self = this;
self.layoutRect( {
x: self._startPos.x ,
y: self._startPos.y + ( e.clientY - self._startPos.clientY ),
w: self._startPos.w + ( e.clientX - self._startPos.clientX ),
h: self._startPos.h - ( e.clientY - self._startPos.clientY )
});
self._repaint();
},
/**
* Drag Resize Top Left Corner
**/
drag_tl: function( e ) {
var self = this;
self.layoutRect( {
x: self._startPos.x + ( e.clientX - self._startPos.clientX ),
y: self._startPos.y + ( e.clientY - self._startPos.clientY ),
w: self._startPos.w - ( e.clientX - self._startPos.clientX ),
h: self._startPos.h - ( e.clientY - self._startPos.clientY )
});
self._repaint();
},
/**
* Drag Resize Bottom Left Corner
**/
drag_bl: function( e ) {
var self = this;
self.layoutRect( {
x: self._startPos.x + ( e.clientX - self._startPos.clientX ),
y: self._startPos.y,
w: self._startPos.w - ( e.clientX - self._startPos.clientX ),
h: self._startPos.h + ( e.clientY - self._startPos.clientY )
});
self._repaint();
},
/**
* Drag Resize Top Edge
**/
drag_t: function( e ) {
var self = this;
self.layoutRect( {
x: self._startPos.x,
y: self._startPos.y + ( e.clientY - self._startPos.clientY ),
w: self._startPos.w,
h: self._startPos.h - ( 2 * ( e.clientY - self._startPos.clientY ) )
});
self._repaint();
},
/**
* Drag Resize Left Edge
**/
drag_l: function( e ) {
var self = this;
self.layoutRect( {
x: self._startPos.x + ( e.clientX - self._startPos.clientX ),
y: self._startPos.y,
w: self._startPos.w - ( 2 * ( e.clientX - self._startPos.clientX ) ),
h: self._startPos.h
});
self._repaint();
},
/**
* Drag Resize Bottom Edge
**/
drag_b: function( e ) {
var self = this;
self.layoutRect( {
x: self._startPos.x,
y: self._startPos.y - ( e.clientY - self._startPos.clientY ),
w: self._startPos.w,
h: self._startPos.h + ( 2 * ( e.clientY - self._startPos.clientY ) )
});
self._repaint();
},
/**
* Drag Resize Right Edge
**/
drag_r: function( e ) {
var self = this;
self.layoutRect( {
x: self._startPos.x - ( e.clientX - self._startPos.clientX ),
y: self._startPos.y,
w: self._startPos.w + ( 2 * ( e.clientX - self._startPos.clientX ) ),
h: self._startPos.h
});
self._repaint();
},
大多数时候,什么都没有打印。有时我收到http状态码403。但是,我再也无法重现它。