theta-client-react-native 1.0.1 → 1.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (119) hide show
  1. package/README.md +6 -1
  2. package/android/build.gradle +1 -1
  3. package/android/src/main/java/com/ricoh360/thetaclientreactnative/Converter.kt +34 -0
  4. package/android/src/main/java/com/ricoh360/thetaclientreactnative/ThetaClientSdkModule.kt +311 -9
  5. package/ios/ThetaClientReactNative.mm +552 -67
  6. package/lib/commonjs/capture/capture.js +118 -0
  7. package/lib/commonjs/capture/capture.js.map +1 -0
  8. package/lib/commonjs/capture/index.js +39 -0
  9. package/lib/commonjs/capture/index.js.map +1 -0
  10. package/lib/commonjs/capture/photo-capture.js +64 -0
  11. package/lib/commonjs/capture/photo-capture.js.map +1 -0
  12. package/lib/commonjs/capture/video-capture.js +71 -0
  13. package/lib/commonjs/capture/video-capture.js.map +1 -0
  14. package/lib/commonjs/index.js +40 -1041
  15. package/lib/commonjs/index.js.map +1 -1
  16. package/lib/commonjs/theta-repository/access-point.js +23 -0
  17. package/lib/commonjs/theta-repository/access-point.js.map +1 -0
  18. package/lib/commonjs/theta-repository/index.js +72 -0
  19. package/lib/commonjs/theta-repository/index.js.map +1 -0
  20. package/lib/commonjs/theta-repository/options/index.js +28 -0
  21. package/lib/commonjs/theta-repository/options/index.js.map +1 -0
  22. package/lib/commonjs/theta-repository/options/option-white-balance-auto-strength.js +25 -0
  23. package/lib/commonjs/theta-repository/options/option-white-balance-auto-strength.js.map +1 -0
  24. package/lib/commonjs/theta-repository/options/options.js +462 -0
  25. package/lib/commonjs/theta-repository/options/options.js.map +1 -0
  26. package/lib/commonjs/theta-repository/theta-files.js +23 -0
  27. package/lib/commonjs/theta-repository/theta-files.js.map +1 -0
  28. package/lib/commonjs/theta-repository/theta-info.js +2 -0
  29. package/lib/commonjs/theta-repository/theta-info.js.map +1 -0
  30. package/lib/commonjs/theta-repository/theta-meta.js +2 -0
  31. package/lib/commonjs/theta-repository/theta-meta.js.map +1 -0
  32. package/lib/commonjs/theta-repository/theta-plugin.js +2 -0
  33. package/lib/commonjs/theta-repository/theta-plugin.js.map +1 -0
  34. package/lib/commonjs/theta-repository/theta-repository.js +479 -0
  35. package/lib/commonjs/theta-repository/theta-repository.js.map +1 -0
  36. package/lib/commonjs/theta-repository/theta-state.js +120 -0
  37. package/lib/commonjs/theta-repository/theta-state.js.map +1 -0
  38. package/lib/module/capture/capture.js +111 -0
  39. package/lib/module/capture/capture.js.map +1 -0
  40. package/lib/module/capture/index.js +4 -0
  41. package/lib/module/capture/index.js.map +1 -0
  42. package/lib/module/capture/photo-capture.js +56 -0
  43. package/lib/module/capture/photo-capture.js.map +1 -0
  44. package/lib/module/capture/video-capture.js +63 -0
  45. package/lib/module/capture/video-capture.js.map +1 -0
  46. package/lib/module/index.js +3 -1009
  47. package/lib/module/index.js.map +1 -1
  48. package/lib/module/theta-repository/access-point.js +16 -0
  49. package/lib/module/theta-repository/access-point.js.map +1 -0
  50. package/lib/module/theta-repository/index.js +7 -0
  51. package/lib/module/theta-repository/index.js.map +1 -0
  52. package/lib/module/theta-repository/options/index.js +3 -0
  53. package/lib/module/theta-repository/options/index.js.map +1 -0
  54. package/lib/module/theta-repository/options/option-white-balance-auto-strength.js +18 -0
  55. package/lib/module/theta-repository/options/option-white-balance-auto-strength.js.map +1 -0
  56. package/lib/module/theta-repository/options/options.js +454 -0
  57. package/lib/module/theta-repository/options/options.js.map +1 -0
  58. package/lib/module/theta-repository/theta-files.js +16 -0
  59. package/lib/module/theta-repository/theta-files.js.map +1 -0
  60. package/lib/module/theta-repository/theta-info.js +2 -0
  61. package/lib/module/theta-repository/theta-info.js.map +1 -0
  62. package/lib/module/theta-repository/theta-meta.js +2 -0
  63. package/lib/module/theta-repository/theta-meta.js.map +1 -0
  64. package/lib/module/theta-repository/theta-plugin.js +2 -0
  65. package/lib/module/theta-repository/theta-plugin.js.map +1 -0
  66. package/lib/module/theta-repository/theta-repository.js +437 -0
  67. package/lib/module/theta-repository/theta-repository.js.map +1 -0
  68. package/lib/module/theta-repository/theta-state.js +113 -0
  69. package/lib/module/theta-repository/theta-state.js.map +1 -0
  70. package/lib/typescript/capture/capture.d.ts +71 -0
  71. package/lib/typescript/capture/capture.d.ts.map +1 -0
  72. package/lib/typescript/capture/index.d.ts +4 -0
  73. package/lib/typescript/capture/index.d.ts.map +1 -0
  74. package/lib/typescript/capture/photo-capture.d.ts +38 -0
  75. package/lib/typescript/capture/photo-capture.d.ts.map +1 -0
  76. package/lib/typescript/capture/video-capture.d.ts +43 -0
  77. package/lib/typescript/capture/video-capture.d.ts.map +1 -0
  78. package/lib/typescript/index.d.ts +3 -972
  79. package/lib/typescript/index.d.ts.map +1 -1
  80. package/lib/typescript/theta-repository/access-point.d.ts +33 -0
  81. package/lib/typescript/theta-repository/access-point.d.ts.map +1 -0
  82. package/lib/typescript/theta-repository/index.d.ts +7 -0
  83. package/lib/typescript/theta-repository/index.d.ts.map +1 -0
  84. package/lib/typescript/theta-repository/options/index.d.ts +3 -0
  85. package/lib/typescript/theta-repository/options/index.d.ts.map +1 -0
  86. package/lib/typescript/theta-repository/options/option-white-balance-auto-strength.d.ts +18 -0
  87. package/lib/typescript/theta-repository/options/option-white-balance-auto-strength.d.ts.map +1 -0
  88. package/lib/typescript/theta-repository/options/options.d.ts +499 -0
  89. package/lib/typescript/theta-repository/options/options.d.ts.map +1 -0
  90. package/lib/typescript/theta-repository/theta-files.d.ts +32 -0
  91. package/lib/typescript/theta-repository/theta-files.d.ts.map +1 -0
  92. package/lib/typescript/theta-repository/theta-info.d.ts +34 -0
  93. package/lib/typescript/theta-repository/theta-info.d.ts.map +1 -0
  94. package/lib/typescript/theta-repository/theta-meta.d.ts +38 -0
  95. package/lib/typescript/theta-repository/theta-meta.d.ts.map +1 -0
  96. package/lib/typescript/theta-repository/theta-plugin.d.ts +26 -0
  97. package/lib/typescript/theta-repository/theta-plugin.d.ts.map +1 -0
  98. package/lib/typescript/theta-repository/theta-repository.d.ts +312 -0
  99. package/lib/typescript/theta-repository/theta-repository.d.ts.map +1 -0
  100. package/lib/typescript/theta-repository/theta-state.d.ts +150 -0
  101. package/lib/typescript/theta-repository/theta-state.d.ts.map +1 -0
  102. package/package.json +1 -1
  103. package/src/capture/capture.ts +124 -0
  104. package/src/capture/index.ts +3 -0
  105. package/src/capture/photo-capture.ts +62 -0
  106. package/src/capture/video-capture.ts +69 -0
  107. package/src/index.tsx +3 -1243
  108. package/src/theta-repository/access-point.ts +34 -0
  109. package/src/theta-repository/index.ts +6 -0
  110. package/src/theta-repository/options/index.ts +2 -0
  111. package/src/theta-repository/options/option-white-balance-auto-strength.ts +19 -0
  112. package/src/theta-repository/options/options.ts +554 -0
  113. package/src/theta-repository/theta-files.ts +34 -0
  114. package/src/theta-repository/theta-info.ts +35 -0
  115. package/src/theta-repository/theta-meta.ts +39 -0
  116. package/src/theta-repository/theta-plugin.ts +25 -0
  117. package/src/theta-repository/theta-repository.ts +476 -0
  118. package/src/theta-repository/theta-state.ts +164 -0
  119. package/theta-client-react-native.podspec +1 -1
