3
votes

I am trying to develop an application with the help of OpenTok where I need to add Name of the user as well as the logo of my application on the publisher's stream. Why am I focusing on the Stream? The reason is if I use some kind of overlay on my publisher's window It would only be visible on my side but on the Subscriber's side, It would show the normal video stream from my camera. As I have archiving feature enabled on OpenTok it records my live streaming and stores it on my server so I can also not do the same overlay stuff on the subscriber side.

How can I achieve this thing? Thanks in advance...

1

1 Answers

2
votes

For drawing some text and image over the stream your publisher is sending you have two alternatives:

  1. You can build a custom capturer that will render the text and image over the byte buffer that represents each frame coming from the camera just before providing it to OpenTok. This way is a little bit challenging since you will probably need a library to render text and images into a raw YUV byte buffer.

  2. You can render the contents of the camera to an Android View, and with the help of Android Layouts (FrameLayout will work well here) render the text and image using Android Views like TextView and ImageView. Once you have everything in place, your publisher will send the content of the composed Android View like in our screen sharing sample.