Class VideoPlaneLocal
- java.lang.Object
-
- com.avaya.clientservices.media.gui.Plane
-
- com.avaya.clientservices.media.gui.PipPlane
-
- com.avaya.clientservices.media.gui.VideoPlaneLocal
-
- All Implemented Interfaces:
Positionable
,Renderable
,Touchable
public class VideoPlaneLocal extends PipPlane
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class com.avaya.clientservices.media.gui.PipPlane
PipPlane.Corner
-
-
Constructor Summary
Constructors Constructor Description VideoPlaneLocal(android.content.Context context)
Constructor
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
onDrawFrame(double time)
void
onSurfaceChanged(int width, int height)
void
onSurfaceCreated()
boolean
onTouchEvent(double time, android.view.MotionEvent event, int surfaceHeight)
void
setLocalBitmapPlane(BitmapPlane localBitmapPlane)
Sets the bitmap plane drawn over the local video layer.void
setLocalVideoHidden(boolean localVideoHidden)
Sets whether the local video layer is visible or not.void
setLocalVideoHidden(boolean localVideoHidden, double duration)
Sets whether the local video layer is visible or not.void
setLocalVideoLayer(VideoLayerLocal localVideoLayer)
Sets the local video layer.void
setLocalVideoSize(int width, int height)
Sets the local video size; usually in response toVideoLayerListener.onVideoFrameSizeChanged(int, int)
.void
setPipAbsWidth(int pipAbsWidth)
Sets the absolute width of the picture-in-picture.void
setPlane(Plane plane)
Sets the plane beneath the local video layer.void
setRunningOnTablet(boolean runningOnTablet)
Sets flag indicating if we are running on a tablet.-
Methods inherited from class com.avaya.clientservices.media.gui.PipPlane
getPipCorner, setPipCorner, setPipInsetBottom, setPipInsetTop
-
Methods inherited from class com.avaya.clientservices.media.gui.Plane
containsPoint, setBounds, setPosition, setRenderer, setVisibility, time
-
-
-
-
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; otherwisefalse
.
-
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; otherwisefalse
.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 toVideoLayerListener.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 ofPlaneRenderer.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.
-
-