首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >QuickBlox WebRtc VideoChat安卓系统

QuickBlox WebRtc VideoChat安卓系统
EN

Stack Overflow用户
提问于 2016-05-16 15:19:43
回答 1查看 225关注 0票数 8

几天来我一直在做Quickblox.我像这样让对手的视线低于我的视线.

它工作得很好,但当我保持像skype这样的视图时:-对手视图是全屏的,而我的视图在对手视图的右上角,它只渲染一个视图,最后渲染。我看了一下quickblox网站上给出的webrtc示例。我在示例中看到了代码,但它包含了一些复杂的会议讨论,给了我一些复杂的循环视图编码,需要一个一对一的对话,谁能告诉我最好的方法来保持一个webrtc视图在另一个之上,这在完美的manner.Can工作任何人告诉我如何把一个webrtc放在另一个之上。

EN

回答 1

Stack Overflow用户

发布于 2016-06-01 17:58:58

在我的理解中,QuickBlox是基于WebRTC协议的基于房间的视频聊天。他们正在管理一个房间ID,任何获得房间id的人都可以加入视频。我们可以用自己的想法创建一对一的会话。在布局的情况下,我们可以用自己的方式修改布局。请检查我的布局实现,它对我来说工作正常。

代码语言:javascript
复制
<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>
票数 2
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/37248670

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档