Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merge main into develop #679

Merged
merged 4 commits into from
Jul 5, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 25 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,28 @@
# 2.25.2 (July 5 2023)

- [Fix]: Fix crash on iOS when publishing a screen-sharing stream.

# 2.25.1 (June 27 2023)

- [Fix]: Fix camera lifecycle on Android. - issue #645

# 2.25.0 (May 17 2023)

- [Update]: Update OpenTok Android SDK and OpenTok iOS SDK to version 2.25.1.

Note that with this version, we are pinning the major and minor release versions
(2.25) to match the corresponding versions in the OpenTok Android and iOS SDKs.

For iOS, note that this version supports iOS 13+, removes support for FAT binaries
and drops 32-bit support. The OpenTok iOS SDK is now available as the OTXCFramework
Pod file. (The OpenTok pod file was for FAT binaries.)

See the release notes for the OpenTok [ioS SDK](https://tokbox.com/developer/sdks/ios/release-notes.html)
and the [Android SDK](https://tokbox.com/developer/sdks/android/release-notes.html).

- [Fix]: Fixes an issue in which applications could not connect to a session when
the `proxyUrl` option for OTSession was set. - issue #645

# 0.21.4 (April 12 2023)

- [Update]: Revert OpenTok iOS SDK back 2.23.1. There are issues with
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ If you've installed this package before, you may need to edit your `Podfile` and
target '<YourProjectName>' do

# Pods for <YourProject>
pod 'OpenTok', '2.23.1'
pod 'OTXCFramework', '2.25.1'
end

```
Expand Down
2 changes: 1 addition & 1 deletion android/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -27,5 +27,5 @@ android {
dependencies {
implementation fileTree(dir: "libs", include: ["*.jar"])
implementation "com.facebook.react:react-native:${_reactNativeVersion}" // From node_modules
implementation 'com.opentok.android:opentok-android-sdk:2.24.2'
implementation 'com.opentok.android:opentok-android-sdk:2.25.1'
}
35 changes: 33 additions & 2 deletions android/src/main/java/com/opentokreactnative/OTSessionManager.java
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,15 @@
* Created by manik on 1/29/18.
*/

import android.os.Build;
import android.util.Log;
import android.widget.FrameLayout;
import android.view.View;

import androidx.annotation.Nullable;

import com.facebook.react.bridge.Arguments;
import com.facebook.react.bridge.Callback;
import com.facebook.react.bridge.LifecycleEventListener;
import com.facebook.react.bridge.ReactApplicationContext;
import com.facebook.react.bridge.ReactContext;
import com.facebook.react.bridge.ReactContextBaseJavaModule;
Expand Down Expand Up @@ -56,7 +57,9 @@ public class OTSessionManager extends ReactContextBaseJavaModule
SubscriberKit.AudioStatsListener,
SubscriberKit.VideoStatsListener,
SubscriberKit.VideoListener,
SubscriberKit.StreamListener{
SubscriberKit.StreamListener,
LifecycleEventListener
{

private ConcurrentHashMap<String, Integer> connectionStatusMap = new ConcurrentHashMap<>();
private ArrayList<String> jsEvents = new ArrayList<String>();
Expand All @@ -72,6 +75,7 @@ public OTSessionManager(ReactApplicationContext reactContext) {

super(reactContext);
sharedState = OTRN.getSharedState();
reactContext.addLifecycleEventListener(this);
}

@ReactMethod
Expand Down Expand Up @@ -981,5 +985,32 @@ public void onStreamVideoTypeChanged(Session session, Stream stream, Stream.Stre
sendEventMap(this.getReactApplicationContext(), session.getSessionId() + ":" + sessionPreface + "onStreamPropertyChanged", eventData);
printLogs("onStreamVideoTypeChanged");
}
@Override
public void onHostResume() {
ConcurrentHashMap<String, Publisher> mPublishers = sharedState.getPublishers();

for (String key: mPublishers.keySet()) {
Publisher publisher = mPublishers.get(key);

if (publisher != null) {
publisher.onResume();
}
}
}

@Override
public void onHostPause() {
ConcurrentHashMap<String, Publisher> mPublishers = sharedState.getPublishers();

for (String key: mPublishers.keySet()) {
Publisher publisher = mPublishers.get(key);

if (publisher != null) {
publisher.onPause();
}
}
}
@Override
public void onHostDestroy() {}

}
5 changes: 2 additions & 3 deletions docs/OTSession.md
Original file line number Diff line number Diff line change
Expand Up @@ -150,9 +150,8 @@ The default value is false.

**isCamera2Capable** (Boolean) -- Deprecated and ignored. Android only.

**proxyUrl**

The proxy URL. This is an [add-on feature](https://www.vonage.com/communications-apis/video/pricing//plans)
**proxyUrl** (String) -- The proxy URL to use for the session.
This is an [add-on feature](https://www.vonage.com/communications-apis/video/pricing//plans)
feature. See the [OpenTok IP Proxy](https://tokbox.com/developer/guides/ip-proxy/) developer guide.

**useTextureViews** (Boolean) -- Set to `true` to use texture views. The default is `false`. Android only.
Expand Down
11 changes: 0 additions & 11 deletions ios/OpenTokReactNative/OTScreenCapture.h
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,6 @@

@protocol OTVideoCapture;

// defines for image scaling
// From https://bugs.chromium.org/p/webrtc/issues/detail?id=4643#c7 :
// Don't send any image larger than 1280px on either edge. Additionally, don't
// send any image with dimensions %16 != 0
#define MAX_EDGE_SIZE_LIMIT 1280.0f
#define EDGE_DIMENSION_COMMON_FACTOR 16.0f

/**
* Periodically sends video frames to an OpenTok Publisher by rendering the
* CALayer for a UIView.
Expand All @@ -30,9 +23,5 @@
*/
- (instancetype)initWithView:(UIView*)view;

// private: declared here for testing scaling & padding function
+ (void)dimensionsForInputSize:(CGSize)input
containerSize:(CGSize*)destContainerSize
drawRect:(CGRect*)destDrawRect;

@end
Loading
Loading