几天我正在研究quickblox.i让对手观点在我的观点下面,如this.

它工作正常,但是当我保持像skype这样的视图时: – 对手视图在全屏幕上,我的视图位于对手视图的右上角,它只渲染一个最终渲染的视图.
我在quickblox网站上看了quickblox webrtc示例.我看到了该示例中的代码,但它包含了一些会议对话,其中包含一些复杂的循环视图编码,对我来说,单个一对一的谈话是必需的,任何人都可以告诉我将一个webrtc视图保持在另一个上面的最佳方式,以完美的方式工作任何人都可以告诉我如何将一个webrtc放在另一个上面.

解决方法

在我的理解中,QuickBlox正在处理基于WebRTC协议的基于房间的视频聊天.他们正在管理房间ID,任何有房间ID的人都可以加入视频.我们可以用自己的想法创建一对一的会话.
在布局的情况下,我们可以用自己的方式修改布局.请检查我的布局实施及其工作正常.
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:tools="http://schemas.android.com/tools"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    tools:context=".MainActivity">

    <RelativeLayout
        android:id="@+id/rl_video_container"
        android:layout_width="match_parent"
        android:layout_height="match_parent">

        <ImageView
            android:id="@+id/iv_hang_up_icon"
            android:layout_width="@dimen/app_video_screen_icon_width_height"
            android:layout_height="@dimen/app_video_screen_icon_width_height"
            android:layout_alignParentRight="true"
            android:layout_alignParentTop="true"
            android:layout_marginRight="@dimen/activity_horizontal_margin"
            android:layout_marginTop="@dimen/activity_horizontal_margin"
            android:background="@mipmap/hung_up" />

        <android.support.v4.view.ViewPager
            android:id="@+id/pager"
            android:layout_width="match_parent"
            android:layout_height="match_parent"
            android:visibility="gone"
            android:layout_gravity="top">

            <android.support.v4.view.PagerTitleStrip
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_gravity="top"
                android:background="@color/app_text_icon_color" />

        </android.support.v4.view.ViewPager>

        <RelativeLayout
            android:id="@+id/preview"
            android:layout_width="100dp"
            android:layout_height="100dp"
            android:layout_alignParentBottom="true"
            android:layout_alignParentRight="true"
            android:layout_margin="@dimen/app_common_five_dp_padding" />
    </RelativeLayout>

    <RelativeLayout
        android:id="@+id/rl_patient_info_container"
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:background="@android:color/transparent"
        android:gravity="bottom">

        <LinearLayout
            android:id="@+id/ll_patient_details_container"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:layout_margin="@dimen/app_common_five_dp_padding"
            android:orientation="vertical">

            <com.adoctortalk.android.utilities.CustomTxtViewBold
                android:id="@+id/tv_patient_name"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_marginBottom="@dimen/app_common_five_dp_padding"
                android:layout_marginLeft="@dimen/app_common_ten_dp_padding"
                android:layout_marginTop="@dimen/app_common_five_dp_padding"
                android:text="New Text"
                android:textColor="@color/app_text_icon_color"
                android:textSize="@dimen/application_font_size_very_large" />

            <com.adoctortalk.android.utilities.CustomTxtViewBold
                android:id="@+id/tv_patient_sub_info"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_marginBottom="@dimen/app_common_five_dp_padding"
                android:layout_marginLeft="@dimen/app_common_ten_dp_padding"
                android:layout_marginTop="@dimen/app_common_five_dp_padding"
                android:text="New Text"
                android:textColor="@color/app_text_icon_color"
                android:textSize="@dimen/application_font_size_large" />

            <LinearLayout
                android:id="@+id/ll_patient_action_cotainer"
                android:layout_width="match_parent"
                android:layout_height="match_parent"
                android:layout_marginBottom="@dimen/app_common_five_dp_padding"
                android:layout_margin="@dimen/app_common_five_dp_padding"
                android:orientation="horizontal"
                android:visibility="visible">

                <ImageView
                    android:id="@+id/iv_profile_icon"
                    android:layout_width="@dimen/app_video_screen_icon_width_height"
                    android:layout_height="@dimen/app_video_screen_icon_width_height"
                    android:layout_marginRight="@dimen/app_common_five_dp_padding"
                    android:background="@mipmap/profile" />

                <ImageView
                    android:id="@+id/iv_medical_notes_icon"
                    android:layout_width="@dimen/app_video_screen_icon_width_height"
                    android:layout_height="@dimen/app_video_screen_icon_width_height"
                    android:layout_marginLeft="@dimen/app_common_five_dp_padding"
                    android:layout_marginRight="@dimen/app_common_five_dp_padding"
                    android:background="@mipmap/medical_notes" />

                <ImageView
                    android:id="@+id/iv_prescription_icon"
                    android:layout_width="@dimen/app_video_screen_icon_width_height"
                    android:layout_height="@dimen/app_video_screen_icon_width_height"
                    android:layout_marginLeft="@dimen/app_common_five_dp_padding"
                    android:layout_marginRight="@dimen/app_common_five_dp_padding"
                    android:background="@mipmap/prescription" />

                <ImageView
                    android:id="@+id/iv_attachment_icon"
                    android:layout_width="@dimen/app_video_screen_icon_width_height"
                    android:layout_height="@dimen/app_video_screen_icon_width_height"
                    android:layout_marginLeft="@dimen/app_common_five_dp_padding"
                    android:layout_marginRight="@dimen/app_common_five_dp_padding"
                    android:background="@mipmap/attachments" />
            </LinearLayout>
        </LinearLayout>

        <RelativeLayout
            android:id="@+id/rl_video_fragmnet_container"
            android:layout_width="match_parent"
            android:layout_height="match_parent"
            android:layout_below="@+id/ll_patient_details_container"
            android:visibility="gone"></RelativeLayout>
    </RelativeLayout>

