-
Notifications
You must be signed in to change notification settings - Fork 1
/
cordova_media_capture.mli
112 lines (98 loc) · 3.96 KB
/
cordova_media_capture.mli
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
(* -------------------------------------------------------------------------- *)
type error_type =
| Internal_error [@js 0]
| Application_busy [@js 1]
| Invalid_argument [@js 2]
| No_media_files [@js 3]
| Not_supported [@js 20]
[@@js.enum]
(* -------------------------------------------------------------------------- *)
(* -------------------------------------------------------------------------- *)
class capture_video_options : Ojs.t ->
object
inherit Ojs.obj
method limit : int
method duration : int
end
(* -------------------------------------------------------------------------- *)
class capture_image_options : Ojs.t ->
object
inherit Ojs.obj
method limit : int
end
(* -------------------------------------------------------------------------- *)
(* -------------------------------------------------------------------------- *)
class capture_audio_options : Ojs.t ->
object
inherit Ojs.obj
method limit : int
method duration : int
end
(* -------------------------------------------------------------------------- *)
(* -------------------------------------------------------------------------- *)
class configuration_data : Ojs.t ->
object
inherit Ojs.obj
method media_type : string
method height : int
method width : int
end
(* -------------------------------------------------------------------------- *)
(* -------------------------------------------------------------------------- *)
class media_file_data : Ojs.t ->
object
inherit Ojs.obj
method codecs : string
method bitrate : int
method height : int
method width : int
method duration : int
end
(* -------------------------------------------------------------------------- *)
(* -------------------------------------------------------------------------- *)
class capture_error : Ojs.t ->
object
inherit Ojs.obj
method code : error_type
end
(* -------------------------------------------------------------------------- *)
(* -------------------------------------------------------------------------- *)
class media_file : Ojs.t ->
object
inherit Ojs.obj
method name : string
method full_path : string
method media_type : string
method last_modified_date : string
method size : int
method get_format_data : (media_file_data -> unit) ->
?err_cb:(capture_error -> unit) ->
unit ->
unit
end
(* -------------------------------------------------------------------------- *)
(* -------------------------------------------------------------------------- *)
class capture : Ojs.t ->
object
inherit Ojs.obj
method capture_video : (media_file array -> unit) ->
(capture_error -> unit) ->
?opt:capture_video_options ->
unit ->
unit
method capture_image : (media_file array -> unit) ->
(capture_error -> unit) ->
?opt:capture_image_options ->
unit ->
unit
method capture_audio : (media_file array -> unit) ->
(capture_error -> unit) ->
?opt:capture_audio_options ->
unit ->
unit
end
(* -------------------------------------------------------------------------- *)
(* -------------------------------------------------------------------------- *)
val t : unit -> capture
[@@js.get "navigator.device.capture"]
(* -------------------------------------------------------------------------- *)