Class VideoPlaneLocal

    • Constructor Detail

      • VideoPlaneLocal

        public VideoPlaneLocal​(android.content.Context context)
        Constructor
        Parameters:
        context - parent context
    • Method Detail

      • setRunningOnTablet

        public void setRunningOnTablet​(boolean runningOnTablet)
        Sets flag indicating if we are running on a tablet.
        Parameters:
        runningOnTablet - flag indicating if we are running on a tablet.
      • onSurfaceCreated

        public void onSurfaceCreated()
      • onSurfaceChanged

        public void onSurfaceChanged​(int width,
                                     int height)
      • onDrawFrame

        public void onDrawFrame​(double time)
      • onTouchEvent

        public boolean onTouchEvent​(double time,
                                    android.view.MotionEvent event,
                                    int surfaceHeight)
      • setLocalVideoHidden

        public void setLocalVideoHidden​(boolean localVideoHidden)
        Sets whether the local video layer is visible or not.
        Parameters:
        localVideoHidden - true if the local video layer should be hidden; otherwise false.
      • setLocalVideoHidden

        public void setLocalVideoHidden​(boolean localVideoHidden,
                                        double duration)
        Sets whether the local video layer is visible or not.
        Parameters:
        localVideoHidden - true if the local video layer should be hidden; otherwise false.
        duration - the amount of time over which to animate (in seconds).
      • setLocalVideoLayer

        public void setLocalVideoLayer​(VideoLayerLocal localVideoLayer)
        Sets the local video layer.
        Parameters:
        localVideoLayer - the local video layer.
      • setLocalVideoSize

        public void setLocalVideoSize​(int width,
                                      int height)
        Sets the local video size; usually in response to VideoLayerListener.onVideoFrameSizeChanged(int, int).
        Parameters:
        width - the width of the video frame.
        height - the height of the video frame.
      • setPipAbsWidth

        public void setPipAbsWidth​(int pipAbsWidth)
        Sets the absolute width of the picture-in-picture.

        The pip height is always calculated by applying the aspect ratio to the pip width.

        • Values greater than zero will force the pip to have a static width.
        • Values less than or equal to zero will allow the pip to have a dynamic width that scales with the plane's bounds.

        The absolute width is specified in absolute pixels. The following code is necessary to convert density independent pixels into absolute pixels:

         DisplayMetrics metrics = new DisplayMetrics();
         getActivity().getWindowManager().getDefaultDisplay().getMetrics(metrics);
         
         videoPlaneLocal.setPipAbsWidth(Math.round(width * metrics.density));
         
        Parameters:
        pipAbsWidth - the absolute width of the pip.
      • setPlane

        public void setPlane​(Plane plane)
        Sets the plane beneath the local video layer. The implementation closely follows that of PlaneRenderer.setPlane(Plane).
        Parameters:
        plane - the plane to set.
      • setLocalBitmapPlane

        public void setLocalBitmapPlane​(BitmapPlane localBitmapPlane)
        Sets the bitmap plane drawn over the local video layer.
        Parameters:
        localBitmapPlane - the bitmap plane to set.