You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 81c542a
Browse filesBrowse the repository at this point in the historyBrowse files
-`saveToCameraRoll` allows saving photos and videos to the Camera Roll. File to be saved is specified as a tag which can be
10
+
11
+
- on Android, a local image or video URI, such as "file:///sdcard/img.png"
12
+
- on iOS, a local video URI or any image URI (local, remote asset-library, or base64 data URIs)
13
+
14
+
Media type (photo or video) will be automatically inferred; any file will be inferred to be a photo, unless the file extension is `mov` or `mp4`, then it will be inferred to be a video.
15
+
16
+
```reason
17
+
saveToCameraRoll(tag)
18
+
```
19
+
20
+
The function will return the URI for the saved file as a string wrapped in a Promise, `Js.Promise.t(string)`.
21
+
22
+
-`saveToCameraRollWithType` allows saving photos and videos to the Camera Roll, where the tag will be specified as above, overriding the automatically determined type.
23
+
24
+
```reason
25
+
saveToCameraRollWithType(tag, _type)
26
+
```
27
+
28
+
where `_type` can be `` `photo `` or `` `video ``.
29
+
30
+
The function will return the URI for the saved file as a string wrapped in a Promise, `Js.Promise.t(string)`.
31
+
32
+
-`getPhotos` takes as argument `getPhotosParams`
33
+
7
34
```reason
8
-
type getPhotosParams;
35
+
getPhotos(getPhotosParams)
36
+
```
9
37
10
-
[@bs.obj]
11
-
external getPhotosParams:
38
+
The function will return a `photoIdentifiersPage` object wrapped in a Promise, that is `Js.Promise.t(photoIdentifiersPage)`. Array of `photoIdentifier` will contain details of photos or videos matching parameters provided in the `getPhotosParam` object.
39
+
40
+
41
+
## Types
42
+
43
+
-`getPhotosParams` can be constructed with its eponymous constructor
0 commit comments