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

v2.26.1 #702

Merged
merged 2 commits into from
Oct 30, 2023
Merged

v2.26.1 #702

merged 2 commits into from
Oct 30, 2023

Conversation

jeffswartz
Copy link
Collaborator

@jeffswartz jeffswartz commented Oct 27, 2023

…ments) (#688)

  • Update modules with npm audit fix

  • Update react and react native modules

  • Adding OTPublisher.setVideoTransformers() method

  • .gitignore android/.gradle files

  • Typo correction

  • Correctly Android VideoTransformer() usage

  • Add live captions API enhancements

  • Marking some issues resolved in the change log

And other docs edits

  • Fix subscribeToCaptions typos

  • Readme correction

  • Fix registration of subscribeToCaptions event

  • Fix typos in captionReceived event implementation

  • Fix OTSubscriber properties -- issue Release 2.25.4 has a coding error in OTSubscriber.js #694 (These were essentially being ignored.)

  • Docs edit

  • Set Subscriber captions delegate and listener

  • docs correction

  • rev version to 2.26.1

Contributing checklist

  • Code must follow existing styling conventions
  • Added a descriptive commit message
  • Sample apps updated if needed

Solves issue(s)

…ments) (#688)

* Bump OpenTok Android and iOS SDK to 2.26.0

* Update modules with npm audit fix

* Update react and react native modules

* Adding OTPublisher.setVideoTransformers() method

* .gitignore android/.gradle files

* Typo correction

* Correctly Android VideoTransformer() usage

* Add live captions API enhancements

* Rev Vonage Video Android and iOS SDKs to 2.26.1

* Marking some issues resolved in the change log

And other docs edits

* Fix subscribeToCaptions typos

* Readme correction

* Fix registration of subscribeToCaptions event

* Fix typos in captionReceived event implementation

* Fix OTSubscriber properties -- issue #694

(These were essentially being ignored.)

* Docs edit

* Set Subscriber captions delegate and listener

* docs correction

* rev version to 2.26.1
@@ -100,6 +101,25 @@ public static List<IceServer> sanitizeIceServer(ReadableArray serverList) {
return iceServers;
}

public static ArrayList<VideoTransformer> sanitizeVideoTransformerList(PublisherKit publisher, ReadableArray transformerList) {
ArrayList<VideoTransformer> nativeVideoTransformers = new ArrayList<>();
if (transformerList != null) {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nit: if you check for this first, you can bail early (e.g., not have to instantiated nativeVideoTransformers).

for (int i = 0; i < transformerList.size(); i++) {
String transformerName = transformerList.getMap(i).getString("name");
if (transformerName == "BackgroundReplacement" ) {
// Only implemented in iOS -- ignore in Androd for now.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nit: misspelled Android.

VideoTransformer transformer = publisher.new VideoTransformer(
transformerName,
transformerList.getMap(i).getString("properties")
);
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nit: might be simpler to use a map since you're taking an "input list" and removing filters that aren't part of your "allowed list".

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@v-kpheng an you please clarify? The transformerList parameter is a ReadableArray (not a map), since the corresponding JavaScript object is an array. And it is an array of objects (in JavaScript), so we are calling getMap() here. We don't have an "allowed list" of filters (but we do ignore BackgroundReplacement in Android, for now).

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

NM -- i read too much given we're just ignoring BackgroundReplacement.


```javascript
event = {
text: string,
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For JS SDK, the caption is returned as caption but for React Native, it's returned as text. Was this intentional?

@@ -27,6 +27,7 @@ const sanitizeSubscriberEvents = (events) => {
videoDisableWarning: 'subscriberVideoDisableWarning',
videoDisableWarningLifted: 'subscriberVideoDisableWarningLifted',
videoDataReceived: 'subscriberVideoDataReceived',
captionReceived: 'subscriberCaptionReceived:',
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks like a stray colon.

@v-kpheng v-kpheng self-requested a review October 30, 2023 18:05
Copy link
Collaborator

@v-kpheng v-kpheng left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! 💪 🚀

@jeffswartz jeffswartz merged commit 2c3d9c4 into main Oct 30, 2023
6 of 9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants