Esempio n. 1
0
 private void attachSubscriberView(Subscriber subscriber) {
   RelativeLayout.LayoutParams layoutParams =
       new RelativeLayout.LayoutParams(
           getResources().getDisplayMetrics().widthPixels,
           getResources().getDisplayMetrics().heightPixels);
   mSubscriberViewContainer.removeView(mSubscriber.getView());
   mSubscriberViewContainer.addView(mSubscriber.getView(), layoutParams);
   subscriber.setStyle(BaseVideoRenderer.STYLE_VIDEO_SCALE, BaseVideoRenderer.STYLE_VIDEO_FILL);
 }
Esempio n. 2
0
        @Override
        public void onVideoDataReceived(SubscriberKit subscriber) {

          mSubscriber.setStyle(
              BaseVideoRenderer.STYLE_VIDEO_SCALE, BaseVideoRenderer.STYLE_VIDEO_FILL);
          ViewGroup frame = mCallback.getSubscribtionFrame();
          frame.removeAllViews();
          RelativeLayout.LayoutParams params =
              new RelativeLayout.LayoutParams(LayoutParams.MATCH_PARENT, LayoutParams.MATCH_PARENT);
          frame.removeAllViews();
          View subscriberView = mSubscriber.getView();
          frame.removeView(subscriberView);
          frame.addView(subscriberView, params);
        }