@stream-io/video-react-native-sdk 0.0.1-alpha.384 → 0.0.1-alpha.386

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 (25) hide show
  1. package/CHANGELOG.md +8 -0
  2. package/android/build.gradle +135 -0
  3. package/android/gradle/wrapper/gradle-wrapper.jar +0 -0
  4. package/android/gradle/wrapper/gradle-wrapper.properties +5 -0
  5. package/android/gradle.properties +3 -0
  6. package/android/gradlew +234 -0
  7. package/android/gradlew.bat +89 -0
  8. package/android/src/main/AndroidManifest.xml +5 -0
  9. package/android/src/main/java/com/streamvideo/reactnative/StreamVideoReactNative.kt +16 -0
  10. package/android/src/main/java/com/streamvideo/reactnative/StreamVideoReactNativeModule.kt +11 -0
  11. package/android/src/main/java/com/streamvideo/reactnative/StreamVideoReactNativePackage.kt +17 -0
  12. package/android/src/main/java/com/streamvideo/reactnative/video/SimulcastVideoEncoderFactoryWrapper.kt +249 -0
  13. package/android/src/main/java/com/streamvideo/reactnative/video/WrappedVideoDecoderFactoryProxy.kt +19 -0
  14. package/dist/src/providers/StreamCall.d.ts +7 -0
  15. package/dist/src/providers/StreamCall.js.map +1 -1
  16. package/dist/version.d.ts +1 -1
  17. package/dist/version.js +1 -1
  18. package/ios/StreamVideoReactNative-Bridging-Header.h +2 -0
  19. package/ios/StreamVideoReactNative.h +5 -0
  20. package/ios/StreamVideoReactNative.m +19 -0
  21. package/ios/StreamVideoReactNative.xcodeproj/project.pbxproj +274 -0
  22. package/ios/StreamVideoReactNative.xcodeproj/project.xcworkspace/contents.xcworkspacedata +7 -0
  23. package/ios/StreamVideoReactNative.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist +8 -0
  24. package/package.json +5 -3
  25. package/src/providers/StreamCall.tsx +7 -1
package/CHANGELOG.md CHANGED
@@ -2,6 +2,14 @@
2
2
 