</RelativeLayout>

QuickBlox WebRtc VideoChat Android的更多相关文章

  1. canvas绘制视频封面的方法

    这篇文章主要介绍了canvas绘制视频封面的方法的相关资料,小编觉得挺不错的,现在分享给大家,也给大家做个参考。一起跟随小编过来看看吧

  2. 使用Html5多媒体实现微信语音功能

    这篇文章主要介绍了使用Html5多媒体实现微信语音功能,需要的朋友可以参考下

  3. html5自定义video标签的海报与播放按钮功能

    这篇文章主要介绍了html5自定义video标签的海报与播放按钮功能,非常不错,具有一定的参考借鉴价值,需要的朋友可以参考下

  4. html5 canvas合成海报所遇问题及解决方案总结

    这篇文章主要介绍了html5 canvas合成海报所遇问题及解决方案总结,小编觉得挺不错的,现在分享给大家,也给大家做个参考。一起跟随小编过来看看吧

  5. html5中canvas图表实现柱状图的示例

    本篇文章主要介绍了html5中canvas图表实现柱状图的示例,本文使用canvas来实现一个图表,小编觉得挺不错的,现在分享给大家,也给大家做个参考。一起跟随小编过来看看吧

  6. 有关HTML5页面在iPhoneX适配问题

    这篇文章主要介绍了有关HTML5页面在iPhoneX适配问题,需要的朋友可以参考下

  7. html5 移动端视频video的android兼容(去除播放控件、全屏)

    这篇文章主要介绍了html5 移动端视频video的android兼容,文中通过示例代码介绍的非常详细,对大家的学习或者工作具有一定的参考学习价值,需要的朋友们下面随着小编来一起学习学习吧

  8. Html5 video标签视频的最佳实践

    这篇文章主要介绍了Html5 video标签视频的最佳实践,文中通过示例代码介绍的非常详细,对大家的学习或者工作具有一定的参考学习价值,需要的朋友们下面随着小编来一起学习学习吧

  9. Html5 页面适配iPhoneX(就是那么简单)

    这篇文章主要介绍了Html5 页面适配iPhoneX(就是那么简单),文中通过示例代码介绍的非常详细,对大家的学习或者工作具有一定的参考学习价值,需要的朋友们下面随着小编来一起学习学习吧

  10. 使用HTML5加载音频和视频的实现代码

    这篇文章主要介绍了使用HTML5加载音频和视频的实现代码,本文给大家介绍的非常详细,对大家的学习或工作具有一定的参考借鉴价值,需要的朋友可以参考下

