Class: EnxPlayerView

EnxPlayerView is a video renderer to be used by an EnxStream Object.

To initialize EnxPlayerView:

EnxPlayerView enxPlayerView = new EnxPlayerView(Current-Class-Instance,scalingType,mediaOverLay);

So, the playerview initialization process would require four parameters:

Parameter Description
this Current class instance.
scalingType pass an enum object for scaling of video.
mediaOverLay used to place overlays on top of an underlying media surface view

Methods:

Method Name Description
setZOrderMediaOverlay(boolean mediaOverLay) Used to place overlays on top of an underlying media player view.
setScalingType(ScalingType scalingType) To Scale EnxPlayerView at runtime.
release() To release EnxPlayerView.
enablePlayerStats(boolean boolStats,EnxPlayerStatsObserver enxPlayerStatsObserver) In order to enable stats on player level.
captureScreenShot (EnxScreenShotObserver enxScreenShotObserver) This APIs help to take a screenshot of a particular stream.


Overlays on playerview

Used to place overlays on top of an underlying media player view.

public void setZOrderMediaOverlay(boolean mediaOverLay)

Parameter:

Parameters Description
mediaOverLay Its a boolean value to achieve overlays on top of an underlying media surface view.


Scale EnxPlayerView

Used to Scale playerview at runtime.

public void setScalingType(ScalingType scalingType)

Parameter:

Parameters Description
scalingType pass a enum object for scaling of video.


Release

This API is used to release EnxPlayerView.

public void release()


EnxScreenShot Observer

This APIs help to capture as a screenshot of a live particular stream.

public void captureScreenShot(EnxScreenShotObserver enxScreenShotObserver)

Parameter:

Parameters Description
current-class-instance Current class instance

Callback : This callback return bitmap which needs to save as a file.
public void OnCapturedView(Bitmap bitmap)


EnxPlayerStats Observer

In order to receive the stats on player level, enable the stats by using following method:

public void enablePlayerStats(boolean boolStats,EnxPlayerStatsObserver enxPlayerStatsObserver)

Parameter:

Parameters Description
boolStats true/false
current-class-instance Current class instance

Callback : Callback for EnxPlayerStats Observer

Callbacks Description
onPlayerStats(JSONObject jsonObject) Receive when stats gets updated on player level.