3
3
  This file was generated using [@jscutlery/semver](https://github.com/jscutlery/semver).
4
4
 
5
+ ## [0.0.1-alpha.386](https://github.com/GetStream/stream-video-js/compare/@stream-io/video-react-native-sdk-0.0.1-alpha.385...@stream-io/video-react-native-sdk-0.0.1-alpha.386) (2023-08-24)
6
+
7
+
8
+
9
+ ## [0.0.1-alpha.385](https://github.com/GetStream/stream-video-js/compare/@stream-io/video-react-native-sdk-0.0.1-alpha.384...@stream-io/video-react-native-sdk-0.0.1-alpha.385) (2023-08-24)
10
+
11
+
12
+
5
13
  ## [0.0.1-alpha.384](https://github.com/GetStream/stream-video-js/compare/@stream-io/video-react-native-sdk-0.0.1-alpha.383...@stream-io/video-react-native-sdk-0.0.1-alpha.384) (2023-08-24)
6
14
 
7
15
 
@@ -0,0 +1,135 @@
1
+ buildscript {
2
+ // Buildscript is evaluated before everything else so we can't use getExtOrDefault
3
+ def kotlin_version = rootProject.ext.has('kotlinVersion') ? rootProject.ext.get('kotlinVersion') : project.properties['StreamVideoReactNative_kotlinVersion']
4
+
5
+ repositories {
6
+ google()
7
+ mavenCentral()
8
+ jcenter()
9
+ }
10
+
11
+ dependencies {
12
+ classpath("com.android.tools.build:gradle:7.3.1")
13
+ // noinspection DifferentKotlinGradleVersion
14
+ classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
15
+ }
16
+ }
17
+
18
+ apply plugin: 'com.android.library'
19
+ apply plugin: 'kotlin-android'
20
+
21
+ def getExtOrDefault(name) {
22
+ return rootProject.ext.has(name) ? rootProject.ext.get(name) : project.properties['StreamVideoReactNative_' + name]
23
+ }
24
+
25
+ def getExtOrIntegerDefault(name) {
26
+ return rootProject.ext.has(name) ? rootProject.ext.get(name) : (project.properties['StreamVideoReactNative_' + name]).toInteger()
27
+ }
28
+
29
+ android {
30
+ compileSdkVersion getExtOrIntegerDefault('compileSdkVersion')
31
+ namespace "com.streamvideo.reactnative"
32
+ defaultConfig {
33
+ minSdkVersion 16
34
+ targetSdkVersion getExtOrIntegerDefault('targetSdkVersion')
35
+ versionCode 1
36
+ versionName "1.0"
37
+
38
+ }
39
+
40
+ buildTypes {
41
+ release {
42
+ minifyEnabled false
43
+ }
44
+ }
45
+ lintOptions {
46
+ disable 'GradleCompatible'
47
+ }
48
+ compileOptions {
49
+ sourceCompatibility JavaVersion.VERSION_1_8
50
+ targetCompatibility JavaVersion.VERSION_1_8
51
+ }
52
+ }
53
+
54
+ repositories {
55
+ mavenCentral()
56
+ jcenter()
57
+ google()
58
+ maven { url 'https://jitpack.io' }
59
+
60
+ def found = false
61
+ def defaultDir = null
62
+ def androidSourcesName = 'React Native sources'
63
+
64
+ if (rootProject.ext.has('reactNativeAndroidRoot')) {
65
+ defaultDir = rootProject.ext.get('reactNativeAndroidRoot')
66
+ } else {
67
+ defaultDir = new File(
68
+ projectDir,
69
+ '/../../../node_modules/react-native/android'
70
+ )
71
+ }
72
+
73
+ if (defaultDir.exists()) {
74
+ maven {
75
+ url defaultDir.toString()
76
+ name androidSourcesName
77
+ }
78
+
79
+ logger.info(":${project.name}:reactNativeAndroidRoot ${defaultDir.canonicalPath}")
80
+ found = true
81
+ } else {
82
+ def parentDir = rootProject.projectDir
83
+
84
+ 1.upto(5, {
85
+ if (found) return true
86
+ parentDir = parentDir.parentFile
87
+
88
+ def androidSourcesDir = new File(
89
+ parentDir,
90
+ 'node_modules/react-native'
91
+ )
92
+
93
+ def androidPrebuiltBinaryDir = new File(
94
+ parentDir,
95
+ 'node_modules/react-native/android'
96
+ )
97
+
98
+ if (androidPrebuiltBinaryDir.exists()) {
99
+ maven {
100
+ url androidPrebuiltBinaryDir.toString()
101
+ name androidSourcesName
102
+ }
103
+
104
+ logger.info(":${project.name}:reactNativeAndroidRoot ${androidPrebuiltBinaryDir.canonicalPath}")
105
+ found = true
106
+ } else if (androidSourcesDir.exists()) {
107
+ maven {
108
+ url androidSourcesDir.toString()
109
+ name androidSourcesName
110
+ }
111
+
112
+ logger.info(":${project.name}:reactNativeAndroidRoot ${androidSourcesDir.canonicalPath}")
113
+ found = true
114
+ }
115
+ })
116
+ }
117
+
118
+ if (!found) {
119
+ throw new GradleException(
120
+ "${project.name}: unable to locate React Native android sources. " +
121
+ "Ensure you have you installed React Native as a dependency in your project and try again."
122
+ )
123
+ }
124
+ }
125
+
126
+ def kotlin_version = getExtOrDefault('kotlinVersion')
127
+
128
+ dependencies {
129
+ // noinspection GradleDynamicVersion
130
+ api 'com.facebook.react:react-native:+'
131
+ implementation "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"
132
+ api 'io.github.webrtc-sdk:android:104.5112.10'
133
+ implementation project(':stream-io_react-native-webrtc')
134
+ implementation "androidx.annotation:annotation:1.4.0"
135
+ }
@@ -0,0 +1,5 @@
1
+ distributionBase=GRADLE_USER_HOME
2
+ distributionPath=wrapper/dists
3
+ distributionUrl=https\://services.gradle.org/distributions/gradle-7.5.1-all.zip
4
+ zipStoreBase=GRADLE_USER_HOME
5
+ zipStorePath=wrapper/dists
@@ -0,0 +1,3 @@
1
+ StreamVideoReactNative_kotlinVersion=1.6.10
2
+ StreamVideoReactNative_compileSdkVersion=29
3
+ StreamVideoReactNative_targetSdkVersion=29
@@ -0,0 +1,234 @@
1
+ #!/bin/sh
2
+
3
+ #
4
+ # Copyright © 2015-2021 the original authors.
5
+ #
6
+ # Licensed under the Apache License, Version 2.0 (the "License");
7
+ # you may not use this file except in compliance with the License.
8
+ # You may obtain a copy of the License at
9
+ #
10
+ # https://www.apache.org/licenses/LICENSE-2.0
11
+ #
12
+ # Unless required by applicable law or agreed to in writing, software
13
+ # distributed under the License is distributed on an "AS IS" BASIS,
14
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15
+ # See the License for the specific language governing permissions and
16
+ # limitations under the License.
17
+ #
18
+
19
+ ##############################################################################
20
+ #
21
+ # Gradle start up script for POSIX generated by Gradle.
22
+ #
23
+ # Important for running:
24
+ #
25
+ # (1) You need a POSIX-compliant shell to run this script. If your /bin/sh is
26
+ # noncompliant, but you have some other compliant shell such as ksh or
27
+ # bash, then to run this script, type that shell name before the whole
28
+ # command line, like:
29
+ #
30
+ # ksh Gradle
31
+ #
32
+ # Busybox and similar reduced shells will NOT work, because this script
33
+ # requires all of these POSIX shell features:
34
+ # * functions;
35
+ # * expansions «$var», «${var}», «${var:-default}», «${var+SET}»,
36
+ # «${var#prefix}», «${var%suffix}», and «$( cmd )»;
37
+ # * compound commands having a testable exit status, especially «case»;
38
+ # * various built-in commands including «command», «set», and «ulimit».
39
+ #
40
+ # Important for patching:
41
+ #
42
+ # (2) This script targets any POSIX shell, so it avoids extensions provided
43
+ # by Bash, Ksh, etc; in particular arrays are avoided.
44
+ #
45
+ # The "traditional" practice of packing multiple parameters into a
46
+ # space-separated string is a well documented source of bugs and security
47
+ # problems, so this is (mostly) avoided, by progressively accumulating
48
+ # options in "$@", and eventually passing that to Java.
49
+ #
50
+ # Where the inherited environment variables (DEFAULT_JVM_OPTS, JAVA_OPTS,
51
+ # and GRADLE_OPTS) rely on word-splitting, this is performed explicitly;
52
+ # see the in-line comments for details.
53
+ #
54
+ # There are tweaks for specific operating systems such as AIX, CygWin,
55
+ # Darwin, MinGW, and NonStop.
56
+ #
57
+ # (3) This script is generated from the Groovy template
58
+ # https://github.com/gradle/gradle/blob/master/subprojects/plugins/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt
59
+ # within the Gradle project.
60
+ #
61
+ # You can find Gradle at https://github.com/gradle/gradle/.
62
+ #
63
+ ##############################################################################
64
+
65
+ # Attempt to set APP_HOME
66
+
67
+ # Resolve links: $0 may be a link
68
+ app_path=$0
69
+
70
+ # Need this for daisy-chained symlinks.
71
+ while
72
+ APP_HOME=${app_path%"${app_path##*/}"} # leaves a trailing /; empty if no leading path
73
+ [ -h "$app_path" ]
74
+ do
75
+ ls=$( ls -ld "$app_path" )
76
+ link=${ls#*' -> '}
77
+ case $link in #(
78
+ /*) app_path=$link ;; #(
79
+ *) app_path=$APP_HOME$link ;;
80
+ esac
81
+ done
82
+
83
+ APP_HOME=$( cd "${APP_HOME:-./}" && pwd -P ) || exit
84
+
85
+ APP_NAME="Gradle"
86
+ APP_BASE_NAME=${0##*/}
87
+
88
+ # Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
89
+ DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'
90
+
91
+ # Use the maximum available, or set MAX_FD != -1 to use that value.
92
+ MAX_FD=maximum
93
+
94
+ warn () {
95
+ echo "$*"
96
+ } >&2
97
+
98
+ die () {
99
+ echo
100
+ echo "$*"
101
+ echo
102
+ exit 1
103
+ } >&2
104
+
105
+ # OS specific support (must be 'true' or 'false').
106
+ cygwin=false
107
+ msys=false
108
+ darwin=false
109
+ nonstop=false
110
+ case "$( uname )" in #(
111
+ CYGWIN* ) cygwin=true ;; #(
112
+ Darwin* ) darwin=true ;; #(
113
+ MSYS* | MINGW* ) msys=true ;; #(
114
+ NONSTOP* ) nonstop=true ;;
115
+ esac
116
+
117
+ CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar
118
+
119
+
120
+ # Determine the Java command to use to start the JVM.
121
+ if [ -n "$JAVA_HOME" ] ; then
122
+ if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
123
+ # IBM's JDK on AIX uses strange locations for the executables
124
+ JAVACMD=$JAVA_HOME/jre/sh/java
125
+ else
126
+ JAVACMD=$JAVA_HOME/bin/java
127
+ fi
128
+ if [ ! -x "$JAVACMD" ] ; then
129
+ die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME
130
+
131
+ Please set the JAVA_HOME variable in your environment to match the
132
+ location of your Java installation."
133
+ fi
134
+ else
135
+ JAVACMD=java
136
+ which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
137
+
138
+ Please set the JAVA_HOME variable in your environment to match the
139
+ location of your Java installation."
140
+ fi
141
+
142
+ # Increase the maximum file descriptors if we can.
143
+ if ! "$cygwin" && ! "$darwin" && ! "$nonstop" ; then
144
+ case $MAX_FD in #(
145
+ max*)
146
+ MAX_FD=$( ulimit -H -n ) ||
147
+ warn "Could not query maximum file descriptor limit"
148
+ esac
149
+ case $MAX_FD in #(
150
+ '' | soft) :;; #(
151
+ *)
152
+ ulimit -n "$MAX_FD" ||
153
+ warn "Could not set maximum file descriptor limit to $MAX_FD"
154
+ esac
155
+ fi
156
+
157
+ # Collect all arguments for the java command, stacking in reverse order:
158
+ # * args from the command line
159
+ # * the main class name
160
+ # * -classpath
161
+ # * -D...appname settings
162
+ # * --module-path (only if needed)
163
+ # * DEFAULT_JVM_OPTS, JAVA_OPTS, and GRADLE_OPTS environment variables.
164
+
165
+ # For Cygwin or MSYS, switch paths to Windows format before running java
166
+ if "$cygwin" || "$msys" ; then
167
+ APP_HOME=$( cygpath --path --mixed "$APP_HOME" )
168
+ CLASSPATH=$( cygpath --path --mixed "$CLASSPATH" )
169
+
170
+ JAVACMD=$( cygpath --unix "$JAVACMD" )
171
+
172
+ # Now convert the arguments - kludge to limit ourselves to /bin/sh
173
+ for arg do
174
+ if
175
+ case $arg in #(
176
+ -*) false ;; # don't mess with options #(
177
+ /?*) t=${arg#/} t=/${t%%/*} # looks like a POSIX filepath
178
+ [ -e "$t" ] ;; #(
179
+ *) false ;;
180
+ esac
181
+ then
182
+ arg=$( cygpath --path --ignore --mixed "$arg" )
183
+ fi
184
+ # Roll the args list around exactly as many times as the number of
185
+ # args, so each arg winds up back in the position where it started, but
186
+ # possibly modified.
187
+ #
188
+ # NB: a `for` loop captures its iteration list before it begins, so
189
+ # changing the positional parameters here affects neither the number of
190
+ # iterations, nor the values presented in `arg`.
191
+ shift # remove old arg
192
+ set -- "$@" "$arg" # push replacement arg
193
+ done
194
+ fi
195
+
196
+ # Collect all arguments for the java command;
197
+ # * $DEFAULT_JVM_OPTS, $JAVA_OPTS, and $GRADLE_OPTS can contain fragments of
198
+ # shell script including quotes and variable substitutions, so put them in
199
+ # double quotes to make sure that they get re-expanded; and
200
+ # * put everything else in single quotes, so that it's not re-expanded.
201
+
202
+ set -- \
203
+ "-Dorg.gradle.appname=$APP_BASE_NAME" \
204
+ -classpath "$CLASSPATH" \
205
+ org.gradle.wrapper.GradleWrapperMain \
206
+ "$@"
207
+
208
+ # Use "xargs" to parse quoted args.
209
+ #
210
+ # With -n1 it outputs one arg per line, with the quotes and backslashes removed.
211
+ #
212
+ # In Bash we could simply go:
213
+ #
214
+ # readarray ARGS < <( xargs -n1 <<<"$var" ) &&
215
+ # set -- "${ARGS[@]}" "$@"
216
+ #
217
+ # but POSIX shell has neither arrays nor command substitution, so instead we
218
+ # post-process each arg (as a line of input to sed) to backslash-escape any
219
+ # character that might be a shell metacharacter, then use eval to reverse
220
+ # that process (while maintaining the separation between arguments), and wrap
221
+ # the whole thing up as a single "set" statement.
222
+ #
223
+ # This will of course break if any of these variables contains a newline or
224
+ # an unmatched quote.
225
+ #
226
+
227
+ eval "set -- $(
228
+ printf '%s\n' "$DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS" |
229
+ xargs -n1 |
230
+ sed ' s~[^-[:alnum:]+,./:=@_]~\\&~g; ' |
231
+ tr '\n' ' '
232
+ )" '"$@"'
233
+
234
+ exec "$JAVACMD" "$@"
@@ -0,0 +1,89 @@
1
+ @rem
2
+ @rem Copyright 2015 the original author or authors.
3
+ @rem
4
+ @rem Licensed under the Apache License, Version 2.0 (the "License");
5
+ @rem you may not use this file except in compliance with the License.
6
+ @rem You may obtain a copy of the License at
7
+ @rem
8
+ @rem https://www.apache.org/licenses/LICENSE-2.0
9
+ @rem
10
+ @rem Unless required by applicable law or agreed to in writing, software
11
+ @rem distributed under the License is distributed on an "AS IS" BASIS,
12
+ @rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ @rem See the License for the specific language governing permissions and
14
+ @rem limitations under the License.
15
+ @rem
16
+
17
+ @if "%DEBUG%" == "" @echo off
18
+ @rem ##########################################################################
19
+ @rem
20
+ @rem Gradle startup script for Windows
21
+ @rem
22
+ @rem ##########################################################################
23
+
24
+ @rem Set local scope for the variables with windows NT shell
25
+ if "%OS%"=="Windows_NT" setlocal
26
+
27
+ set DIRNAME=%~dp0
28
+ if "%DIRNAME%" == "" set DIRNAME=.
29
+ set APP_BASE_NAME=%~n0
30
+ set APP_HOME=%DIRNAME%
31
+
32
+ @rem Resolve any "." and ".." in APP_HOME to make it shorter.
33
+ for %%i in ("%APP_HOME%") do set APP_HOME=%%~fi
34
+
35
+ @rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
36
+ set DEFAULT_JVM_OPTS="-Xmx64m" "-Xms64m"
37
+
38
+ @rem Find java.exe
39
+ if defined JAVA_HOME goto findJavaFromJavaHome
40
+
41
+ set JAVA_EXE=java.exe
42
+ %JAVA_EXE% -version >NUL 2>&1
43
+ if "%ERRORLEVEL%" == "0" goto execute
44
+
45
+ echo.
46
+ echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
47
+ echo.
48
+ echo Please set the JAVA_HOME variable in your environment to match the
49
+ echo location of your Java installation.
50
+
51
+ goto fail
52
+
53
+ :findJavaFromJavaHome
54
+ set JAVA_HOME=%JAVA_HOME:"=%
55
+ set JAVA_EXE=%JAVA_HOME%/bin/java.exe
56
+
57
+ if exist "%JAVA_EXE%" goto execute
58
+
59
+ echo.
60
+ echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
61
+ echo.
62
+ echo Please set the JAVA_HOME variable in your environment to match the
63
+ echo location of your Java installation.
64
+
65
+ goto fail
66
+
67
+ :execute
68
+ @rem Setup the command line
69
+
70
+ set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
71
+
72
+
73
+ @rem Execute Gradle
74
+ "%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %*
75
+
76
+ :end
77
+ @rem End local scope for the variables with windows NT shell
78
+ if "%ERRORLEVEL%"=="0" goto mainEnd
79
+
80
+ :fail
81
+ rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
82
+ rem the _cmd.exe /c_ return code!
83
+ if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1
84
+ exit /b 1
85
+
86
+ :mainEnd
87
+ if "%OS%"=="Windows_NT" endlocal
88
+
89
+ :omega
@@ -0,0 +1,5 @@
1
+ <manifest xmlns:android="http://schemas.android.com/apk/res/android"
2
+ package="com.streamvideo.reactnative">
3
+
4
+ <uses-permission android:name="android.permission.INTERNET" />
5
+ </manifest>
@@ -0,0 +1,16 @@
1
+ package com.streamvideo.reactnative
2
+
3
+ import com.streamvideo.reactnative.video.SimulcastVideoEncoderFactoryWrapper
4
+ import com.streamvideo.reactnative.video.WrappedVideoDecoderFactoryProxy
5
+ import com.oney.WebRTCModule.WebRTCModuleOptions
6
+
7
+
8
+ object StreamVideoReactNative {
9
+
10
+ @JvmStatic
11
+ fun setup() {
12
+ val options = WebRTCModuleOptions.getInstance()
13
+ options.videoEncoderFactory = SimulcastVideoEncoderFactoryWrapper(null, true, true)
14
+ options.videoDecoderFactory = WrappedVideoDecoderFactoryProxy()
15
+ }
16
+ }
@@ -0,0 +1,11 @@
1
+ package com.streamvideo.reactnative
2
+
3
+ import com.facebook.react.bridge.*
4
+
5
+
6
+ class StreamVideoReactNativeModule(reactContext: ReactApplicationContext) : ReactContextBaseJavaModule(reactContext) {
7
+
8
+ override fun getName(): String {
9
+ return "StreamVideoReactNative"
10
+ }
11
+ }
@@ -0,0 +1,17 @@
1
+ package com.streamvideo.reactnative
2
+
3
+ import com.facebook.react.ReactPackage
4
+ import com.facebook.react.bridge.NativeModule
5
+ import com.facebook.react.bridge.ReactApplicationContext
6
+ import com.facebook.react.uimanager.ViewManager
7
+
8
+
9
+ class StreamVideoReactNativePackage : ReactPackage {
10
+ override fun createNativeModules(reactContext: ReactApplicationContext): List<NativeModule> {
11
+ return listOf(StreamVideoReactNativeModule(reactContext))
12
+ }
13
+
14
+ override fun createViewManagers(reactContext: ReactApplicationContext): List<ViewManager<*, *>> {
15
+ return emptyList()
16
+ }
17
+ }
@@ -0,0 +1,249 @@
1
+ package com.streamvideo.reactnative.video
2
+
3
+ import android.util.Log
4
+ import org.webrtc.EglBase
5
+ import org.webrtc.HardwareVideoEncoderFactory
6
+ import org.webrtc.SimulcastVideoEncoderFactory
7
+ import org.webrtc.SoftwareVideoEncoderFactory
8
+ import org.webrtc.VideoCodecInfo
9
+ import org.webrtc.VideoCodecStatus
10
+ import org.webrtc.VideoEncoder
11
+ import org.webrtc.VideoEncoderFactory
12
+ import org.webrtc.VideoEncoderFallback
13
+ import org.webrtc.VideoFrame
14
+ import org.webrtc.WrappedNativeVideoEncoder
15
+ import java.util.concurrent.Callable
16
+ import java.util.concurrent.ExecutorService
17
+ import java.util.concurrent.Executors
18
+
19
+ /*
20
+ Copyright 2017, Lyo Kato <lyo.kato at gmail.com> (Original Author)
21
+ Copyright 2017-2021, Shiguredo Inc.
22
+
23
+ Licensed under the Apache License, Version 2.0 (the "License");
24
+ you may not use this file except in compliance with the License.
25
+ You may obtain a copy of the License at
26
+
27
+ http://www.apache.org/licenses/LICENSE-2.0
28
+
29
+ Unless required by applicable law or agreed to in writing, software
30
+ distributed under the License is distributed on an "AS IS" BASIS,
31
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
32
+ See the License for the specific language governing permissions and
33
+ limitations under the License.
34
+ */
35
+ open class SimulcastVideoEncoderFactoryWrapper(
36
+ sharedContext: EglBase.Context?,
37
+ enableIntelVp8Encoder: Boolean,
38
+ enableH264HighProfile: Boolean
39
+ ) : VideoEncoderFactory {
40
+
41
+ /**
42
+ * Factory that prioritizes software encoder.
43
+ *
44
+ * When the selected codec can't be handled by the software encoder,
45
+ * it uses the hardware encoder as a fallback. However, this class is
46
+ * primarily used to address an issue in libwebrtc, and does not have
47
+ * purposeful usecase itself.
48
+ *
49
+ * To use simulcast in libwebrtc, SimulcastEncoderAdapter is used.
50
+ * SimulcastEncoderAdapter takes in a primary and fallback encoder.
51
+ * If HardwareVideoEncoderFactory and SoftwareVideoEncoderFactory are
52
+ * passed in directly as primary and fallback, when H.264 is used,
53
+ * libwebrtc will crash.
54
+ *
55
+ * This is because SoftwareVideoEncoderFactory does not handle H.264,
56
+ * so [SoftwareVideoEncoderFactory.createEncoder] returns null, and
57
+ * the libwebrtc side does not handle nulls, regardless of whether the
58
+ * fallback is actually used or not.
59
+ *
60
+ * To avoid nulls, we simply pass responsibility over to the HardwareVideoEncoderFactory.
61
+ * This results in HardwareVideoEncoderFactory being both the primary and fallback,
62
+ * but there aren't any specific problems in doing so.
63
+ */
64
+ private class FallbackFactory(private val hardwareVideoEncoderFactory: VideoEncoderFactory) :
65
+ VideoEncoderFactory {
66
+
67
+ private val softwareVideoEncoderFactory: VideoEncoderFactory = SoftwareVideoEncoderFactory()
68
+
69
+ override fun createEncoder(info: VideoCodecInfo): VideoEncoder? {
70
+ val softwareEncoder = softwareVideoEncoderFactory.createEncoder(info)
71
+ val hardwareEncoder = hardwareVideoEncoderFactory.createEncoder(info)
72
+ return if (hardwareEncoder != null && softwareEncoder != null) {
73
+ VideoEncoderFallback(hardwareEncoder, softwareEncoder)
74
+ } else {
75
+ softwareEncoder ?: hardwareEncoder
76
+ }
77
+ }
78
+
79
+ override fun getSupportedCodecs(): Array<VideoCodecInfo> {
80
+ val supportedCodecInfos: MutableList<VideoCodecInfo> = mutableListOf()
81
+ supportedCodecInfos.addAll(softwareVideoEncoderFactory.supportedCodecs)
82
+ supportedCodecInfos.addAll(hardwareVideoEncoderFactory.supportedCodecs)
83
+ return supportedCodecInfos.toTypedArray()
84
+ }
85
+
86
+ }
87
+
88
+ /**
89
+ * Wraps each stream encoder and performs the following:
90
+ * - Starts up a single thread
91
+ * - When the width/height from [initEncode] doesn't match the frame buffer's,
92
+ * scales the frame prior to encoding.
93
+ * - Always calls the encoder on the thread.
94
+ */
95
+ private class StreamEncoderWrapper(private val encoder: VideoEncoder) : VideoEncoder {
96
+
97
+ val executor: ExecutorService = Executors.newSingleThreadExecutor()
98
+ var streamSettings: VideoEncoder.Settings? = null
99
+
100
+ override fun initEncode(
101
+ settings: VideoEncoder.Settings,
102
+ callback: VideoEncoder.Callback?
103
+ ): VideoCodecStatus {
104
+ streamSettings = settings
105
+ val future = executor.submit(Callable {
106
+ Log.i(
107
+ "SimulVideoEncoderFac",
108
+ """initEncode() thread=${Thread.currentThread().name} [${Thread.currentThread().id}]
109
+ | encoder=${encoder.implementationName}
110
+ | streamSettings:
111
+ | numberOfCores=${settings.numberOfCores}
112
+ | width=${settings.width}
113
+ | height=${settings.height}
114
+ | startBitrate=${settings.startBitrate}
115
+ | maxFramerate=${settings.maxFramerate}
116
+ | automaticResizeOn=${settings.automaticResizeOn}
117
+ | numberOfSimulcastStreams=${settings.numberOfSimulcastStreams}
118
+ | lossNotification=${settings.capabilities.lossNotification}
119
+ """.trimMargin()
120
+ )
121
+ return@Callable encoder.initEncode(settings, callback)
122
+ })
123
+ return future.get()
124
+ }
125
+
126
+ override fun release(): VideoCodecStatus {
127
+ val future = executor.submit(Callable { return@Callable encoder.release() })
128
+ return future.get()
129
+ }
130
+
131
+ override fun encode(
132
+ frame: VideoFrame,
133
+ encodeInfo: VideoEncoder.EncodeInfo?
134
+ ): VideoCodecStatus {
135
+ val future = executor.submit(Callable {
136
+ //LKLog.d { "encode() buffer=${frame.buffer}, thread=${Thread.currentThread().name} " +
137
+ // "[${Thread.currentThread().id}]" }
138
+ if (streamSettings == null) {
139
+ return@Callable encoder.encode(frame, encodeInfo)
140
+ } else if (frame.buffer.width == streamSettings!!.width) {
141
+ return@Callable encoder.encode(frame, encodeInfo)
142
+ } else {
143
+ // The incoming buffer is different than the streamSettings received in initEncode()
144
+ // Need to scale.
145
+ val originalBuffer = frame.buffer
146
+ // TODO: Do we need to handle when the scale factor is weird?
147
+ val adaptedBuffer = originalBuffer.cropAndScale(
148
+ 0, 0, originalBuffer.width, originalBuffer.height,
149
+ streamSettings!!.width, streamSettings!!.height
150
+ )
151
+ val adaptedFrame = VideoFrame(adaptedBuffer, frame.rotation, frame.timestampNs)
152
+ val result = encoder.encode(adaptedFrame, encodeInfo)
153
+ adaptedBuffer.release()
154
+ return@Callable result
155
+ }
156
+ })
157
+ return future.get()
158
+ }
159
+
160
+ override fun setRateAllocation(
161
+ allocation: VideoEncoder.BitrateAllocation?,
162
+ frameRate: Int
163
+ ): VideoCodecStatus {
164
+ val future = executor.submit(Callable {
165
+ return@Callable encoder.setRateAllocation(
166
+ allocation,
167
+ frameRate
168
+ )
169
+ })
170
+ return future.get()
171
+ }
172
+
173
+ override fun getScalingSettings(): VideoEncoder.ScalingSettings {
174
+ val future = executor.submit(Callable { return@Callable encoder.scalingSettings })
175
+ return future.get()
176
+ }
177
+
178
+ override fun getImplementationName(): String {
179
+ val future = executor.submit(Callable { return@Callable encoder.implementationName })
180
+ return future.get()
181
+ }
182
+
183
+ override fun createNativeVideoEncoder(): Long {
184
+ val future = executor.submit(Callable { return@Callable encoder.createNativeVideoEncoder() })
185
+ return future.get()
186
+ }
187
+
188
+ override fun isHardwareEncoder(): Boolean {
189
+ val future = executor.submit(Callable { return@Callable encoder.isHardwareEncoder })
190
+ return future.get()
191
+ }
192
+
193
+ override fun setRates(rcParameters: VideoEncoder.RateControlParameters?): VideoCodecStatus {
194
+ val future = executor.submit(Callable { return@Callable encoder.setRates(rcParameters) })
195
+ return future.get()
196
+ }
197
+
198
+ override fun getResolutionBitrateLimits(): Array<VideoEncoder.ResolutionBitrateLimits> {
199
+ val future = executor.submit(Callable { return@Callable encoder.resolutionBitrateLimits })
200
+ return future.get()
201
+ }
202
+
203
+ override fun getEncoderInfo(): VideoEncoder.EncoderInfo {
204
+ val future = executor.submit(Callable { return@Callable encoder.encoderInfo })
205
+ return future.get()
206
+ }
207
+ }
208
+
209
+ private class StreamEncoderWrapperFactory(private val factory: VideoEncoderFactory) :
210
+ VideoEncoderFactory {
211
+ override fun createEncoder(videoCodecInfo: VideoCodecInfo?): VideoEncoder? {
212
+ val encoder = factory.createEncoder(videoCodecInfo)
213
+ if (encoder == null) {
214
+ return null
215
+ }
216
+ if (encoder is WrappedNativeVideoEncoder) {
217
+ return encoder
218
+ }
219
+ return StreamEncoderWrapper(encoder)
220
+ }
221
+
222
+ override fun getSupportedCodecs(): Array<VideoCodecInfo> {
223
+ return factory.supportedCodecs
224
+ }
225
+ }
226
+
227
+
228
+ private val primary: VideoEncoderFactory
229
+ private val fallback: VideoEncoderFactory
230
+ private val native: SimulcastVideoEncoderFactory
231
+
232
+ init {
233
+ val hardwareVideoEncoderFactory = HardwareVideoEncoderFactory(
234
+ sharedContext, enableIntelVp8Encoder, enableH264HighProfile
235
+ )
236
+ primary = StreamEncoderWrapperFactory(hardwareVideoEncoderFactory)
237
+ fallback = StreamEncoderWrapperFactory(FallbackFactory(primary))
238
+ native = SimulcastVideoEncoderFactory(primary, fallback)
239
+ }
240
+
241
+ override fun createEncoder(info: VideoCodecInfo?): VideoEncoder? {
242
+ return native.createEncoder(info)
243
+ }
244
+
245
+ override fun getSupportedCodecs(): Array<VideoCodecInfo> {
246
+ return native.supportedCodecs
247
+ }
248
+
249
+ }
@@ -0,0 +1,19 @@
1
+ package com.streamvideo.reactnative.video
2
+
3
+ import com.oney.WebRTCModule.EglUtils
4
+ import org.webrtc.VideoCodecInfo
5
+ import org.webrtc.VideoDecoder
6
+ import org.webrtc.VideoDecoderFactory
7
+ import org.webrtc.WrappedVideoDecoderFactory
8
+
9
+ class WrappedVideoDecoderFactoryProxy : VideoDecoderFactory {
10
+
11
+ private val factory by lazy { WrappedVideoDecoderFactory(EglUtils.getRootEglBaseContext()) }
12
+ override fun createDecoder(codecInfo: VideoCodecInfo): VideoDecoder? {
13
+ return factory.createDecoder(codecInfo)
14
+ }
15
+
16
+ override fun getSupportedCodecs(): Array<VideoCodecInfo> {
17
+ return factory.supportedCodecs
18
+ }
19
+ }
@@ -2,7 +2,14 @@ import { PropsWithChildren } from 'react';
2
2
  import { Call } from '@stream-io/video-client';