随机推荐

  1. bluetooth-lowenergy – Altbeacon库无法在Android 5.0上运行

    昨天我在Nexus4上获得了Android5.0的更新,并且altbeacon库停止了检测信标.似乎在监视和测距时,didEnterRegion和didRangeBeaconsInRegion都没有被调用.即使RadiusNetworks的Locate应用程序现在表现不同,一旦检测到信标的值,它们就不再得到更新,并且通常看起来好像信标超出了范围.我注意到的一点是,现在在logcat中出现以下行“B

  2. android – react-native动态更改响应者

    我正在使用react-native进行Android开发.我有一个视图,如果用户长按,我想显示一个可以拖动的动画视图.我可以使用PanResponder实现这一点,它工作正常.但我想要做的是当用户长按时,用户应该能够继续相同的触摸/按下并拖动新显示的Animated.View.如果您熟悉Google云端硬盘应用,则它具有类似的功能.当用户长按列表中的任何项目时,它会显示可拖动的项目.用户可以直接拖

  3. android – 是否有可能通过使用与最初使用的证书不同的证书对其进行签名来发布更新的应用程序

    是否可以通过使用与最初使用的证书不同的证书进行签名来发布Android应用程序的更新?我知道当我们尝试将这样的构建上传到市场时,它通常会给出错误消息.但有没有任何出路,比如将其标记为主要版本,指定市场中的某个地方?解决方法不,你不能这样做.证书是一种工具,可确保您是首次上传应用程序的人.所以总是备份密钥库!

  4. 如何检测Android中是否存在麦克风?

    ..所以我想在让用户访问语音输入功能之前检测麦克风是否存在.如何检测设备上是否有麦克风.谢谢.解决方法AndroidAPI参考:hasSystemFeature

  5. Android – 调用GONE然后VISIBLE使视图显示在错误的位置

    我有两个视图,A和B,视图A在视图B上方.当我以编程方式将视图A设置为GONE时,它将消失,并且它正下方的视图将转到视图A的位置.但是,当我再次将相同的视图设置为VISIBLE时,它会在视图B上显示.我不希望这样.我希望视图B回到原来的位置,这是我认为会发生的事情.我怎样才能做到这一点?编辑–代码}这里是XML:解决方法您可以尝试将两个视图放在RelativeLayout中并相对于彼此设置它们的位置.

  6. android – 获得一首歌的流派

    我如何阅读与歌曲相关的流派?我可以读这首歌,但是如何抓住这首歌的流派,它存放在哪里?解决方法检查此代码:

  7. android – 使用textShadow折叠工具栏

    我有一个折叠工具栏的问题,在展开状态我想在文本下面有一个模糊的阴影,我使用这段代码:用:我可以更改textColor,它可以工作,但阴影不起作用.我为阴影尝试了很多不同的值.是否可以为折叠文本投射阴影?

  8. android – 重用arm共享库

    我已经建立了armarm共享库.我有兴趣重用一个函数.我想调用该函数并获得返回值.有可能做这样的事吗?我没有任何头文件.我试过这个Android.mk,我把libtest.so放在/jni和/libs/armeabi,/lib/armeabi中.此时我的cpp文件编译,但现在是什么?我从objdump知道它的名字编辑:我试图用这个android.mk从hello-jni示例中添加prebuild库:它工作,但libtest.so相同的代码显示以下错误(启动时)libtest.so存在于libhello-j

  9. android – 为NumberPicker捕获键盘’Done’

    我有一个AlertDialog只有一些文本,一个NumberPicker,一个OK和一个取消.(我知道,这个对话框还没有做它应该保留暂停和恢复状态的事情.)我想在软键盘或其他IME上执行“完成”操作来关闭对话框,就像按下了“OK”一样,因为只有一个小部件可以编辑.看起来处理IME“Done”的最佳方法通常是在TextView上使用setonEditorActionListener.但我没有任何Te

  10. android – 想要在调用WebChromeClient#onCreateWindow时知道目标URL

    当我点击一个带有target=“_blank”属性的超链接时,会调用WebChromeClient#onCreateWindow,但我找不到新的窗口将打开的新方法?主页url是我唯一能知道的东西?我想根据目标网址更改应用行为.任何帮助表示赞赏,谢谢!

返回
顶部