2016-05-16 15 views
8

Przez kilka dni pracuję nad quickblox.i utrzymuję widok przeciwnika pod moim widokiem w ten sposób. enter image description hereQuickBlox WebRtc VideoChat Android

Działa dobrze, ale gdy utrzymuję widoki takie jak skype: - Widok przeciwnika jest na pełnym ekranie, a mój widok jest w prawym górnym rogu widoku przeciwnika, renderuje tylko jeden widok, który jest renderowany w końcu. Wyglądam quickblox webrtc Próbka podana na stronie quickblox. widziałem kod w tym przykładzie, ale zawiera on wykład konferencyjny z pewnym skomplikowanym kodowaniem widoku z recyklingu dla mnie Wymagana jest rozmowa jeden do jednego, każdy może mi powiedzieć najlepszy sposób na utrzymanie jednego widoku webrtc nad innym, który działa w sposób doskonały Czy ktoś może mi powiedzieć, jak umieścić jeden webrtc nad drugim.

+0

Nie rozumiem twojego pytania. czy możesz wyjaśnić szczegółowo? – Rajesh

+0

widać na zrzucie ekranu. obecnie mój widok wygląda tak, ale chcę widok taki jak Skype, wielki widok jest widokiem użytkownika przeciwnika Chcę tego widoku na pełnym ekranie i ten mały widok w prawym górnym rogu jest moim widokiem Chcę tego widoku powyżej widoku przeciwnika w prawym górnym rogu corner.I starał się umieścić, ale tylko ostatni widok render jest show. – santoXme

Odpowiedz

2

W moim rozumieniu QuickBlox obsługuje rozmowy wideo w oparciu o pomieszczenia w oparciu o protokół WebRTC. Zarządzają identyfikatorem pokoju, a każdy ma identyfikator pokoju, który może dołączyć do wideo. Możemy stworzyć sesje jeden do jednego z własnym pomysłem. W przypadku układu możemy zmodyfikować układ na swój własny sposób. Sprawdź moją implementację układu i działa mi dobrze.

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