scandit-cordova-datacapture-core
Advanced tools
Comparing version 6.25.0 to 6.26.0-beta.1
@@ -7,3 +7,3 @@ export * from './Cordova/CommonCordova'; | ||
export { RectangularViewfinderLineStyle, RectangularViewfinderStyle, Viewfinder, Brush, NoViewfinder, Camera, CameraSettings, CameraPosition } from 'scandit-datacapture-frameworks-core'; | ||
export { FocusGestureStrategy, FocusRange, FrameData, FrameSource, FrameSourceState, FrameSourceListener, TorchState, VideoResolution, FocusGesture } from 'scandit-datacapture-frameworks-core'; | ||
export { FocusGestureStrategy, FocusRange, FrameData, FrameSource, FrameSourceState, FrameSourceListener, ImageFrameSource, TorchState, VideoResolution, FocusGesture } from 'scandit-datacapture-frameworks-core'; | ||
export { ImageBuffer, Feedback, Sound, Vibration, DataCaptureContext, DataCaptureContextSettings, DataCaptureContextCreationOptions } from 'scandit-datacapture-frameworks-core'; | ||
@@ -10,0 +10,0 @@ export { DataCaptureMode, DataCaptureContextListener, ContextStatus, DataCaptureComponent, ZoomGesture, SpotlightViewfinder, TapToFocus, Control, SwipeToZoom } from 'scandit-datacapture-frameworks-core'; |
@@ -334,6 +334,43 @@ var core = require('scandit-cordova-datacapture-core.Core'); | ||
class NativeImageFrameSourceProxy extends core.BaseNativeProxy { | ||
static get cordovaExec() { | ||
return Cordova.exec; | ||
} | ||
getCurrentCameraState(_position) { | ||
return new Promise((resolve, reject) => { | ||
NativeImageFrameSourceProxy.cordovaExec(resolve, reject, CordovaFunction.GetCurrentCameraState, null); | ||
}); | ||
} | ||
switchCameraToDesiredState(desiredStateJson) { | ||
return new Promise((resolve, reject) => { | ||
NativeImageFrameSourceProxy.cordovaExec(resolve, reject, CordovaFunction.SwitchCameraToDesiredState, [desiredStateJson]); | ||
}); | ||
} | ||
registerListenerForEvents() { | ||
NativeImageFrameSourceProxy.cordovaExec(this.notifyListeners.bind(this), null, CordovaFunction.SubscribeFrameSourceListener, null); | ||
} | ||
unregisterListenerForEvents() { | ||
return new Promise((resolve, reject) => { | ||
NativeImageFrameSourceProxy.cordovaExec(resolve, reject, CordovaFunction.UnsubscribeFrameSourceListener, null); | ||
}); | ||
} | ||
notifyListeners(event) { | ||
if (!event) { | ||
// The event could be undefined/null in case the plugin result did not pass a "message", | ||
// which could happen e.g. in case of "ok" results, which could signal e.g. successful | ||
// listener subscriptions. | ||
return; | ||
} | ||
switch (event.name) { | ||
case core.FrameSourceListenerEvents.didChangeState: | ||
this.eventEmitter.emit(core.FrameSourceListenerEvents.didChangeState, event.argument.state); | ||
break; | ||
} | ||
} | ||
} | ||
function initCoreProxy() { | ||
core.FactoryMaker.bindInstance('DataCaptureContextProxy', new NativeDataCaptureContextProxy()); | ||
core.FactoryMaker.bindInstance('FeedbackProxy', new NativeFeedbackProxy()); | ||
//FactoryMaker.bindInstance('ImageFrameSourceProxy', new NativeImageFrameSourceProxy()); | ||
core.FactoryMaker.bindInstance('ImageFrameSourceProxy', new NativeImageFrameSourceProxy()); | ||
core.FactoryMaker.bindInstance('DataCaptureViewProxy', new NativeDataCaptureViewProxy()); | ||
@@ -675,2 +712,3 @@ core.FactoryMaker.bindInstance('CameraProxy', new NativeCameraProxy()); | ||
exports.ImageBuffer = core.ImageBuffer; | ||
exports.ImageFrameSource = core.ImageFrameSource; | ||
exports.LaserlineViewfinder = core.LaserlineViewfinder; | ||
@@ -677,0 +715,0 @@ Object.defineProperty(exports, "LaserlineViewfinderStyle", { |
{ | ||
"name": "scandit-cordova-datacapture-core", | ||
"version": "6.25.0", | ||
"version": "6.26.0-beta.1", | ||
"description": "Scandit Data Capture SDK for Cordova", | ||
@@ -25,3 +25,3 @@ "license": "Apache-2.0", | ||
"dependencies": { | ||
"scandit-datacapture-frameworks-core": "6.25.0" | ||
"scandit-datacapture-frameworks-core": "6.26.0-beta.1" | ||
}, | ||
@@ -28,0 +28,0 @@ "devDependencies": { |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
507997
51
3835
2
+ Addedscandit-datacapture-frameworks-core@6.26.0-beta.1(transitive)
- Removedscandit-datacapture-frameworks-core@6.25.0(transitive)