@capacitor-community/camera-preview
Advanced tools
Comparing version 1.0.2 to 1.0.3
@@ -16,2 +16,6 @@ declare module "@capacitor/core" { | ||
height?: number; | ||
/** The x origin, default 0 (applicable to the android only) */ | ||
x?: number; | ||
/** The y origin, default 0 (applicable to the android only) */ | ||
y?: number; | ||
/** The preview bottom padding in pixes. Useful to keep the appropriate preview sizes when orientation changes (applicable to the android and ios platforms only) */ | ||
@@ -41,2 +45,3 @@ paddingBottom?: number; | ||
}): void; | ||
flip(): void; | ||
} |
@@ -14,4 +14,5 @@ import { WebPlugin } from "@capacitor/core"; | ||
}): Promise<void>; | ||
flip(): Promise<void>; | ||
} | ||
declare const CameraPreview: CameraPreviewWeb; | ||
export { CameraPreview }; |
@@ -50,10 +50,12 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { | ||
const video = document.getElementById("video"); | ||
video.pause(); | ||
const st = video.srcObject; | ||
const tracks = st.getTracks(); | ||
for (var i = 0; i < tracks.length; i++) { | ||
var track = tracks[i]; | ||
track.stop(); | ||
if (video) { | ||
video.pause(); | ||
const st = video.srcObject; | ||
const tracks = st.getTracks(); | ||
for (var i = 0; i < tracks.length; i++) { | ||
var track = tracks[i]; | ||
track.stop(); | ||
} | ||
video.remove(); | ||
} | ||
video.srcObject = null; | ||
}); | ||
@@ -89,2 +91,7 @@ } | ||
} | ||
flip() { | ||
return __awaiter(this, void 0, void 0, function* () { | ||
throw new Error('flip not supported under the web platform'); | ||
}); | ||
} | ||
} | ||
@@ -91,0 +98,0 @@ const CameraPreview = new CameraPreviewWeb(); |
{ | ||
"name": "@capacitor-community/camera-preview", | ||
"version": "1.0.2", | ||
"version": "1.0.3", | ||
"description": "Camera preview", | ||
@@ -5,0 +5,0 @@ "main": "dist/esm/index.js", |
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
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
291526
164