@capacitor-community/photoviewer
Capacitor community plugin for Native Photo Viewer allowing to open fullscreen a selected picture from a grid of pictures with zoom-in and sharing features. A picture can be acessed by url or base64.
On iOS plugin, the creation of a movie from the pictures stored in the All Photos folder is now available.
echo(options: capEchoOptions) => Promise<capEchoResult>
Echo a given string
Param | Type | Description |
---|---|---|
options |
capEchoOptions |
: capEchoOptions |
Returns: Promise<capEchoResult>
Since: 0.0.1
show(options: capShowOptions) => Promise<capShowResult>
Show the PhotoViewer
Param | Type | Description |
---|---|---|
options |
capShowOptions |
capShowOptions |
Returns: Promise<capShowResult>
Since: 0.0.1
saveImageFromHttpToInternal(options: capHttpOptions) => Promise<capHttpResult>
Download an image from http and save it locally
Param | Type | Description |
---|---|---|
options |
capHttpOptions |
capHttpOptions |
Returns: Promise<capHttpResult>
Since: 3.0.4
getInternalImagePaths() => Promise<capPaths>
Get the internal image path list
Returns: Promise<capPaths>
Since: 3.0.4
Prop | Type | Description |
---|---|---|
value |
string |
String returned |
Prop | Type | Description |
---|---|---|
value |
string |
String to be echoed |
Prop | Type | Description |
---|---|---|
result |
boolean |
result set to true when successful else false |
message |
string |
a returned message |
imageIndex |
number |
Result Image index at closing returned |
Prop | Type | Description |
---|---|---|
images |
Image[] |
List of image |
options |
ViewerOptions |
Viewer options (optional) |
mode |
string |
Viewer mode ("gallery","slider","one") |
startFrom |
number |
Viewer image index to start from for mode ("slider","one") |
Prop | Type | Description |
---|---|---|
url |
string |
image url |
title |
string |
image title optional |
Prop | Type | Description |
---|---|---|
share |
boolean |
display the share button (default true) |
title |
boolean |
display the image title if any (default true) |
transformer |
string |
transformer Android "zoom", "depth" or "none" (default "zoom") |
spancount |
number |
Grid span count (default 3) |
maxzoomscale |
number |
Max Zoom Scale (default 3) |
compressionquality |
number |
Compression Quality for Sharing Image range [0-1] (default 0.8) |
backgroundcolor |
string |
Background Color ["white", "ivory", "lightgrey", "darkgrey", "grey", "dimgrey", "black"] (default "black") |
divid |
string |
Div HTML Element Id (Web only) (default 'photoviewer-container') |
movieoptions |
MovieOptions |
Movie Options iOS only |
customHeaders |
{ [key: string]: string; } |
Custom Headers |
Prop | Type | Description |
---|---|---|
name |
string |
Movie Name (default "myMovie") iOS only |
imagetime |
number |
Image Time Duration in Seconds (default 3) iOS only |
mode |
string |
Movie Mode "portrait" / "landscape" (default "landscape") iOS only |
ratio |
string |
Movie Ratio "4/3" / "16/9" (default "16/9") iOS only |
Prop | Type | Description |
---|---|---|
webPath |
string |
Web View-friendly path of the internal stored image |
message |
string |
message |
Prop | Type | Description |
---|---|---|
url |
string |
https url of an image |
filename |
string |
file name of the internal stored image |
Prop | Type | Description |
---|---|---|
pathList |
string[] |
image path list |
The listeners are attached to the plugin not to the DOM document element.
Listener | Type | Description |
---|---|---|
jeepCapPhotoViewerExit | capExitListener | Emitted when the close button is pressed |
Prop | Type | Description |
---|---|---|
result | boolean | true if successful false otherwise |
imageIndex | number | last selected image index in slider/one mode |
message | string | error message if result is false |