theta-client-react-native 1.13.1 → 1.14.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 (136) hide show
  1. package/README.ja.md +7 -0
  2. package/README.md +7 -0
  3. package/android/build.gradle +14 -86
  4. package/android/gradle.properties +3 -4
  5. package/android/src/main/java/com/ricoh360/thetaclientreactnative/Converter.kt +2 -0
  6. package/android/src/main/java/com/ricoh360/thetaclientreactnative/ThetaClientSdkModule.kt +205 -116
  7. package/android/src/main/java/com/ricoh360/thetaclientreactnative/ThetaClientSdkPackage.kt +22 -8
  8. package/ios/ConvertUtil.swift +5 -0
  9. package/ios/ThetaClientReactNative.mm +37 -0
  10. package/ios/ThetaClientReactNative.swift +126 -143
  11. package/lib/commonjs/NativeThetaClientReactNative.js +34 -0
  12. package/lib/commonjs/NativeThetaClientReactNative.js.map +1 -0
  13. package/lib/commonjs/capture/burst-capture.js +6 -6
  14. package/lib/commonjs/capture/burst-capture.js.map +1 -1
  15. package/lib/commonjs/capture/composite-interval-capture.js +6 -6
  16. package/lib/commonjs/capture/composite-interval-capture.js.map +1 -1
  17. package/lib/commonjs/capture/continuous-capture.js +5 -5
  18. package/lib/commonjs/capture/continuous-capture.js.map +1 -1
  19. package/lib/commonjs/capture/limitless-interval-capture.js +6 -6
  20. package/lib/commonjs/capture/limitless-interval-capture.js.map +1 -1
  21. package/lib/commonjs/capture/multi-bracket-capture.js +6 -6
  22. package/lib/commonjs/capture/multi-bracket-capture.js.map +1 -1
  23. package/lib/commonjs/capture/photo-capture.js +5 -5
  24. package/lib/commonjs/capture/photo-capture.js.map +1 -1
  25. package/lib/commonjs/capture/shot-count-specified-interval-capture.js +6 -6
  26. package/lib/commonjs/capture/shot-count-specified-interval-capture.js.map +1 -1
  27. package/lib/commonjs/capture/time-shift-capture.js +6 -6
  28. package/lib/commonjs/capture/time-shift-capture.js.map +1 -1
  29. package/lib/commonjs/capture/time-shift-manual-capture.js +7 -7
  30. package/lib/commonjs/capture/time-shift-manual-capture.js.map +1 -1
  31. package/lib/commonjs/capture/video-capture.js +6 -6
  32. package/lib/commonjs/capture/video-capture.js.map +1 -1
  33. package/lib/commonjs/index.js +12 -12
  34. package/lib/commonjs/index.js.map +1 -1
  35. package/lib/commonjs/theta-repository/event-websocket.js +4 -4
  36. package/lib/commonjs/theta-repository/event-websocket.js.map +1 -1
  37. package/lib/commonjs/theta-repository/libs/convert-video-formats.js +3 -3
  38. package/lib/commonjs/theta-repository/libs/convert-video-formats.js.map +1 -1
  39. package/lib/commonjs/theta-repository/notify-controller.js +3 -1
  40. package/lib/commonjs/theta-repository/notify-controller.js.map +1 -1
  41. package/lib/commonjs/theta-repository/options/index.js +11 -0
  42. package/lib/commonjs/theta-repository/options/index.js.map +1 -1
  43. package/lib/commonjs/theta-repository/options/option-mode-memory.js +33 -0
  44. package/lib/commonjs/theta-repository/options/option-mode-memory.js.map +1 -0
  45. package/lib/commonjs/theta-repository/options/options.js +2 -0
  46. package/lib/commonjs/theta-repository/options/options.js.map +1 -1
  47. package/lib/commonjs/theta-repository/theta-repository.js +54 -64
  48. package/lib/commonjs/theta-repository/theta-repository.js.map +1 -1
  49. package/lib/module/NativeThetaClientReactNative.js +28 -0
  50. package/lib/module/NativeThetaClientReactNative.js.map +1 -0
  51. package/lib/module/capture/burst-capture.js +1 -2
  52. package/lib/module/capture/burst-capture.js.map +1 -1
  53. package/lib/module/capture/composite-interval-capture.js +1 -2
  54. package/lib/module/capture/composite-interval-capture.js.map +1 -1
  55. package/lib/module/capture/continuous-capture.js +1 -2
  56. package/lib/module/capture/continuous-capture.js.map +1 -1
  57. package/lib/module/capture/limitless-interval-capture.js +1 -2
  58. package/lib/module/capture/limitless-interval-capture.js.map +1 -1
  59. package/lib/module/capture/multi-bracket-capture.js +1 -2
  60. package/lib/module/capture/multi-bracket-capture.js.map +1 -1
  61. package/lib/module/capture/photo-capture.js +1 -2
  62. package/lib/module/capture/photo-capture.js.map +1 -1
  63. package/lib/module/capture/shot-count-specified-interval-capture.js +1 -2
  64. package/lib/module/capture/shot-count-specified-interval-capture.js.map +1 -1
  65. package/lib/module/capture/time-shift-capture.js +1 -2
  66. package/lib/module/capture/time-shift-capture.js.map +1 -1
  67. package/lib/module/capture/time-shift-manual-capture.js +1 -2
  68. package/lib/module/capture/time-shift-manual-capture.js.map +1 -1
  69. package/lib/module/capture/video-capture.js +1 -2
  70. package/lib/module/capture/video-capture.js.map +1 -1
  71. package/lib/module/index.js +11 -12
  72. package/lib/module/index.js.map +1 -1
  73. package/lib/module/theta-repository/event-websocket.js +1 -2
  74. package/lib/module/theta-repository/event-websocket.js.map +1 -1
  75. package/lib/module/theta-repository/libs/convert-video-formats.js +1 -2
  76. package/lib/module/theta-repository/libs/convert-video-formats.js.map +1 -1
  77. package/lib/module/theta-repository/notify-controller.js +3 -2
  78. package/lib/module/theta-repository/notify-controller.js.map +1 -1
  79. package/lib/module/theta-repository/options/index.js +1 -0
  80. package/lib/module/theta-repository/options/index.js.map +1 -1
  81. package/lib/module/theta-repository/options/option-mode-memory.js +27 -0
  82. package/lib/module/theta-repository/options/option-mode-memory.js.map +1 -0
  83. package/lib/module/theta-repository/options/options.js +2 -0
  84. package/lib/module/theta-repository/options/options.js.map +1 -1
  85. package/lib/module/theta-repository/theta-repository.js +15 -26
  86. package/lib/module/theta-repository/theta-repository.js.map +1 -1
  87. package/lib/typescript/NativeThetaClientReactNative.d.ts +91 -0
  88. package/lib/typescript/NativeThetaClientReactNative.d.ts.map +1 -0
  89. package/lib/typescript/capture/burst-capture.d.ts.map +1 -1
  90. package/lib/typescript/capture/composite-interval-capture.d.ts.map +1 -1
  91. package/lib/typescript/capture/continuous-capture.d.ts +2 -1
  92. package/lib/typescript/capture/continuous-capture.d.ts.map +1 -1
  93. package/lib/typescript/capture/limitless-interval-capture.d.ts.map +1 -1
  94. package/lib/typescript/capture/multi-bracket-capture.d.ts.map +1 -1
  95. package/lib/typescript/capture/photo-capture.d.ts.map +1 -1
  96. package/lib/typescript/capture/shot-count-specified-interval-capture.d.ts.map +1 -1
  97. package/lib/typescript/capture/time-shift-capture.d.ts.map +1 -1
  98. package/lib/typescript/capture/time-shift-manual-capture.d.ts.map +1 -1
  99. package/lib/typescript/capture/video-capture.d.ts.map +1 -1
  100. package/lib/typescript/index.d.ts +6 -2
  101. package/lib/typescript/index.d.ts.map +1 -1
  102. package/lib/typescript/theta-repository/event-websocket.d.ts.map +1 -1
  103. package/lib/typescript/theta-repository/notify-controller.d.ts +2 -1
  104. package/lib/typescript/theta-repository/notify-controller.d.ts.map +1 -1
  105. package/lib/typescript/theta-repository/options/index.d.ts +1 -0
  106. package/lib/typescript/theta-repository/options/index.d.ts.map +1 -1
  107. package/lib/typescript/theta-repository/options/option-mode-memory.d.ts +27 -0
  108. package/lib/typescript/theta-repository/options/option-mode-memory.d.ts.map +1 -0
  109. package/lib/typescript/theta-repository/options/options.d.ts +5 -0
  110. package/lib/typescript/theta-repository/options/options.d.ts.map +1 -1
  111. package/lib/typescript/theta-repository/theta-repository.d.ts +6 -6
  112. package/lib/typescript/theta-repository/theta-repository.d.ts.map +1 -1
  113. package/package.json +35 -27
  114. package/src/NativeThetaClientReactNative.ts +199 -0
  115. package/src/capture/burst-capture.ts +3 -6
  116. package/src/capture/capture.ts +1 -1
  117. package/src/capture/composite-interval-capture.ts +3 -6
  118. package/src/capture/continuous-capture.ts +4 -7
  119. package/src/capture/limitless-interval-capture.ts +3 -6
  120. package/src/capture/multi-bracket-capture.ts +3 -6
  121. package/src/capture/photo-capture.ts +3 -6
  122. package/src/capture/shot-count-specified-interval-capture.ts +3 -6
  123. package/src/capture/time-shift-capture.ts +3 -6
  124. package/src/capture/time-shift-manual-capture.ts +3 -6
  125. package/src/capture/video-capture.ts +3 -6
  126. package/src/index.tsx +12 -19
  127. package/src/theta-repository/event-websocket.ts +1 -3
  128. package/src/theta-repository/libs/convert-video-formats.ts +3 -3
  129. package/src/theta-repository/notify-controller.ts +4 -8
  130. package/src/theta-repository/options/index.ts +1 -0
  131. package/src/theta-repository/options/option-mode-memory.ts +28 -0
  132. package/src/theta-repository/options/options.ts +5 -0
  133. package/src/theta-repository/theta-repository.ts +28 -36
  134. package/theta-client-react-native.podspec +4 -19
  135. package/ios/ThetaClientReactNative.m +0 -308
  136. package/ios/ThetaClientReactNative.xcodeproj/project.pbxproj +0 -283