3
3
  import { MediaDevicesInitialState } from './MediaStreamManagement';
4
4
  export type StreamCallProps = {
5
+ /**
6
+ * Stream Call instance propagated to the component's children as a part of StreamCallContext.
7
+ * Children can access it with useCall() hook.
8
+ */
5
9
  call: Call;
10
+ /**
11
+ * Provides the initial status of the media devices(audio/video) to the `MediaStreamManagement`.
12
+ */
6
13
  mediaDeviceInitialState?: MediaDevicesInitialState;
7
14
  };
8
15
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"StreamCall.js","sourceRoot":"","sources":["../../../src/providers/StreamCall.tsx"],"names":[],"mappings":";;;;;;AAAA,0EAAqE;AACrE,kDAAiD;AAEjD,oCAA+E;AAC/E,6GAA0G;AAC1G,mEAGiC;AAOjC;;;;;;GAMG;AACI,MAAM,UAAU,GAAG,CAAC,EACzB,IAAI,EACJ,uBAAuB,GAAG,EAAE,EAC5B,QAAQ,GAC2B,EAAE,EAAE;IACvC,OAAO,CACL,CAAC,yCAAkB,CAAC,IAAI,CAAC,CAAC,IAAI,CAAC,CAC7B;MAAA,CAAC,6CAAqB,CAAC,IAAI,uBAAuB,CAAC,CACjD;QAAA,CAAC,iBAAiB,CAAC,AAAD,EAClB;QAAA,CAAC,oBAAoB,CAAC,AAAD,EACrB;QAAA,CAAC,wBAAwB,CAAC,AAAD,EACzB;QAAA,CAAC,QAAQ,CACX;MAAA,EAAE,6CAAqB,CACzB;IAAA,EAAE,yCAAkB,CAAC,CACtB,CAAC;AACJ,CAAC,CAAC;AAfW,QAAA,UAAU,cAerB;AAEF;;;GAGG;AACH,MAAM,iBAAiB,GAAG,GAAG,EAAE;IAC7B,IAAA,4BAAoB,GAAE,CAAC;IACvB,OAAO,IAAI,CAAC;AACd,CAAC,CAAC;AAEF;;;GAGG;AACH,MAAM,oBAAoB,GAAG,GAAG,EAAE;IAChC,IAAA,qCAA6B,GAAE,CAAC;IAChC,OAAO,IAAI,CAAC;AACd,CAAC,CAAC;AAEF;;;GAGG;AACH,MAAM,wBAAwB,GAAG,GAAG,EAAE;IACpC,IAAA,2EAAoC,GAAE,CAAC;IACvC,OAAO,IAAI,CAAC;AACd,CAAC,CAAC"}
1
+ {"version":3,"file":"StreamCall.js","sourceRoot":"","sources":["../../../src/providers/StreamCall.tsx"],"names":[],"mappings":";;;;;;AAAA,0EAAqE;AACrE,kDAAiD;AAEjD,oCAA+E;AAC/E,6GAA0G;AAC1G,mEAGiC;AAajC;;;;;;GAMG;AACI,MAAM,UAAU,GAAG,CAAC,EACzB,IAAI,EACJ,uBAAuB,GAAG,EAAE,EAC5B,QAAQ,GAC2B,EAAE,EAAE;IACvC,OAAO,CACL,CAAC,yCAAkB,CAAC,IAAI,CAAC,CAAC,IAAI,CAAC,CAC7B;MAAA,CAAC,6CAAqB,CAAC,IAAI,uBAAuB,CAAC,CACjD;QAAA,CAAC,iBAAiB,CAAC,AAAD,EAClB;QAAA,CAAC,oBAAoB,CAAC,AAAD,EACrB;QAAA,CAAC,wBAAwB,CAAC,AAAD,EACzB;QAAA,CAAC,QAAQ,CACX;MAAA,EAAE,6CAAqB,CACzB;IAAA,EAAE,yCAAkB,CAAC,CACtB,CAAC;AACJ,CAAC,CAAC;AAfW,QAAA,UAAU,cAerB;AAEF;;;GAGG;AACH,MAAM,iBAAiB,GAAG,GAAG,EAAE;IAC7B,IAAA,4BAAoB,GAAE,CAAC;IACvB,OAAO,IAAI,CAAC;AACd,CAAC,CAAC;AAEF;;;GAGG;AACH,MAAM,oBAAoB,GAAG,GAAG,EAAE;IAChC,IAAA,qCAA6B,GAAE,CAAC;IAChC,OAAO,IAAI,CAAC;AACd,CAAC,CAAC;AAEF;;;GAGG;AACH,MAAM,wBAAwB,GAAG,GAAG,EAAE;IACpC,IAAA,2EAAoC,GAAE,CAAC;IACvC,OAAO,IAAI,CAAC;AACd,CAAC,CAAC"}
package/dist/version.d.ts CHANGED
@@ -1 +1 @@
1
- export declare const version = "0.0.1-alpha.384";
1
+ export declare const version = "0.0.1-alpha.386";
package/dist/version.js CHANGED
@@ -1,5 +1,5 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.version = void 0;
4
- exports.version = '0.0.1-alpha.384';
4
+ exports.version = '0.0.1-alpha.386';
5
5
  //# sourceMappingURL=version.js.map
