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

Fix subscribeToSelf -- Fixes #612 #740

Merged
merged 5 commits into from
Jun 4, 2024
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
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@

- [Fix]: Calling `OTSubscriber.getRtcStatsReport()` method was resulting in an error. This version fixes the issue.

- [Fix] The `subscribeToSelf` prop of the OTSubscriber component was not working. This version fixes the issue (issue #612).

# 2.27.4 (April 2024)

- [Update]: This version updates the Vonage Video iOS SDK version to 2.27.3. This version adds a [privacy manifest required by Apple's App store](https://developer.apple.com/support/third-party-SDK-requirements). Issue #737.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -883,9 +883,10 @@ public void onStreamCreated(PublisherKit publisherKit, Stream stream) {
ConcurrentHashMap<String, Stream> mSubscriberStreams = sharedState.getSubscriberStreams();
mSubscriberStreams.put(stream.getStreamId(), stream);
if (publisherId.length() > 0) {
String event = publisherId + ":" + publisherPreface + "onStreamCreated";;
String event = publisherId + ":" + publisherPreface + "onStreamCreated";
WritableMap streamInfo = EventUtils.prepareJSStreamMap(stream, publisherKit.getSession());
sendEventMap(this.getReactApplicationContext(), event, streamInfo);
sendEventMap(this.getReactApplicationContext(), "publisherStreamCreated", streamInfo);
}
printLogs("onStreamCreated: Publisher Stream Created. Own stream "+stream.getStreamId());

Expand All @@ -902,6 +903,7 @@ public void onStreamDestroyed(PublisherKit publisherKit, Stream stream) {
if (publisherId.length() > 0) {
WritableMap streamInfo = EventUtils.prepareJSStreamMap(stream, publisherKit.getSession());
sendEventMap(this.getReactApplicationContext(), event, streamInfo);
sendEventMap(this.getReactApplicationContext(), "publisherStreamDestroyed", streamInfo);
}
Callback mCallback = sharedState.getPublisherDestroyedCallbacks().get(publisherId);
if (mCallback != null) {
Expand Down
2 changes: 2 additions & 0 deletions ios/OpenTokReactNative/OTSessionManager.swift
Original file line number Diff line number Diff line change
Expand Up @@ -647,6 +647,7 @@ extension OTSessionManager: OTPublisherDelegate {
OTRN.sharedState.isPublishing[publisherId] = true;
let streamInfo: Dictionary<String, Any> = EventUtils.prepareJSStreamEventData(stream);
self.emitEvent("\(publisherId):\(EventUtils.publisherPreface)streamCreated", data: streamInfo);
self.emitEvent("publisherStreamCreated", data: streamInfo);
setStreamObservers(stream: stream, isPublisherStream: true)
}
printLogs("OTRN: Publisher Stream created")
Expand All @@ -662,6 +663,7 @@ extension OTSessionManager: OTPublisherDelegate {
OTRN.sharedState.isPublishing[publisherId] = false;
let streamInfo: Dictionary<String, Any> = EventUtils.prepareJSStreamEventData(stream);
self.emitEvent("\(publisherId):\(EventUtils.publisherPreface)streamDestroyed", data: streamInfo);
self.emitEvent("publisherStreamDestroyed", data: streamInfo);
}
OTRN.sharedState.publishers[publisherId] = nil;
OTRN.sharedState.isPublishing[publisherId] = nil;
Expand Down
Loading