PlayerConfig

This class provides methods relevant to player settings.

public class PlayerConfig {
  public void setAutoPlay(boolean autoPlay) throws RteException;
  public boolean getAutoPlay() throws RteException;
  public void setAbrSubscriptionLayer(Constants.AbrSubscriptionLayer subscriptionLayer) throws RteException;
  public Constants.AbrSubscriptionLayer getAbrSubscriptionLayer() throws RteException;
  public void setAbrFallbackLayer(Constants.AbrFallbackLayer fallbackLayer) throws RteException;
  public Constants.AbrFallbackLayer getAbrFallbackLayer() throws RteException;
}
Since
v4.5.0

Method

setAutoPlay
The error code. See setAutoPlay.
getAutoPlay
Gets the autoplay settings. See getAutoPlay.

getAutoPlay

Gets the autoplay settings.

public boolean getAutoPlay() throws RteException;
Since
v4.5.0

You can call this method to get the autoplay settings of the current player.

Call timing

Call this method after getConfigs [2/3].

Restrictions

None.

Returns

Whether the autoplay settings are retrieved:
  • true: Yes.
  • false: No.

Exception

If the method call fails, the SDK throws RteException and returns an error message. You need to catch the exception and handle it.

setAutoPlay

The error code.

public void setAutoPlay(boolean autoPlay) throws RteException;
Since
v4.5.0

Before you call openWithUrl to open the media stream, you can call this method to set whether to enable autoplay. The default setting is to enable autoplay.

Call timing

Call this method after openWithUrl.

Restrictions

None.

Parameters

autoPlay
Whether to enable autoplay:
  • true: (Default) Yes.
  • false: No.

Exception

If the method call fails, the SDK throws RteException and returns an error message. You need to catch the exception and handle it.