package/README.ja.md CHANGED
@@ -1,5 +1,12 @@
1
1
  ## React Native プロジェクト作成手順
2
2
 
3
+ ### 互換性
4
+
5
+ | バージョン | React Native | Legacy Architecture | New Architecture |
6
+ |------------|------------|---------------------|------------------|
7
+ | 1.14.0 以降 | 0.78.2 | 非対応 | 対応 |
8
+ | 1.13.1 以前 | 0.71.19 | 対応 | 非対応 |
9
+
3
10
  ### 事前準備
4
11
 
5
12
  * theta-client がビルド済み
package/README.md CHANGED
@@ -1,5 +1,12 @@
1
1
  ## How to create React Native project
2
2
 
3
+ ### Compatibility
4
+
5
+ | Version | React Native | Legacy Architecture | New Architecture |
6
+ |------------|------------|---------------------|------------------|
7
+ | 1.14.0 or later | 0.78.2 | Not supported | Supported |
8
+ | 1.13.1 or earlier | 0.71.19 | Supported | Not supported |
9
+
3
10
  ### Prerequisite
4
11
 
5
12
  * Build theta-client.
@@ -8,22 +8,16 @@ buildscript {
8
8
  }
9
9
 
10
10
  dependencies {
11
- classpath 'com.android.tools.build:gradle:7.3.1'
11
+ classpath 'com.android.tools.build:gradle:8.7.3'
12
12
  // noinspection DifferentKotlinGradleVersion
13
13
  classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
14
14
  }