@@ -0,0 +1,2 @@
1
+ #import <React/RCTBridgeModule.h>
2
+ #import <React/RCTViewManager.h>
@@ -0,0 +1,5 @@
1
+ @interface StreamVideoReactNative : NSObject <RCTBridgeModule>
2
+
3
+ +(void)setup;
4
+
5
+ @end
@@ -0,0 +1,19 @@
1
+ #import <React/RCTBridgeModule.h>
2
+ #import "StreamVideoReactNative.h"
3
+ #import "WebRTCModule.h"
4
+ #import "WebRTCModuleOptions.h"
5
+
6
+ @implementation StreamVideoReactNative
7
+ RCT_EXPORT_MODULE();
8
+
9
+ +(BOOL)requiresMainQueueSetup {
10
+ return NO;
11
+ }
12
+
13
+ +(void)setup {
14
+ RTCDefaultVideoEncoderFactory *videoEncoderFactory = [[RTCDefaultVideoEncoderFactory alloc] init];
15
+ RTCVideoEncoderFactorySimulcast *simulcastVideoEncoderFactory = [[RTCVideoEncoderFactorySimulcast alloc] initWithPrimary:videoEncoderFactory fallback:videoEncoderFactory];
16
+ WebRTCModuleOptions *options = [WebRTCModuleOptions sharedInstance];
17
+ options.videoEncoderFactory = simulcastVideoEncoderFactory;
18
+ }
19
+ @end
@@ -0,0 +1,274 @@
1
+ // !$*UTF8*$!
2
+ {
3
+ archiveVersion = 1;
4
+ classes = {
5
+ };
6
+ objectVersion = 46;
7
+ objects = {
8
+
9
+ /* Begin PBXCopyFilesBuildPhase section */
10
+ 58B511D91A9E6C8500147676 /* CopyFiles */ = {
11
+ isa = PBXCopyFilesBuildPhase;
12
+ buildActionMask = 2147483647;
13
+ dstPath = "include/$(PRODUCT_NAME)";
14
+ dstSubfolderSpec = 16;
15
+ files = (
16
+ );
17
+ runOnlyForDeploymentPostprocessing = 0;
18
+ };
19
+ /* End PBXCopyFilesBuildPhase section */
20
+
21
+ /* Begin PBXFileReference section */
22
+ 134814201AA4EA6300B7C361 /* libStreamVideoReactNative.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = libStreamVideoReactNative.a; sourceTree = BUILT_PRODUCTS_DIR; };
23
+ B3E7B5891CC2AC0600A0062D /* StreamVideoReactNative.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = StreamVideoReactNative.m; sourceTree = "<group>"; };
24
+ D7A6507C28C3C54500AC4DB2 /* StreamVideoReactNative.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = StreamVideoReactNative.h; sourceTree = "<group>"; };
25
+ F4FF95D5245B92E700C19C63 /* StreamVideoReactNative-Bridging-Header.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "StreamVideoReactNative-Bridging-Header.h"; sourceTree = "<group>"; };
26
+ /* End PBXFileReference section */
27
+
28
+ /* Begin PBXFrameworksBuildPhase section */
29
+ 58B511D81A9E6C8500147676 /* Frameworks */ = {
30
+ isa = PBXFrameworksBuildPhase;
31
+ buildActionMask = 2147483647;
32
+ files = (
33
+ );
34
+ runOnlyForDeploymentPostprocessing = 0;
35
+ };
36
+ /* End PBXFrameworksBuildPhase section */
37
+
38
+ /* Begin PBXGroup section */
39
+ 134814211AA4EA7D00B7C361 /* Products */ = {
40
+ isa = PBXGroup;
41
+ children = (
42
+ 134814201AA4EA6300B7C361 /* libLivekitReactNative.a */,
43
+ );
44
+ name = Products;
45
+ sourceTree = "<group>";
46
+ };
47
+ 58B511D21A9E6C8500147676 = {
48
+ isa = PBXGroup;
49
+ children = (
50
+ B3E7B5891CC2AC0600A0062D /* StreamVideoReactNative.m */,
51
+ D7A6507C28C3C54500AC4DB2 /* StreamVideoReactNative.h */,
52
+ F4FF95D5245B92E700C19C63 /* StreamVideoReactNative-Bridging-Header.h */,
53
+ 134814211AA4EA7D00B7C361 /* Products */,
54
+ );
55
+ sourceTree = "<group>";
56
+ };
57
+ /* End PBXGroup section */
58
+
59
+ /* Begin PBXNativeTarget section */
60
+ 58B511DA1A9E6C8500147676 /* StreamVideoReactNative */ = {
61
+ isa = PBXNativeTarget;
62
+ buildConfigurationList = 58B511EF1A9E6C8500147676 /* Build configuration list for PBXNativeTarget "StreamVideoReactNative" */;
63
+ buildPhases = (
64
+ 58B511D71A9E6C8500147676 /* Sources */,
65
+ 58B511D81A9E6C8500147676 /* Frameworks */,
66
+ 58B511D91A9E6C8500147676 /* CopyFiles */,
67
+ );
68
+ buildRules = (
69
+ );
70
+ dependencies = (
71
+ );
72
+ name = StreamVideoReactNative;
73
+ productName = RCTDataManager;
74
+ productReference = 134814201AA4EA6300B7C361 /* libLivekitReactNative.a */;
75
+ productType = "com.apple.product-type.library.static";
76
+ };
77
+ /* End PBXNativeTarget section */
78
+
79
+ /* Begin PBXProject section */
80
+ 58B511D31A9E6C8500147676 /* Project object */ = {
81
+ isa = PBXProject;
82
+ attributes = {
83
+ LastUpgradeCheck = 0920;
84
+ ORGANIZATIONNAME = Facebook;
85
+ TargetAttributes = {
86
+ 58B511DA1A9E6C8500147676 = {
87
+ CreatedOnToolsVersion = 6.1.1;
88
+ };
89
+ };
90
+ };
91
+ buildConfigurationList = 58B511D61A9E6C8500147676 /* Build configuration list for PBXProject "StreamVideoReactNative" */;
92
+ compatibilityVersion = "Xcode 3.2";
93
+ developmentRegion = English;
94
+ hasScannedForEncodings = 0;
95
+ knownRegions = (
96
+ English,
97
+ en,
98
+ );
99
+ mainGroup = 58B511D21A9E6C8500147676;
100
+ productRefGroup = 58B511D21A9E6C8500147676;
101
+ projectDirPath = "";
102
+ projectRoot = "";
103
+ targets = (
104
+ 58B511DA1A9E6C8500147676 /* StreamVideoReactNative */,
105
+ );
106
+ };
107
+ /* End PBXProject section */
108
+
109
+ /* Begin PBXSourcesBuildPhase section */
110
+ 58B511D71A9E6C8500147676 /* Sources */ = {
111
+ isa = PBXSourcesBuildPhase;
112
+ buildActionMask = 2147483647;
113
+ files = (
114
+ );
115
+ runOnlyForDeploymentPostprocessing = 0;
116
+ };
117
+ /* End PBXSourcesBuildPhase section */
118
+
119
+ /* Begin XCBuildConfiguration section */
120
+ 58B511ED1A9E6C8500147676 /* Debug */ = {
121
+ isa = XCBuildConfiguration;
122
+ buildSettings = {
123
+ ALWAYS_SEARCH_USER_PATHS = NO;
124
+ CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
125
+ CLANG_CXX_LIBRARY = "libc++";
126
+ CLANG_ENABLE_MODULES = YES;
127
+ CLANG_ENABLE_OBJC_ARC = YES;
128
+ CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
129
+ CLANG_WARN_BOOL_CONVERSION = YES;
130
+ CLANG_WARN_COMMA = YES;
131
+ CLANG_WARN_CONSTANT_CONVERSION = YES;
132
+ CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
133
+ CLANG_WARN_EMPTY_BODY = YES;
134
+ CLANG_WARN_ENUM_CONVERSION = YES;
135
+ CLANG_WARN_INFINITE_RECURSION = YES;
136
+ CLANG_WARN_INT_CONVERSION = YES;
137
+ CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
138
+ CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
139
+ CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
140
+ CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
141
+ CLANG_WARN_STRICT_PROTOTYPES = YES;
142
+ CLANG_WARN_SUSPICIOUS_MOVE = YES;
143
+ CLANG_WARN_UNREACHABLE_CODE = YES;
144
+ CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
145
+ COPY_PHASE_STRIP = NO;
146
+ ENABLE_STRICT_OBJC_MSGSEND = YES;
147
+ ENABLE_TESTABILITY = YES;
148
+ GCC_C_LANGUAGE_STANDARD = gnu99;
149
+ GCC_DYNAMIC_NO_PIC = NO;
150
+ GCC_NO_COMMON_BLOCKS = YES;
151
+ GCC_OPTIMIZATION_LEVEL = 0;
152
+ GCC_PREPROCESSOR_DEFINITIONS = (
153
+ "DEBUG=1",
154
+ "$(inherited)",
155
+ );
156
+ GCC_SYMBOLS_PRIVATE_EXTERN = NO;
157
+ GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
158
+ GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
159
+ GCC_WARN_UNDECLARED_SELECTOR = YES;
160
+ GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
161
+ GCC_WARN_UNUSED_FUNCTION = YES;
162
+ GCC_WARN_UNUSED_VARIABLE = YES;
163
+ IPHONEOS_DEPLOYMENT_TARGET = 12.0;
164
+ MTL_ENABLE_DEBUG_INFO = YES;
165
+ ONLY_ACTIVE_ARCH = YES;
166
+ SDKROOT = iphoneos;
167
+ };
168
+ name = Debug;
169
+ };
170
+ 58B511EE1A9E6C8500147676 /* Release */ = {
171
+ isa = XCBuildConfiguration;
172
+ buildSettings = {
173
+ ALWAYS_SEARCH_USER_PATHS = NO;
174
+ CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
175
+ CLANG_CXX_LIBRARY = "libc++";
176
+ CLANG_ENABLE_MODULES = YES;
177
+ CLANG_ENABLE_OBJC_ARC = YES;
178
+ CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
179
+ CLANG_WARN_BOOL_CONVERSION = YES;
180
+ CLANG_WARN_COMMA = YES;
181
+ CLANG_WARN_CONSTANT_CONVERSION = YES;
182
+ CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
183
+ CLANG_WARN_EMPTY_BODY = YES;
184
+ CLANG_WARN_ENUM_CONVERSION = YES;
185
+ CLANG_WARN_INFINITE_RECURSION = YES;
186
+ CLANG_WARN_INT_CONVERSION = YES;
187
+ CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
188
+ CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
189
+ CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
190
+ CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
191
+ CLANG_WARN_STRICT_PROTOTYPES = YES;
192
+ CLANG_WARN_SUSPICIOUS_MOVE = YES;
193
+ CLANG_WARN_UNREACHABLE_CODE = YES;
194
+ CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
195
+ COPY_PHASE_STRIP = YES;
196
+ ENABLE_NS_ASSERTIONS = NO;
197
+ ENABLE_STRICT_OBJC_MSGSEND = YES;
198
+ GCC_C_LANGUAGE_STANDARD = gnu99;
199
+ GCC_NO_COMMON_BLOCKS = YES;
200
+ GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
201
+ GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
202
+ GCC_WARN_UNDECLARED_SELECTOR = YES;
203
+ GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
204
+ GCC_WARN_UNUSED_FUNCTION = YES;
205
+ GCC_WARN_UNUSED_VARIABLE = YES;
206
+ IPHONEOS_DEPLOYMENT_TARGET = 12.0;
207
+ MTL_ENABLE_DEBUG_INFO = NO;
208
+ SDKROOT = iphoneos;
209
+ VALIDATE_PRODUCT = YES;
210
+ };
211
+ name = Release;
212
+ };
213
+ 58B511F01A9E6C8500147676 /* Debug */ = {
214
+ isa = XCBuildConfiguration;
215
+ buildSettings = {
216
+ HEADER_SEARCH_PATHS = (
217
+ "$(inherited)",
218
+ /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include,
219
+ "$(SRCROOT)/../../../React/**",
220
+ "$(SRCROOT)/../../react-native/React/**",
221
+ );
222
+ LIBRARY_SEARCH_PATHS = "$(inherited)";
223
+ OTHER_LDFLAGS = "-ObjC";
224
+ PRODUCT_NAME = StreamVideoReactNative;
225
+ SKIP_INSTALL = YES;
226
+ SWIFT_OBJC_BRIDGING_HEADER = "StreamVideoReactNative-Bridging-Header.h";
227
+ SWIFT_OPTIMIZATION_LEVEL = "-Onone";
228
+ SWIFT_VERSION = 5.0;
229
+ };
230
+ name = Debug;
231
+ };
232
+ 58B511F11A9E6C8500147676 /* Release */ = {
233
+ isa = XCBuildConfiguration;
234
+ buildSettings = {
235
+ HEADER_SEARCH_PATHS = (
236
+ "$(inherited)",
237
+ /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include,
238
+ "$(SRCROOT)/../../../React/**",
239
+ "$(SRCROOT)/../../react-native/React/**",
240
+ );
241
+ LIBRARY_SEARCH_PATHS = "$(inherited)";
242
+ OTHER_LDFLAGS = "-ObjC";
243
+ PRODUCT_NAME = StreamVideoReactNative;
244
+ SKIP_INSTALL = YES;
245
+ SWIFT_OBJC_BRIDGING_HEADER = "StreamVideoReactNative-Bridging-Header.h";
246
+ SWIFT_VERSION = 5.0;
247
+ };
248
+ name = Release;
249
+ };
250
+ /* End XCBuildConfiguration section */
251
+
252
+ /* Begin XCConfigurationList section */
253
+ 58B511D61A9E6C8500147676 /* Build configuration list for PBXProject "StreamVideoReactNative" */ = {
254
+ isa = XCConfigurationList;
255
+ buildConfigurations = (
256
+ 58B511ED1A9E6C8500147676 /* Debug */,
257
+ 58B511EE1A9E6C8500147676 /* Release */,
258
+ );
259
+ defaultConfigurationIsVisible = 0;
260
+ defaultConfigurationName = Release;
261
+ };
262
+ 58B511EF1A9E6C8500147676 /* Build configuration list for PBXNativeTarget "StreamVideoReactNative" */ = {
263
+ isa = XCConfigurationList;
264
+ buildConfigurations = (
265
+ 58B511F01A9E6C8500147676 /* Debug */,
266
+ 58B511F11A9E6C8500147676 /* Release */,
267
+ );
268
+ defaultConfigurationIsVisible = 0;
269
+ defaultConfigurationName = Release;
270
+ };
271
+ /* End XCConfigurationList section */
272
+ };
273
+ rootObject = 58B511D31A9E6C8500147676 /* Project object */;
274
+ }
@@ -0,0 +1,7 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <Workspace
3
+ version = "1.0">
4
+ <FileRef
5
+ location = "self:">
6
+ </FileRef>
7
+ </Workspace>
@@ -0,0 +1,8 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
3
+ <plist version="1.0">
4
+ <dict>
5
+ <key>IDEDidComputeMac32BitWarning</key>
6
+ <true/>
7
+ </dict>
8
+ </plist>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@stream-io/video-react-native-sdk",
3
- "version": "0.0.1-alpha.384",
3
+ "version": "0.0.1-alpha.386",
4
4
  "packageManager": "yarn@3.2.4",
