首页 > 解决方案 > Adding Name and Image at the bottom of Opentok Publisher's Stream and It should be visible on the Subscriber's end by default

问题描述

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...

标签: androidopentoktokbox

解决方案


要在您的发布者发送的流上绘制一些文本和图像,您有两种选择:

  1. 您可以构建一个自定义捕获器,它将文本和图像呈现在代表来自相机的每一帧的字节缓冲区上,然后将其提供给 OpenTok。这种方式有点挑战性,因为您可能需要一个库来将文本和图像渲染到原始 YUV 字节缓冲区中。

  2. 您可以将相机的内容渲染到 Android 视图,并借助 Android 布局(FrameLayout 在这里可以很好地工作)使用 Android 视图(如 TextView 和 ImageView)渲染文本和图像。一切就绪后,您的发布者将像我们的屏幕共享示例一样发送组合 Android 视图的内容。


推荐阅读