PlayerConfig
This class provides methods relevant to player settings.
class PlayerConfig { public: void SetAutoPlay(bool auto_play, Error *err = nullptr); bool GetAutoPlay(Error *err = nullptr); void SetAbrSubscriptionLayer(AbrSubscriptionLayer abr_subscription_layer, Error *err = nullptr); AbrSubscriptionLayer GetAbrSubscriptionLayer(Error *err = nullptr); void SetAbrFallbackLayer(AbrFallbackLayer abr_fallback_layer, Error *err = nullptr); AbrFallbackLayer GetAbrFallbackLayer(Error *err = nullptr); };
- Since
- v4.5.0
Method
- SetAutoPlay
- The error code. See SetAutoPlay.
- GetAutoPlay
- Gets the autoplay settings. See GetAutoPlay.
GetAutoPlay
Gets the autoplay settings.
bool GetAutoPlay(Error *err = nullptr);
- 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.
Parameters
- err
- The state or error information: Error.
Returns
Whether the autoplay settings are retrieved:
true
: Yes.false
: No.
SetAutoPlay
The error code.
void SetAutoPlay(bool auto_play, Error *err = nullptr);
- 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
- auto_play
- Whether to enable autoplay:
true
: (Default) Yes.false
: No.
- err
- The state or error information: Error.