@@ -0,0 +1,118 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.CaptureBuilder = void 0;
7
+ /**
8
+ * Capture Builder class
9
+ */
10
+ class CaptureBuilder {
11
+ /** capture options */
12
+
13
+ /** construct capture builder instance */
14
+ constructor() {
15
+ this.options = {};
16
+ }
17
+
18
+ /**
19
+ * Set aperture value.
20
+ * @param {ApertureEnum} aperture aperture value to set
21
+ * @return CaptureBuilder
22
+ */
23
+ setAperture(aperture) {
24
+ this.options.aperture = aperture;
25
+ return this;
26
+ }
27
+
28
+ /**
29
+ * Set color temperature of the camera (Kelvin).
30
+ * @param {number} kelvin Color temperature to set
31
+ * @return CaptureBuilder
32
+ */
33
+ setColorTemperature(kelvin) {
34
+ this.options.colorTemperature = kelvin;
35
+ return this;
36
+ }
37
+
38
+ /**
39
+ * Set exposure compensation (EV).
40
+ * @param {ExposureCompensationEnum} value Exposure compensation to set
41
+ * @return CaptureBuilder
42
+ */
43
+ setExposureCompensation(value) {
44
+ this.options.exposureCompensation = value;
45
+ return this;
46
+ }
47
+
48
+ /**
49
+ * Set operating time (sec.) of the self-timer.
50
+ * @param {ExposureDelayEnum} delay Operating time to set
51
+ * @return CaptureBuilder
52
+ */
53
+ setExposureDelay(delay) {
54
+ this.options.exposureDelay = delay;
55
+ return this;
56
+ }
57
+
58
+ /**
59
+ * Set exposure program. The exposure settings that take priority can be selected.
60
+ * @param {ExposureProgramEnum} program Exposure program to set
61
+ * @return CaptureBuilder
62
+ */
63
+ setExposureProgram(program) {
64
+ this.options.exposureProgram = program;
65
+ return this;
66
+ }
67
+ /**
68
+ * Set GPS information.
69
+ * @param {GpsInfo} gpsInfo GPS information to set
70
+ * @return CaptureBuilder
71
+ */
72
+ setGpsInfo(gpsInfo) {
73
+ this.options.gpsInfo = gpsInfo;
74
+ return this;
75
+ }
76
+
77
+ /**
78
+ * Set turns position information assigning ON/OFF.
79
+ * @param {GpsTagRecordingEnum} value Turns position information assigning ON/OFF to set
80
+ * @return CaptureBuilder
81
+ */
82
+ setGpsTagRecording(value) {
83
+ this.options._gpsTagRecording = value;
84
+ return this;
85
+ }
86
+
87
+ /**
88
+ * Set ISO sensitivity.
89
+ * @param {IsoEnum} iso ISO sensitivity to set
90
+ * @return CaptureBuilder
91
+ */
92
+ setIso(iso) {
93
+ this.options.iso = iso;
94
+ return this;
95
+ }
96
+
97
+ /**
98
+ * Set ISO sensitivity upper limit when ISO sensitivity is set to automatic.
99
+ * @param {IsoAutoHighLimitEnum} iso ISO sensitivity upper limit to set
100
+ * @return CaptureBuilder
101
+ */
102
+ setIsoAutoHighLimit(iso) {
103
+ this.options.isoAutoHighLimit = iso;
104
+ return this;
105
+ }
106
+
107
+ /**
108
+ * Set white balance.
109
+ * @param {WhiteBalanceEnum} whiteBalance White balance to set
110
+ * @return CaptureBuilder
111
+ */
112
+ setWhiteBalance(whiteBalance) {
113
+ this.options.whiteBalance = whiteBalance;
114
+ return this;
115
+ }
116
+ }
117
+ exports.CaptureBuilder = CaptureBuilder;
118
+ //# sourceMappingURL=capture.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["CaptureBuilder","constructor","options","setAperture","aperture","setColorTemperature","kelvin","colorTemperature","setExposureCompensation","value","exposureCompensation","setExposureDelay","delay","exposureDelay","setExposureProgram","program","exposureProgram","setGpsInfo","gpsInfo","setGpsTagRecording","_gpsTagRecording","setIso","iso","setIsoAutoHighLimit","isoAutoHighLimit","setWhiteBalance","whiteBalance","exports"],"sourceRoot":"../../../src","sources":["capture/capture.ts"],"mappings":";;;;;;AAaA;AACA;AACA;AACO,MAAeA,cAAc,CAA8B;EAChE;;EAGA;EACAC,WAAWA,CAAA,EAAG;IACZ,IAAI,CAACC,OAAO,GAAG,CAAC,CAAC;EACnB;;EAEA;AACF;AACA;AACA;AACA;EACEC,WAAWA,CAACC,QAAsB,EAAK;IACrC,IAAI,CAACF,OAAO,CAACE,QAAQ,GAAGA,QAAQ;IAChC,OAAO,IAAI;EACb;;EAEA;AACF;AACA;AACA;AACA;EACEC,mBAAmBA,CAACC,MAAc,EAAK;IACrC,IAAI,CAACJ,OAAO,CAACK,gBAAgB,GAAGD,MAAM;IACtC,OAAO,IAAI;EACb;;EAEA;AACF;AACA;AACA;AACA;EACEE,uBAAuBA,CAACC,KAA+B,EAAK;IAC1D,IAAI,CAACP,OAAO,CAACQ,oBAAoB,GAAGD,KAAK;IACzC,OAAO,IAAI;EACb;;EAEA;AACF;AACA;AACA;AACA;EACEE,gBAAgBA,CAACC,KAAwB,EAAK;IAC5C,IAAI,CAACV,OAAO,CAACW,aAAa,GAAGD,KAAK;IAClC,OAAO,IAAI;EACb;;EAEA;AACF;AACA;AACA;AACA;EACEE,kBAAkBA,CAACC,OAA4B,EAAK;IAClD,IAAI,CAACb,OAAO,CAACc,eAAe,GAAGD,OAAO;IACtC,OAAO,IAAI;EACb;EACA;AACF;AACA;AACA;AACA;EACEE,UAAUA,CAACC,OAAgB,EAAK;IAC9B,IAAI,CAAChB,OAAO,CAACgB,OAAO,GAAGA,OAAO;IAC9B,OAAO,IAAI;EACb;;EAEA;AACF;AACA;AACA;AACA;EACEC,kBAAkBA,CAACV,KAA0B,EAAK;IAChD,IAAI,CAACP,OAAO,CAACkB,gBAAgB,GAAGX,KAAK;IACrC,OAAO,IAAI;EACb;;EAEA;AACF;AACA;AACA;AACA;EACEY,MAAMA,CAACC,GAAY,EAAK;IACtB,IAAI,CAACpB,OAAO,CAACoB,GAAG,GAAGA,GAAG;IACtB,OAAO,IAAI;EACb;;EAEA;AACF;AACA;AACA;AACA;EACEC,mBAAmBA,CAACD,GAAyB,EAAK;IAChD,IAAI,CAACpB,OAAO,CAACsB,gBAAgB,GAAGF,GAAG;IACnC,OAAO,IAAI;EACb;;EAEA;AACF;AACA;AACA;AACA;EACEG,eAAeA,CAACC,YAA8B,EAAK;IACjD,IAAI,CAACxB,OAAO,CAACwB,YAAY,GAAGA,YAAY;IACxC,OAAO,IAAI;EACb;AACF;AAACC,OAAA,CAAA3B,cAAA,GAAAA,cAAA"}
@@ -0,0 +1,39 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ var _capture = require("./capture");
7
+ Object.keys(_capture).forEach(function (key) {
8
+ if (key === "default" || key === "__esModule") return;
9
+ if (key in exports && exports[key] === _capture[key]) return;
10
+ Object.defineProperty(exports, key, {
11
+ enumerable: true,
12
+ get: function () {
13
+ return _capture[key];
14
+ }
15
+ });
16
+ });
17
+ var _photoCapture = require("./photo-capture");
18
+ Object.keys(_photoCapture).forEach(function (key) {
19
+ if (key === "default" || key === "__esModule") return;
20
+ if (key in exports && exports[key] === _photoCapture[key]) return;
21
+ Object.defineProperty(exports, key, {
22
+ enumerable: true,
23
+ get: function () {
24
+ return _photoCapture[key];
25
+ }
26
+ });
27
+ });
28
+ var _videoCapture = require("./video-capture");
29
+ Object.keys(_videoCapture).forEach(function (key) {
30
+ if (key === "default" || key === "__esModule") return;
31
+ if (key in exports && exports[key] === _videoCapture[key]) return;
32
+ Object.defineProperty(exports, key, {
33
+ enumerable: true,
34
+ get: function () {
35
+ return _videoCapture[key];
36
+ }
37
+ });
38
+ });
39
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["_capture","require","Object","keys","forEach","key","exports","defineProperty","enumerable","get","_photoCapture","_videoCapture"],"sourceRoot":"../../../src","sources":["capture/index.ts"],"mappings":";;;;;AAAA,IAAAA,QAAA,GAAAC,OAAA;AAAAC,MAAA,CAAAC,IAAA,CAAAH,QAAA,EAAAI,OAAA,WAAAC,GAAA;EAAA,IAAAA,GAAA,kBAAAA,GAAA;EAAA,IAAAA,GAAA,IAAAC,OAAA,IAAAA,OAAA,CAAAD,GAAA,MAAAL,QAAA,CAAAK,GAAA;EAAAH,MAAA,CAAAK,cAAA,CAAAD,OAAA,EAAAD,GAAA;IAAAG,UAAA;IAAAC,GAAA,WAAAA,CAAA;MAAA,OAAAT,QAAA,CAAAK,GAAA;IAAA;EAAA;AAAA;AACA,IAAAK,aAAA,GAAAT,OAAA;AAAAC,MAAA,CAAAC,IAAA,CAAAO,aAAA,EAAAN,OAAA,WAAAC,GAAA;EAAA,IAAAA,GAAA,kBAAAA,GAAA;EAAA,IAAAA,GAAA,IAAAC,OAAA,IAAAA,OAAA,CAAAD,GAAA,MAAAK,aAAA,CAAAL,GAAA;EAAAH,MAAA,CAAAK,cAAA,CAAAD,OAAA,EAAAD,GAAA;IAAAG,UAAA;IAAAC,GAAA,WAAAA,CAAA;MAAA,OAAAC,aAAA,CAAAL,GAAA;IAAA;EAAA;AAAA;AACA,IAAAM,aAAA,GAAAV,OAAA;AAAAC,MAAA,CAAAC,IAAA,CAAAQ,aAAA,EAAAP,OAAA,WAAAC,GAAA;EAAA,IAAAA,GAAA,kBAAAA,GAAA;EAAA,IAAAA,GAAA,IAAAC,OAAA,IAAAA,OAAA,CAAAD,GAAA,MAAAM,aAAA,CAAAN,GAAA;EAAAH,MAAA,CAAAK,cAAA,CAAAD,OAAA,EAAAD,GAAA;IAAAG,UAAA;IAAAC,GAAA,WAAAA,CAAA;MAAA,OAAAE,aAAA,CAAAN,GAAA;IAAA;EAAA;AAAA"}
@@ -0,0 +1,64 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.PhotoCaptureBuilder = exports.PhotoCapture = void 0;
7
+ var _capture = require("./capture");
8
+ var _reactNative = require("react-native");
9
+ const ThetaClientReactNative = _reactNative.NativeModules.ThetaClientReactNative;
10
+
11
+ /**
12
+ * PhotoCapture class
13
+ */
14
+ class PhotoCapture {
15
+ /**
16
+ * @return promise of token file url
17
+ */
18
+ takePicture() {
19
+ return ThetaClientReactNative.takePicture();
20
+ }
21
+ }
22
+
23
+ /**
24
+ * PhotoCaptureBaseBuilder class
25
+ */
26
+ exports.PhotoCapture = PhotoCapture;
27
+ class PhotoCaptureBuilder extends _capture.CaptureBuilder {
28
+ /** construct PhotoCaptureBuilder instance */
29
+ constructor() {
30
+ super();
31
+ }
32
+
33
+ /**
34
+ * Set photo file format.
35
+ * @param {PhotoFileFormatEnum} fileFormat Photo file format to set
36
+ * @return PhotoCaptureBuilder
37
+ */
38
+ setFileFormat(fileFormat) {
39
+ this.options.fileFormat = fileFormat;
40
+ return this;
41
+ }
42
+
43
+ /**
44
+ * Set image processing filter.
45
+ * @param {FilterEnum} filter Image processing filter to set
46
+ * @return PhotoCaptureBuilder
47
+ */
48
+ setFilter(filter) {
49
+ this.options.filter = filter;
50
+ return this;
51
+ }
52
+
53
+ /**
54
+ * Builds an instance of a PhotoCapture that has all the combined
55
+ * parameters of the Options that have been added to the Builder.
56
+ *
57
+ * @return promise of PhotoCapture instance
58
+ */
59
+ build() {
60
+ return ThetaClientReactNative.buildPhotoCapture(this.options).then(() => new PhotoCapture());
61
+ }
62
+ }
63
+ exports.PhotoCaptureBuilder = PhotoCaptureBuilder;
64
+ //# sourceMappingURL=photo-capture.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["_capture","require","_reactNative","ThetaClientReactNative","NativeModules","PhotoCapture","takePicture","exports","PhotoCaptureBuilder","CaptureBuilder","constructor","setFileFormat","fileFormat","options","setFilter","filter","build","buildPhotoCapture","then"],"sourceRoot":"../../../src","sources":["capture/photo-capture.ts"],"mappings":";;;;;;AAAA,IAAAA,QAAA,GAAAC,OAAA;AAMA,IAAAC,YAAA,GAAAD,OAAA;AACA,MAAME,sBAAsB,GAAGC,0BAAa,CAACD,sBAAsB;;AAEnE;AACA;AACA;AACO,MAAME,YAAY,CAAC;EACxB;AACF;AACA;EACEC,WAAWA,CAAA,EAAoB;IAC7B,OAAOH,sBAAsB,CAACG,WAAW,EAAE;EAC7C;AACF;;AAEA;AACA;AACA;AAFAC,OAAA,CAAAF,YAAA,GAAAA,YAAA;AAGO,MAAMG,mBAAmB,SAASC,uBAAc,CAAsB;EAC3E;EACAC,WAAWA,CAAA,EAAG;IACZ,KAAK,EAAE;EACT;;EAEA;AACF;AACA;AACA;AACA;EACEC,aAAaA,CAACC,UAA+B,EAAuB;IAClE,IAAI,CAACC,OAAO,CAACD,UAAU,GAAGA,UAAU;IACpC,OAAO,IAAI;EACb;;EAEA;AACF;AACA;AACA;AACA;EACEE,SAASA,CAACC,MAAkB,EAAuB;IACjD,IAAI,CAACF,OAAO,CAACE,MAAM,GAAGA,MAAM;IAC5B,OAAO,IAAI;EACb;;EAEA;AACF;AACA;AACA;AACA;AACA;EACEC,KAAKA,CAAA,EAA0B;IAC7B,OAAOb,sBAAsB,CAACc,iBAAiB,CAAC,IAAI,CAACJ,OAAO,CAAC,CAACK,IAAI,CAChE,MAAM,IAAIb,YAAY,EAAE,CACzB;EACH;AACF;AAACE,OAAA,CAAAC,mBAAA,GAAAA,mBAAA"}
@@ -0,0 +1,71 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.VideoCaptureBuilder = exports.VideoCapture = void 0;
7
+ var _capture = require("./capture");
8
+ var _reactNative = require("react-native");
9
+ const ThetaClientReactNative = _reactNative.NativeModules.ThetaClientReactNative;
10
+
11
+ /**
12
+ * VideoCapture class
13
+ */
14
+ class VideoCapture {
15
+ /**
16
+ * start video capture
17
+ * @return promise of captured file url
18
+ */
19
+ startCapture() {
20
+ return ThetaClientReactNative.startCapture();
21
+ }
22
+ /**
23
+ * stop video capture
24
+ */
25
+ stopCapture() {
26
+ ThetaClientReactNative.stopCapture();
27
+ }
28
+ }
29
+
30
+ /**
31
+ * VideoCaptureBuilder class
32
+ */
33
+ exports.VideoCapture = VideoCapture;
34
+ class VideoCaptureBuilder extends _capture.CaptureBuilder {
35
+ /** construct VideoCaptureBuilder instance */
36
+ constructor() {
37
+ super();
38
+ }
39
+
40
+ /**
41
+ * Set video file format.
42
+ * @param {VideoFileFormatEnum} fileFormat Video file format to set
43
+ * @return VideoCaptureBuilder
44
+ */
45
+ setFileFormat(fileFormat) {
46
+ this.options.fileFormat = fileFormat;
47
+ return this;
48
+ }
49
+
50
+ /**
51
+ * Set maximum recordable time (in seconds) of the camera.
52
+ * @param {MaxRecordableTimeEnum} time Maximum recordable time to set
53
+ * @return VideoCaptureBuilder
54
+ */
55
+ setMaxRecordableTime(time) {
56
+ this.options.maxRecordableTime = time;
57
+ return this;
58
+ }
59
+
60
+ /**
61
+ * Builds an instance of a VideoCapture that has all the combined
62
+ * parameters of the Options that have been added to the Builder.
63
+ *
64
+ * @return promise of VideoCapture instance
65
+ */
66
+ build() {
67
+ return ThetaClientReactNative.buildVideoCapture(this.options).then(() => new VideoCapture());
68
+ }
69
+ }
70
+ exports.VideoCaptureBuilder = VideoCaptureBuilder;
71
+ //# sourceMappingURL=video-capture.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["_capture","require","_reactNative","ThetaClientReactNative","NativeModules","VideoCapture","startCapture","stopCapture","exports","VideoCaptureBuilder","CaptureBuilder","constructor","setFileFormat","fileFormat","options","setMaxRecordableTime","time","maxRecordableTime","build","buildVideoCapture","then"],"sourceRoot":"../../../src","sources":["capture/video-capture.ts"],"mappings":";;;;;;AAAA,IAAAA,QAAA,GAAAC,OAAA;AAMA,IAAAC,YAAA,GAAAD,OAAA;AACA,MAAME,sBAAsB,GAAGC,0BAAa,CAACD,sBAAsB;;AAEnE;AACA;AACA;AACO,MAAME,YAAY,CAAC;EACxB;AACF;AACA;AACA;EACEC,YAAYA,CAAA,EAAoB;IAC9B,OAAOH,sBAAsB,CAACG,YAAY,EAAE;EAC9C;EACA;AACF;AACA;EACEC,WAAWA,CAAA,EAAG;IACZJ,sBAAsB,CAACI,WAAW,EAAE;EACtC;AACF;;AAEA;AACA;AACA;AAFAC,OAAA,CAAAH,YAAA,GAAAA,YAAA;AAGO,MAAMI,mBAAmB,SAASC,uBAAc,CAAsB;EAC3E;EACAC,WAAWA,CAAA,EAAG;IACZ,KAAK,EAAE;EACT;;EAEA;AACF;AACA;AACA;AACA;EACEC,aAAaA,CAACC,UAA+B,EAAuB;IAClE,IAAI,CAACC,OAAO,CAACD,UAAU,GAAGA,UAAU;IACpC,OAAO,IAAI;EACb;;EAEA;AACF;AACA;AACA;AACA;EACEE,oBAAoBA,CAACC,IAA2B,EAAuB;IACrE,IAAI,CAACF,OAAO,CAACG,iBAAiB,GAAGD,IAAI;IACrC,OAAO,IAAI;EACb;;EAEA;AACF;AACA;AACA;AACA;AACA;EACEE,KAAKA,CAAA,EAA0B;IAC7B,OAAOf,sBAAsB,CAACgB,iBAAiB,CAAC,IAAI,CAACL,OAAO,CAAC,CAACM,IAAI,CAChE,MAAM,IAAIf,YAAY,EAAE,CACzB;EACH;AACF;AAACG,OAAA,CAAAC,mBAAA,GAAAA,mBAAA"}