-
Notifications
You must be signed in to change notification settings - Fork 156
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
v2.26.1 #702
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,6 +3,7 @@ | |
import com.opentok.android.OpentokError; | ||
import com.opentok.android.Publisher; | ||
import com.opentok.android.PublisherKit; | ||
import com.opentok.android.PublisherKit.VideoTransformer; | ||
import com.opentok.android.Subscriber; | ||
import com.opentok.android.SubscriberKit; | ||
import com.opentok.android.Session.Builder.TransportPolicy; | ||
|
@@ -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) { | ||
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. | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Nit: misspelled Android. |
||
continue; | ||
} | ||
VideoTransformer transformer = publisher.new VideoTransformer( | ||
transformerName, | ||
transformerList.getMap(i).getString("properties") | ||
); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Nit: might be simpler to use a There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @v-kpheng an you please clarify? The There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. NM -- i read too much given we're just ignoring BackgroundReplacement. |
||
nativeVideoTransformers.add(transformer); | ||
} | ||
} | ||
return nativeVideoTransformers; | ||
} | ||
|
||
public static VideoContentHint convertVideoContentHint(String videoContentHint) { | ||
|
||
switch (videoContentHint) { | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -79,6 +79,18 @@ The event object has the following properties: | |
}; | ||
``` | ||
|
||
## SubscriberCaptionEvent | ||
|
||
To get captions for a subscriber, register an event listener for the `captionReceived` event. | ||
The event object has the following properties: | ||
|
||
```javascript | ||
event = { | ||
text: string, | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. For JS SDK, the caption is returned as |
||
isFinal: boolean, | ||
}; | ||
``` | ||
|
||
## ConnectionCreatedEvent | ||
|
||
You can find the structure of the object below: | ||
|
There was a problem hiding this comment.
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
).