15
15
  }
16
16
 
17
- def isNewArchitectureEnabled() {
18
- return rootProject.hasProperty("newArchEnabled") && rootProject.getProperty("newArchEnabled") == "true"
19
- }
20
-
21
17
  apply plugin: 'com.android.library'
22
18
  apply plugin: 'kotlin-android'
23
19
 
24
- if (isNewArchitectureEnabled()) {
25
- apply plugin: 'com.facebook.react'
26
- }
20
+ apply plugin: 'com.facebook.react'
27
21
 
28
22
  def getExtOrDefault(name) {
29
23
  return rootProject.ext.has(name) ? rootProject.ext.get(name) : project.properties['ThetaClientReactNative_' + name]
@@ -40,7 +34,6 @@ android {
40
34
  defaultConfig {
41
35
  minSdkVersion getExtOrIntegerDefault('minSdkVersion')
42
36
  targetSdkVersion getExtOrIntegerDefault('targetSdkVersion')
43
- buildConfigField "boolean", "IS_NEW_ARCHITECTURE_ENABLED", isNewArchitectureEnabled().toString()
44
37
  }
45
38
  buildTypes {
46
39
  release {
@@ -53,8 +46,12 @@ android {
53
46
  }
54
47
 
55
48
  compileOptions {
56
- sourceCompatibility JavaVersion.VERSION_1_8
57
- targetCompatibility JavaVersion.VERSION_1_8
49
+ sourceCompatibility JavaVersion.VERSION_17
50
+ targetCompatibility JavaVersion.VERSION_17
51
+ }
52
+
53
+ kotlinOptions {
54
+ jvmTarget = "17"
58
55
  }
59
56
 
60
57
  }
@@ -62,89 +59,20 @@ android {
62
59
  repositories {
63
60
  mavenCentral()
64
61
  google()
65
-
66
- def found = false
67
- def defaultDir = null
68
- def androidSourcesName = 'React Native sources'
69
-
70
- if (rootProject.ext.has('reactNativeAndroidRoot')) {
71
- defaultDir = rootProject.ext.get('reactNativeAndroidRoot')
72
- } else {
73
- defaultDir = new File(
74
- projectDir,
75
- '/../../../node_modules/react-native/android'
76
- )
77
- }
78
-
79
- if (defaultDir.exists()) {
80
- maven {
81
- url defaultDir.toString()
82
- name androidSourcesName
83
- }
84
-
85
- logger.info(":${project.name}:reactNativeAndroidRoot ${defaultDir.canonicalPath}")
86
- found = true
87
- } else {
88
- def parentDir = rootProject.projectDir
89
-
90
- 1.upto(5, {
91
- if (found) return true
92
- parentDir = parentDir.parentFile
93
-
94
- def androidSourcesDir = new File(
95
- parentDir,
96
- 'node_modules/react-native'
97
- )
98
-
99
- def androidPrebuiltBinaryDir = new File(
100
- parentDir,
101
- 'node_modules/react-native/android'
102
- )
103
-
104
- if (androidPrebuiltBinaryDir.exists()) {
105
- maven {
106
- url androidPrebuiltBinaryDir.toString()
107
- name androidSourcesName
108
- }
109
-
110
- logger.info(":${project.name}:reactNativeAndroidRoot ${androidPrebuiltBinaryDir.canonicalPath}")
111
- found = true
112
- } else if (androidSourcesDir.exists()) {
113
- maven {
114
- url androidSourcesDir.toString()
115
- name androidSourcesName
116
- }
117
-
118
- logger.info(":${project.name}:reactNativeAndroidRoot ${androidSourcesDir.canonicalPath}")
119
- found = true
120
- }
121
- })
122
- }
123
-
124
- if (!found) {
125
- throw new GradleException(
126
- "${project.name}: unable to locate React Native android sources. " +
127
- "Ensure you have you installed React Native as a dependency in your project and try again."
128
- )
129
- }
130
62
  }
131
63
 
132
64
  def kotlin_version = getExtOrDefault('kotlinVersion')
133
65
 
134
66
  dependencies {
135
- //noinspection GradleDynamicVersion
67
+ // noinspection GradleDynamicVersion
136
68
  implementation "com.facebook.react:react-native:+"
137
69
  implementation "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"
138
70
  implementation "org.jetbrains.kotlinx:kotlinx-coroutines-core:1.7.3"
139
- implementation "com.ricoh360.thetaclient:theta-client:1.13.1"
140
-
141
- // From node_modules
71
+ implementation "com.ricoh360.thetaclient:theta-client:1.14.0"
142
72
  }
143
73
 
144
- if (isNewArchitectureEnabled()) {
145
- react {
146
- jsRootDir = file("../src/")
147
- libraryName = "ThetaClientReactNative"
148
- codegenJavaPackageName = "com.ricoh360.thetaclientreactnative"
149
- }
74
+ react {
75
+ jsRootDir = file("../src/")
76
+ libraryName = "ThetaClientReactNative"
77
+ codegenJavaPackageName = "com.ricoh360.thetaclientreactnative"
150
78
  }
@@ -1,5 +1,4 @@
1
- ThetaClientReactNative_kotlinVersion=1.7.20
1
+ ThetaClientReactNative_kotlinVersion=2.0.21
2
2
  ThetaClientReactNative_minSdkVersion=26
3
- ThetaClientReactNative_targetSdkVersion=31
4
- ThetaClientReactNative_compileSdkVersion=31
5
- ThetaClientReactNative_ndkversion=21.4.7075529
3
+ ThetaClientReactNative_targetSdkVersion=35
4
+ ThetaClientReactNative_compileSdkVersion=35
@@ -105,6 +105,7 @@ val optionItemNameToEnum: Map<String, OptionNameEnum> = mutableMapOf(
105
105
  "latestEnabledExposureDelayTime" to OptionNameEnum.LatestEnabledExposureDelayTime,
106
106
  "maxRecordableTime" to OptionNameEnum.MaxRecordableTime,
107
107
  "microphoneNoiseReduction" to OptionNameEnum.MicrophoneNoiseReduction,
108
+ "modeMemory" to OptionNameEnum.ModeMemory,
108
109
  "mobileNetworkSetting" to OptionNameEnum.MobileNetworkSetting,
109
110
  "networkType" to OptionNameEnum.NetworkType,
110
111
  "offDelay" to OptionNameEnum.OffDelay,
@@ -1152,6 +1153,7 @@ fun getOptionValueEnum(name: OptionNameEnum, valueName: String): Any? {
1152
1153
  OptionNameEnum.LatestEnabledExposureDelayTime -> ExposureDelayEnum.values().find { it.name == valueName }
1153
1154
  OptionNameEnum.MaxRecordableTime -> MaxRecordableTimeEnum.values().find { it.name == valueName }
1154
1155
  OptionNameEnum.MicrophoneNoiseReduction -> MicrophoneNoiseReductionEnum.values().find { it.name == valueName }
1156
+ OptionNameEnum.ModeMemory -> ModeMemoryEnum.values().find { it.name == valueName }
1155
1157
  OptionNameEnum.NetworkType -> NetworkTypeEnum.values().find { it.name == valueName }
1156
1158
  OptionNameEnum.OffDelay -> OffDelayEnum.values().find { it.name == valueName }
1157
1159
  OptionNameEnum.OffDelayUsb -> OffDelayUsbEnum.entries.find { it.name == valueName }