5
5
  "main": "./dist/index.js",
6
6
  "types": "./dist/index.d.ts",
@@ -19,6 +19,8 @@
19
19
  "files": [
20
20
  "dist",
21
21
  "src",
22
+ "ios",
23
+ "android",
22
24
  "index.ts",
23
25
  "package.json",
24
26
  "README.md",
@@ -27,8 +29,8 @@
27
29
  ],
28
30
  "dependencies": {
29
31
  "@stream-io/i18n": "^0.1.1",
30
- "@stream-io/video-client": "^0.3.6",
31
- "@stream-io/video-react-bindings": "^0.2.7",
32
+ "@stream-io/video-client": "^0.3.7",
33
+ "@stream-io/video-react-bindings": "^0.2.8",
32
34
  "intl-pluralrules": "2.0.1",
33
35
  "lodash.merge": "^4.6.2",
34
36
  "react-native-url-polyfill": "2.0.0",
@@ -9,8 +9,14 @@ import {
9
9
  } from './MediaStreamManagement';
10
10
 
11
11
  export type StreamCallProps = {
12
+ /**
13
+ * Stream Call instance propagated to the component's children as a part of StreamCallContext.
14
+ * Children can access it with useCall() hook.
15
+ */
12
16
  call: Call;
13
-
17
+ /**
18
+ * Provides the initial status of the media devices(audio/video) to the `MediaStreamManagement`.
19
+ */
14
20
  mediaDeviceInitialState?: MediaDevicesInitialState;
15
21
  };
16
22
  /**